/* 3D Marquee - Aceternity-inspired with perspective rows */

.marquee-3d-container {
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Force dark background even in light mode */
html.light .marquee-3d-container {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.marquee-3d-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    padding: 2rem;
    text-align: center;
    pointer-events: none;
    width: 100%;
    max-width: 1000px;
    background: radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            transparent 70%);
}

.marquee-3d-overlay .marquee-kicker {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mint);
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.65);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    display: inline-block;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(62, 230, 176, 0.2);
}

.marquee-3d-overlay h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.75);
    padding: 0.6rem 1.2rem;
    border-radius: 16px;
    display: inline-block;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.marquee-3d-overlay .marquee-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    padding: 1.25rem 1.75rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    border: 1px solid rgba(62, 230, 176, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Light Mode Overrides for Overlay Text */
html.light .marquee-3d-overlay .marquee-kicker {
    background: rgba(255, 255, 255, 0.92);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

html.light .marquee-3d-overlay h1 {
    background: rgba(255, 255, 255, 0.95);
    color: #051e14;
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

html.light .marquee-3d-overlay .marquee-description {
    background: rgba(255, 255, 255, 0.9);
    color: #1a2e28;
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* =============================================================================
   MARQUEE BUTTON STYLES - "Try our platform" & "View our Projects"
   NOTE: These styles ONLY apply to buttons inside the 3D marquee overlay.
   For general page buttons, see: → static/projects.css
   ============================================================================= */

.marquee-3d-overlay .marquee-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    pointer-events: auto;
}

/* Shared Button Base */
.marquee-3d-overlay .btn-primary,
.marquee-3d-overlay .btn-secondary {
    padding: 0.85rem 1.15rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

/* Primary Button - Filled Mint */
.marquee-3d-overlay .btn-primary {
    background: var(--mint, #10b981);
    color: #000;
    border: 2px solid transparent;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.2);
}

.marquee-3d-overlay .btn-primary:hover,
.marquee-3d-overlay .btn-primary:focus-visible {
    transform: translateY(-3px);
    background: color-mix(in oklab, var(--mint, #10b981) 85%, #ffffff);
    box-shadow: 0 14px 40px rgba(16, 185, 129, 0.3);
}

/* Secondary Button - Solid White (matches light mode appearance) */
.marquee-3d-overlay .btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: #051e14;
    border: 2px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.marquee-3d-overlay .btn-secondary .btn-icon {
    flex: 0 0 auto;
    display: inline-block;
    color: inherit;
}

.marquee-3d-overlay .btn-secondary span {
    display: inline-block;
}

.marquee-3d-overlay .btn-secondary:hover,
.marquee-3d-overlay .btn-secondary:focus-visible {
    transform: translateY(-3px);
    background: #ffffff;
    border-color: var(--mint, #10b981);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.marquee-3d-wrapper {
    position: relative;
    width: 100%;
    height: 700px;
    perspective: 1500px;
    perspective-origin: center center;
    overflow: hidden;
}

.marquee-3d-scene {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateX(25deg) rotateZ(-5deg) translateY(-120px);
}

.marquee-3d-row {
    position: absolute;
    display: flex;
    gap: 1.5rem;
    transform-style: preserve-3d;
    will-change: transform;
    white-space: nowrap;
}

/* Diagonal movement - combining horizontal and vertical with more separation */
.marquee-3d-row:nth-child(1) {
    left: 0;
    top: 0%;
    animation: marqueeScrollDiagonal1 50s linear infinite;
    animation-play-state: running;
}

.marquee-3d-row:nth-child(2) {
    left: 0;
    top: 40%;
    animation: marqueeScrollDiagonal2 45s linear infinite;
    animation-play-state: running;
}

.marquee-3d-row:nth-child(3) {
    left: 0;
    top: 80%;
    animation: marqueeScrollDiagonal3 55s linear infinite;
    animation-play-state: running;
}

/* Diagonal animations - moving both X and Y with wider range for continuous loop */
@keyframes marqueeScrollDiagonal1 {
    from {
        transform: translateX(0) translateY(0) translateZ(0);
    }

    to {
        transform: translateX(-50%) translateY(-10%) translateZ(0);
    }
}

@keyframes marqueeScrollDiagonal2 {
    from {
        transform: translateX(-50%) translateY(0) translateZ(0);
    }

    to {
        transform: translateX(0%) translateY(10%) translateZ(0);
    }
}

@keyframes marqueeScrollDiagonal3 {
    from {
        transform: translateX(0) translateY(0) translateZ(0);
    }

    to {
        transform: translateX(-50%) translateY(8%) translateZ(0);
    }
}

.marquee-3d-item {
    position: relative;
    width: 320px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
    transform-style: preserve-3d;
}

.marquee-3d-item:hover {
    transform: translateZ(40px) scale(1.05);
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 16px 64px rgba(34, 197, 94, 0.3);
    z-index: 10;
}

.marquee-3d-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.8) contrast(1.1);
    transition: filter 0.3s ease;
}

.marquee-3d-item:hover img {
    filter: brightness(1) contrast(1);
}

.marquee-3d-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(34, 197, 94, 0.15) 0%,
            transparent 50%,
            rgba(20, 184, 166, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.marquee-3d-item:hover::before {
    opacity: 1;
}

/* Gradient overlays for edge fade */
.marquee-3d-wrapper::before,
.marquee-3d-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 150px;
    left: 0;
    z-index: 10;
    pointer-events: none;
}

.marquee-3d-wrapper::before {
    top: 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 10, 0.9) 0%,
            transparent 100%);
}

.marquee-3d-wrapper::after {
    bottom: 0;
    background: linear-gradient(0deg,
            rgba(10, 10, 10, 0.9) 0%,
            transparent 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .marquee-3d-wrapper {
        height: 500px;
    }

    .marquee-3d-item {
        width: 260px;
        height: 240px;
    }

    .marquee-3d-scene {
        transform: rotateX(20deg) rotateZ(-3deg) translateY(-100px);
    }

    .marquee-3d-overlay h1 {
        font-size: 2rem;
    }

    .marquee-3d-overlay .marquee-description {
        font-size: 1rem;
    }

    .marquee-3d-overlay {
        padding: 2rem 1rem 1rem;
    }
}

/* Dark mode (default) */
:root:not(.light) .marquee-3d-container {
    background: rgba(10, 10, 10, 0.6);
    border-color: rgba(34, 197, 94, 0.15);
}

:root:not(.light) .marquee-3d-item {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(34, 197, 94, 0.2);
}

:root:not(.light) .marquee-3d-wrapper::before {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, transparent 100%);
}

:root:not(.light) .marquee-3d-wrapper::after {
    background: linear-gradient(0deg, rgba(10, 10, 10, 0.95) 0%, transparent 100%);
}

/* Light mode - keep marquee dark */
:root.light .marquee-3d-container {
    background: rgba(10, 10, 10, 0.95) !important;
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

:root.light .marquee-3d-item {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(5, 150, 105, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

:root.light .marquee-3d-item:hover {
    box-shadow: 0 16px 64px rgba(5, 150, 105, 0.25);
}

:root.light .marquee-3d-wrapper::before {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, transparent 100%);
}

:root.light .marquee-3d-wrapper::after {
    background: linear-gradient(0deg, rgba(10, 10, 10, 0.95) 0%, transparent 100%);
}