/**
 * Circular Gallery Styles
 * 3D rotating carousel for project cards
 */

/* Gallery wrapper with perspective */
.circular-gallery-wrapper {
    position: relative;
    width: 100%;
    min-height: 700px;
    perspective: 2000px;
    perspective-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4rem 0;
}

/* Gallery container */
.circular-gallery {
    position: relative;
    width: 100%;
    height: 600px;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Project cards in circular formation */
.circular-gallery .project-card {
    position: absolute;
    width: 400px;
    max-width: 90vw;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
                opacity 0.8s ease,
                box-shadow 0.8s ease;
    cursor: pointer;
    backface-visibility: hidden;
}

/* Active card styling */
.circular-gallery .project-card.active {
    cursor: default;
    box-shadow: 0 20px 60px rgba(255, 120, 80, 0.3),
                0 0 40px rgba(255, 177, 66, 0.2);
}

/* Active card can be tilted - allow hover cursor */
.circular-gallery .project-card.active.tilt {
    cursor: pointer;
}

/* Preserve 3D for tilt effect */
.circular-gallery .project-card.tilt {
    transform-style: preserve-3d;
}

/* Navigation buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-nav svg {
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.9);
}

.gallery-nav:hover {
    background: rgba(255, 177, 66, 0.2);
    border-color: rgba(255, 177, 66, 0.6);
    box-shadow: 0 0 30px rgba(255, 177, 66, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev {
    left: 10%;
}

.gallery-nav-next {
    right: 10%;
}

/* Dots indicator */
.gallery-dots {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-dot:hover {
    background: rgba(255, 177, 66, 0.5);
    border-color: rgba(255, 177, 66, 0.8);
    transform: scale(1.2);
}

.gallery-dot.active {
    background: rgba(255, 177, 66, 1);
    border-color: rgba(255, 177, 66, 1);
    box-shadow: 0 0 15px rgba(255, 177, 66, 0.6);
}

/* Animations */
@keyframes gallery-entrance {
    from {
        opacity: 0;
        transform: translateZ(-500px) rotateY(180deg);
    }
    to {
        opacity: 1;
        transform: translateZ(0) rotateY(0deg);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .circular-gallery-wrapper {
        min-height: 600px;
    }

    .circular-gallery {
        height: 500px;
    }

    .circular-gallery .project-card {
        width: 350px;
    }

    .gallery-nav {
        width: 50px;
        height: 50px;
    }

    .gallery-nav svg {
        width: 24px;
        height: 24px;
    }

    .gallery-nav-prev {
        left: 5%;
    }

    .gallery-nav-next {
        right: 5%;
    }
}

@media (max-width: 768px) {
    .circular-gallery-wrapper {
        min-height: 550px;
        perspective: 1200px;
    }

    .circular-gallery {
        height: 450px;
    }

    .circular-gallery .project-card {
        width: 300px;
    }

    .gallery-nav {
        width: 45px;
        height: 45px;
    }

    .gallery-nav svg {
        width: 20px;
        height: 20px;
    }

    .gallery-nav-prev {
        left: 10px;
    }

    .gallery-nav-next {
        right: 10px;
    }

    .gallery-dots {
        bottom: -50px;
        gap: 10px;
    }

    .gallery-dot {
        width: 10px;
        height: 10px;
    }
}

/* Smooth theme transitions */
body[data-theme="light"] .gallery-nav {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.8);
}

body[data-theme="light"] .gallery-nav svg {
    color: rgba(0, 0, 0, 0.8);
}

body[data-theme="light"] .gallery-nav:hover {
    background: rgba(235, 157, 46, 0.3);
    border-color: rgba(235, 157, 46, 0.8);
    box-shadow: 0 0 30px rgba(235, 157, 46, 0.3);
}

body[data-theme="light"] .gallery-dot {
    border-color: rgba(0, 0, 0, 0.4);
}

body[data-theme="light"] .gallery-dot:hover {
    background: rgba(235, 157, 46, 0.5);
    border-color: rgba(235, 157, 46, 0.8);
}

body[data-theme="light"] .gallery-dot.active {
    background: rgba(235, 157, 46, 1);
    border-color: rgba(235, 157, 46, 1);
    box-shadow: 0 0 15px rgba(235, 157, 46, 0.6);
}

body[data-theme="light"] .circular-gallery .project-card.active {
    box-shadow: 0 20px 60px rgba(235, 157, 46, 0.3),
                0 0 40px rgba(255, 100, 60, 0.2);
}

/* Accessibility */
.gallery-nav:focus,
.gallery-dot:focus {
    outline: 2px solid rgba(255, 177, 66, 0.8);
    outline-offset: 4px;
}

/* Loading state */
.circular-gallery .project-card {
    animation: gallery-entrance 1s ease-out backwards;
}

.circular-gallery .project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.circular-gallery .project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.circular-gallery .project-card:nth-child(3) {
    animation-delay: 0.3s;
}

.circular-gallery .project-card:nth-child(4) {
    animation-delay: 0.4s;
}
