/*
 * 3D Orbiting Carousel Styles
 * Vanilla CSS implementation with glassmorphism effects
 */

/* ========================================
   CAROUSEL SECTION
   ======================================== */

.carousel-section {
    position: relative;
    padding: var(--section-padding-y) 0;
    background: linear-gradient(to bottom, #051f0f 0%, #0a0a14 100%);
    overflow: hidden;
}

.carousel-section .orb-6 {
    width: 550px;
    height: 550px;
    background: linear-gradient(135deg, var(--gradient-purple-start), var(--gradient-blue-end));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 15s ease-in-out infinite;
}

/* ========================================
   CAROUSEL CONTAINER
   ======================================== */

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    margin: 0 auto;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

/* ========================================
   CENTRAL OBJECT (disabled)
   ======================================== */

.central-object {
    display: none;
}

/* ========================================
   ORBIT PIVOT & CARDS
   ======================================== */

.orbit-pivot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    will-change: transform;
}

.carousel-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 300px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    cursor: pointer;
}

.carousel-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform 2s ease, box-shadow 2s ease;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(201, 162, 39, 0.15);
}

/* Subtle glass border effect - no blur on images */
.carousel-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    z-index: 1;
    pointer-events: none;
}

.carousel-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 40%,
        transparent 60%,
        rgba(0, 0, 0, 0.15) 100%
    );
    border-radius: var(--radius-xl);
    z-index: 2;
    pointer-events: none;
}

.carousel-card:hover .carousel-card-inner {
    transform: scale(1.05);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 30px 70px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(201, 162, 39, 0.3);
}

.carousel-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 2s ease;
    z-index: 3;
    border-radius: var(--radius-xl);
}

.carousel-card:hover .carousel-card-overlay {
    opacity: 1;
}

.carousel-card-title {
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    padding: var(--space-4);
}

/* ========================================
   CAROUSEL CONTROLS (hidden - auto-play only)
   ======================================== */

.carousel-controls {
    display: none;
}

/* ========================================
   LOADING STATE
   ======================================== */

.carousel-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-gray-400);
}

.carousel-loading .spinner {
    margin-bottom: var(--space-4);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .carousel-container {
        height: 500px;
        max-width: 800px;
    }

    .central-object {
        width: 240px;
        height: 240px;
    }

    .carousel-card {
        width: 180px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        height: 450px;
        max-width: 600px;
        perspective: 1000px;
    }

    .central-object {
        width: 200px;
        height: 200px;
    }

    .carousel-card {
        width: 160px;
        height: 220px;
    }

    .central-object-title {
        font-size: var(--font-size-base);
        padding: var(--space-3);
    }

    .carousel-card-title {
        font-size: var(--font-size-base);
    }

    .carousel-controls {
        bottom: -70px;
    }

    .carousel-control-btn {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 400px;
        max-width: 100%;
        perspective: 800px;
    }

    .central-object {
        width: 160px;
        height: 160px;
    }

    .carousel-card {
        width: 140px;
        height: 190px;
    }

    .central-object-title {
        font-size: var(--font-size-sm);
        padding: var(--space-2);
    }

    .carousel-card-title {
        font-size: var(--font-size-sm);
    }

    .carousel-controls {
        bottom: -60px;
        gap: var(--space-3);
    }

    .carousel-control-btn {
        width: 36px;
        height: 36px;
        font-size: var(--font-size-base);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .orbit-pivot,
    .carousel-card,
    .carousel-card-inner,
    .central-object {
        transition: none !important;
        animation: none !important;
    }
}
