﻿/* ============================================
   GLOBAL VARIABLES & RESET
   ============================================ */
:root {
    --glass-bg: rgba(20, 40, 80, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --primary-gradient: linear-gradient(135deg, #dc342f 0%, #a82824 100%);
    --text-glow: 0 0 10px rgba(255, 255, 255, 0.3);
    --spacing-unit: clamp(4px, 0.5vw, 8px);
    --spacing-xs: calc(var(--spacing-unit) * 1);
    --spacing-sm: calc(var(--spacing-unit) * 2);
    --spacing-md: calc(var(--spacing-unit) * 3);
    --spacing-lg: calc(var(--spacing-unit) * 4);
    --spacing-xl: calc(var(--spacing-unit) * 6);
    --spacing-2xl: calc(var(--spacing-unit) * 8);
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.5rem);
    --font-size-xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
    --font-size-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --font-size-3xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    --safe-area-top: max(1.5rem, env(safe-area-inset-top));
    --safe-area-bottom: max(1rem, env(safe-area-inset-bottom));
    --safe-area-left: max(1rem, env(safe-area-inset-left));
    --safe-area-right: max(1rem, env(safe-area-inset-right));
    --section-padding-block: clamp(3rem, 8vh, 8rem);
    --section-padding-inline: clamp(1rem, 5vw, 3rem);
    --vh: 1vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #2e296b;
    color: #fff;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    body.menu-open {
        overflow: hidden;
    }

/* ============================================
   THREE.JS BACKGROUND
   ============================================ */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 30%, rgba(30, 10, 60, 0.4) 0%, transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(60, 20, 40, 0.3) 0%, transparent 60%), linear-gradient(180deg, #2e296b 0%, #1a1640 50%, #0e0b26 100%);
}

#space-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 80%);
    transform: scale(0);
    animation: rippleFlow 0.8s ease-out;
    pointer-events: none;
    z-index: 10;
}

.section-title {
    font-size: var(--font-size-2xl);
    text-align: center;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-shadow: var(--text-glow);
}

.mouse-track-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar-floating {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100%;
    z-index: 2200;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    pointer-events: none;
    padding-inline: var(--safe-area-left) var(--safe-area-right);
    padding-block: var(--spacing-xs);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background-color 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
}

    .navbar-floating.nav-hidden {
        transform: translateY(calc(-100% - 20px));
    }

/*    .navbar-floating.scrolled {
        background: rgba(5, 8, 24, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        pointer-events: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

        .navbar-floating.scrolled .floating-nav-pill {
            background: rgba(20, 40, 80, 0.35);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
        }*/

.nav-logo-container {
    position: relative;
    pointer-events: auto;
    z-index: 1002;
    animation: navFloatIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: opacity 0.3s ease;
}

    .nav-logo-link:hover {
        opacity: 0.9;
    }

.nav-logo-img {
    height: clamp(76px, 6vh, 102px);
    width: auto;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
    transition: filter 0.3s ease;
}

.navbar-floating.scrolled .nav-logo-img {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

.floating-nav-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 100px;
    animation: navFloatIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.nav-menu-items {
    display: flex;
    list-style: none;
    gap: 2px;
}

.nav-item {
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

    .nav-item::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(100px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.1), transparent 50%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
        transform: translateY(-1px);
    }

        .nav-item:hover::before {
            opacity: 1;
        }

    .nav-item a {
        display: block;
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        font-weight: 500;
        font-size: var(--font-size-xs);
        letter-spacing: 0.5px;
        padding: var(--spacing-sm) var(--spacing-md);
        position: relative;
        z-index: 2;
        transition: color 0.3s ease;
        white-space: nowrap;
    }

    .nav-item:hover a {
        color: #fff;
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    }

    .nav-item.highlight {
        background: rgba(255, 68, 68, 0.12);
        border-color: rgba(255, 68, 68, 0.25);
    }

        .nav-item.highlight:hover {
            background: rgba(255, 68, 68, 0.2);
        }

        .nav-item.highlight a {
            color: #ffaaaa;
            font-weight: 600;
        }

.navbar-toggler {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    z-index: 2100;
}

    .navbar-toggler span {
        width: 22px;
        height: 2px;
        background: #fff;
        margin: 2.5px 0;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border-radius: 2px;
    }

    .navbar-toggler:hover span {
        background: #ff4444;
    }

    .navbar-toggler.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .navbar-toggler.active span:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggler.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

.nav-menu-mobile {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 24, 0.98);
    backdrop-filter: blur(20px);
    z-index: 2050;
    padding-top: calc(var(--safe-area-top) + 7rem);
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
    padding-bottom: var(--safe-area-bottom);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .nav-menu-mobile.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu-mobile ul {
        list-style: none;
        width: 100%;
        padding-left: var(--spacing-2xl);
    }

    .nav-menu-mobile a {
        display: block;
        padding: var(--spacing-md) 0;
        font-size: var(--font-size-xl);
        font-weight: 700;
        color: #fff;
        text-decoration: none;
        transition: color 0.3s, transform 0.3s;
        text-align: left;
    }

        .nav-menu-mobile a:hover {
            color: #ff4444;
            transform: scale(1.05);
            transform-origin: left center;
        }

/* ============================================
   MAIN CONTAINER (No scroll - body handles it) AND SECTIONS
   ============================================ */
main {
    position: relative;
    z-index: 2;
}

.hero-services-combined {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-block-start: calc(var(--navbar-height) + var(--spacing-2xl));
    padding-block-end: var(--section-padding-block);
    padding-inline: var(--section-padding-inline);
    gap: var(--spacing-2xl);
    overflow: hidden;
    position: relative; /* Context for background carousel */
}

/* ============================================
   HERO BACKGROUND CAROUSEL
   ============================================ */
.hero-bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none; /* Clicks pass through the container by default */
}

.hero-carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    width: 100%;
    height: 100%;
}

    .hero-carousel-item.active {
        opacity: 1;
    }

    .hero-carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none; /* Image explicitly not clickable */
    }

.hero-carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 39, 0.4); /* Subtle transparent overlay */
    z-index: 1;
}

.hero-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(40px, 6vw, 54px);
    height: clamp(40px, 6vw, 54px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    pointer-events: auto; /* Enable clicks precisely over the button */
}

    .hero-carousel-control:hover {
        background: rgba(255, 68, 68, 0.8);
        box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
        border-color: rgba(255, 255, 255, 0.6);
    }

    .hero-carousel-control svg {
        width: 24px;
        height: 24px;
    }

    .hero-carousel-control.prev {
        left: clamp(10px, 3vw, 30px);
    }

    .hero-carousel-control.next {
        right: clamp(10px, 3vw, 30px);
    }

.about-section,
.services-section,
.references-section,
.gallery-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-block-start: calc(var(--safe-area-top) + var(--section-padding-block));
    padding-block-end: var(--section-padding-block);
    padding-inline: var(--section-padding-inline);
    position: relative;
    z-index: 5;
}

.about-section {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    padding: var(--spacing-xl) var(--section-padding-inline);
    padding-top: calc(var(--safe-area-top) + var(--spacing-xl));
    overflow: hidden;
}

.services-section {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

.references-section,
.gallery-section {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-2xl);
    max-width: 1400px;
    width: 90%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInLeft 1s ease-out;
    white-space: nowrap;
}

.cta-button {
    display: inline-block;
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: var(--primary-gradient);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: translate 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.3);
    animation: fadeInLeft 1s ease-out 0.6s both;
    letter-spacing: 0.05em;
    margin-top: var(--spacing-lg)
}

    .cta-button:hover {
        translate: 0 -4px;
        box-shadow: 0 20px 50px rgba(255, 68, 68, 0.5);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .cta-button:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }

.hero-tagline {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--spacing-lg);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    animation: fadeInLeft 1s ease-out 0.9s both;
    text-align: left;
    font-style: italic;
}

.hero-subtitle {
    /* Typography */
    font-size: var(--font-size-xl);
    font-weight: 300; /* Light weight for elegance */
    line-height: 1.5;
    letter-spacing: 0.3em; /* Wide, architectural spacing */
    text-transform: uppercase;
    /* Glass-etched text effect (carved into invisible glass) */
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25), /* Top edge highlight (light hitting glass) */
    0 -1px 2px rgba(0, 0, 0, 0.6), /* Inset shadow (carved depth) */
    0 0 30px rgba(255, 68, 68, 0.15); /* Subtle Mars red underglow */
    /* Spacing */
    margin-bottom: var(--spacing-md);
    /* Animation */
    animation: fadeInLeft 1s ease-out 0.3s both;
    /* Subtle interaction */
    transition: text-shadow 0.3s ease, letter-spacing 0.3s ease;
}

    /* Staggered animation for second line */
    .hero-subtitle:nth-of-type(2) {
        animation-delay: 0.5s;
        margin-left: var(--spacing-lg); /* Slight offset for depth */
    }

    /* Hover effect - subtle glow intensifies */
    .hero-subtitle:hover {
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 -1px 2px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 68, 68, 0.3); /* Stronger Mars glow */
        letter-spacing: 0.32em; /* Slight expansion */
    }

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1.5s ease-out;
    min-height: clamp(200px, 30vh, 400px);
}

/* ============================================
   SERVICE PREVIEW CARDS
   ============================================ */
.service-preview-wrapper {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    flex-shrink: 1;
    position: relative;
    z-index: 2;
}

    .service-preview-wrapper .section-title {
        display: none;
    }

.service-preview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 260px));
    justify-content: center;
    gap: var(--spacing-lg);
    max-width: 1400px;
    width: 100%;
    z-index: 10;
}

.service-preview-card {
    background: linear-gradient(var(--glass-bg), var(--glass-bg)) padding-box, radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 68, 68, 1), transparent 40%) border-box, linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) border-box;
    background-clip: padding-box, border-box, border-box;
    border: 2px solid transparent;
    backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    transition: translate 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    aspect-ratio: 1 / 1;
}

    .service-preview-card::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.08), transparent 40%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .service-preview-card:hover {
        translate: 0 -10px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

        .service-preview-card:hover::before {
            opacity: 1;
        }

    .service-preview-card.clicked::after {
        content: '';
        position: absolute;
        inset: 0;
        box-shadow: inset 0 0 40px rgba(255, 68, 68, 0.2);
        border-radius: 24px;
        pointer-events: none;
    }

.service-preview-icon {
    width: clamp(44px, 8vw, 64px);
    height: clamp(44px, 8vw, 64px);
    margin-bottom: var(--spacing-sm);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
}

.service-preview-card:hover .service-preview-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(255, 68, 68, 0.5));
}

.service-preview-card h4 {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
    line-height: 1.3;
}

/* ============================================
   INTRO VIDEO SECTION
   ============================================ */
.intro-video-section {
    display: flex; /* Enables Flexbox */
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centers content horizontally */
    padding-block-start: calc(var(--safe-area-top) + var(--section-padding-block));
    padding-block-end: var(--section-padding-block);
    padding-inline: var(--section-padding-inline);
    position: relative;
    z-index: 5;
    background: transparent;
    width: 100%;
    text-align: center; /* Ensures text (title) is centered */
}

    .intro-video-section .section-title {
        margin-bottom: var(--spacing-xl);
        width: 100%;
    }

.video-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto; /* Auto margins for horizontal centering */
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: var(--glass-shadow), 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s ease;
}

    .video-container:hover {
        transform: translateY(-5px);
        box-shadow: 0 30px 80px rgba(255, 68, 68, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.15);
    }

    .video-container iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.3) 0%, transparent 70%);
    animation: particleFloat 20s infinite ease-in-out;
}

.particle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.particle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -3%;
    animation-delay: -5s;
}

.particle-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

.particle-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 25%;
    animation-delay: -15s;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.particle-5 {
    width: 80px;
    height: 80px;
    bottom: 40%;
    right: 10%;
    animation-delay: -7s;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.2) 0%, transparent 70%);
}

.about-container {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

    .about-container .section-title {
        flex-shrink: 0;
        margin-bottom: 0;
    }

.about-text-wrapper {
    flex: 1;
    min-height: 0;
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

    .about-text-wrapper::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.05), transparent 40%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .about-text-wrapper:hover::before {
        opacity: 1;
    }

.about-text-content {
    height: 100%;
    overflow-y: auto;
    padding-right: var(--spacing-md);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 68, 68, 0.5) rgba(255, 255, 255, 0.1);
    -webkit-overflow-scrolling: touch;
}

    .about-text-content::-webkit-scrollbar {
        width: 6px;
    }

    .about-text-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
    }

    .about-text-content::-webkit-scrollbar-thumb {
        background: rgba(255, 68, 68, 0.4);
        border-radius: 6px;
    }

        .about-text-content::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 68, 68, 0.6);
        }

    .about-text-content p {
        font-size: var(--font-size-base);
        line-height: 1.8;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: var(--spacing-lg);
        text-align: justify;
    }

        .about-text-content p:last-child {
            margin-bottom: 0;
        }

        .about-text-content p.highlight-text {
            background: rgba(255, 68, 68, 0.1);
            border-left: 4px solid #ff4444;
            padding: var(--spacing-md) var(--spacing-lg);
            border-radius: 0 12px 12px 0;
            margin-top: var(--spacing-lg);
        }

            .about-text-content p.highlight-text strong {
                color: #ff6666;
            }

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    flex-shrink: 0;
}

.mv-card {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.mv-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255, 68, 68, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mv-card:hover .mv-card-glow {
    opacity: 1;
}

.mv-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 68, 68, 0.08);
}

.mv-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.mv-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.mv-card:hover .mv-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(255, 68, 68, 0.6));
}

.mv-card h4 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.mv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .mv-list li {
        padding-left: var(--spacing-lg);
        position: relative;
        margin-bottom: var(--spacing-xs);
        font-size: var(--font-size-sm);
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.85);
        transition: transform 0.2s ease, color 0.2s ease;
    }

        .mv-list li:last-child {
            margin-bottom: 0;
        }

        .mv-list li:hover {
            transform: translateX(5px);
            color: #fff;
        }

    .mv-list .list-icon {
        position: absolute;
        left: 0;
        color: #ff4444;
        transition: transform 0.2s ease;
    }

    .mv-list li:hover .list-icon {
        transform: scale(1.2);
    }

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-container {
    width: 100%;
    max-width: 150vh;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.services-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.service-accordion-item {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

    .service-accordion-item::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 68, 68, 0.1), transparent 40%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 0;
    }

    .service-accordion-item:hover::before {
        opacity: 1;
    }

    .service-accordion-item:hover {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 68, 68, 0.08);
    }

.service-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease;
}

    .service-accordion-header:hover {
        background: rgba(255, 255, 255, 0.02);
    }

.service-header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex: 1;
}

.service-icon-wrapper {
    position: relative;
    width: clamp(50px, 8vw, 70px);
    height: clamp(50px, 8vw, 70px);
    flex-shrink: 0;
}

.service-icon-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.service-accordion-item:hover .service-icon-glow,
.service-accordion-item.active .service-icon-glow {
    opacity: 1;
    animation: iconGlowPulse 2s infinite ease-in-out;
}

.service-icon {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.service-accordion-item:hover .service-icon,
.service-accordion-item.active .service-icon {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 0 15px rgba(255, 68, 68, 0.6));
}

.service-title-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    text-align: left;
}

    .service-title-area h4 {
        font-size: var(--font-size-lg);
        font-weight: 700;
        color: #fff;
        margin: 0;
        transition: color 0.3s ease;
    }

.service-accordion-item:hover .service-title-area h4,
.service-accordion-item.active .service-title-area h4 {
    color: #ff8888;
}

.service-subtitle {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    transition: color 0.3s ease;
}

.service-accordion-item:hover .service-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.service-expand-indicator {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.expand-line {
    position: absolute;
    background: #ff4444;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

    .expand-line:first-child {
        width: 100%;
        height: 2px;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }

    .expand-line.vertical {
        width: 2px;
        height: 100%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

.service-accordion-item.active .expand-line.vertical {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.service-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-accordion-item.active .service-accordion-content {
    max-height: 500px;
}

.service-content-inner {
    padding: 0 var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);
    padding-left: calc(clamp(50px, 8vw, 70px) + var(--spacing-xl) + var(--spacing-lg));
    overscroll-behavior: contain;
    touch-action: pan-x pan-y; /* Allow both but isolated */
}

    .service-content-inner p {
        font-size: var(--font-size-sm);
        line-height: 1.8;
        color: rgba(255, 255, 255, 0.85);
        margin-bottom: var(--spacing-md);
    }

        .service-content-inner p:last-of-type {
            margin-bottom: var(--spacing-lg);
        }

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 50px;
    font-size: var(--font-size-xs);
    color: #ff8888;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .feature-tag:hover {
        background: rgba(255, 68, 68, 0.25);
        border-color: rgba(255, 68, 68, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 68, 68, 0.2);
    }

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

    [data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }

[data-reveal-child] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    [data-reveal-child].revealed {
        opacity: 1;
        transform: translateY(0);
    }

    [data-reveal-child]:nth-child(1) {
        transition-delay: 0.1s;
    }

    [data-reveal-child]:nth-child(2) {
        transition-delay: 0.2s;
    }

    [data-reveal-child]:nth-child(3) {
        transition-delay: 0.3s;
    }

    [data-reveal-child]:nth-child(4) {
        transition-delay: 0.4s;
    }

    [data-reveal-child]:nth-child(5) {
        transition-delay: 0.5s;
    }

/* ============================================
   REFERENCES SECTION (INFINITE CAROUSEL)
   ============================================ */

/* ============================================
   CAROUSEL POLISH: Spotlight & Accessibility
   ============================================ */

/* SPOTLIGHT EFFECT: Dim un-hovered items when the track is hovered */
.references-carousel-track:hover .reference-item:not(:hover) {
    opacity: 0.4;
    filter: blur(2px);
    transform: scale(0.95);
}

/* Base state for the reference items to allow smooth spotlight transitioning */
.reference-item {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, opacity 0.4s ease, filter 0.4s ease; /* Added opacity and filter transitions */
}

    /* CORPORATE SLEEK: Desaturate logos by default */
    .reference-item img {
        filter: grayscale(100%) opacity(0.7); /* Starts gray and slightly faded */
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, filter 0.4s ease; /* Added filter transition */
    }

    /* Return to full color and opacity on hover */
    .reference-item:hover img {
        filter: grayscale(0%) opacity(1);
        transform: scale(1.1) rotate(2deg);
        box-shadow: 0 0 25px rgba(255, 68, 68, 0.5);
    }

/* ACCESSIBILITY: Respect system preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .references-carousel-track {
        animation: none; /* Stops the auto-scroll */
        overflow-x: auto; /* Allows manual horizontal scrolling */
        scroll-snap-type: x mandatory;
    }

    .reference-item {
        scroll-snap-align: center;
    }
}

.references-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.references-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    z-index: 5;
    position: relative;
}

/* Container creating the fade effect on edges */
.references-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: var(--spacing-md) 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

    .references-carousel-wrapper:hover .references-carousel-track {
        animation-play-state: paused;
    }

/* The moving track */
.references-carousel-track {
    display: flex;
    flex-wrap: nowrap; /* CRITICAL: Forces all items to stay in a single line */
    align-items: center;
    gap: 0; /* CRITICAL: Remove gap to fix the loop mathematics */
    width: max-content; /* CRITICAL: Forces track width to match element width */
    animation: scrollMarquee 40s linear infinite;
    will-change: transform;
}

    /* Pause animation smoothly on hover */
    .references-carousel-track:hover {
        animation-play-state: paused;
    }

@keyframes scrollMarquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
    /* Flawless math: exactly -50% */
}

.reference-item {
    margin-right: var(--spacing-md); /* Replaces the track gap */
    flex-shrink: 0 !important; /* CRITICAL: Prevents the layout engine from squeezing items */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    width: clamp(130px, 25vw, 250px);
    height: clamp(130px, 25vw, 250px);
    border: 2px solid transparent;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
    border-radius: 20px;
    position: relative;
    overflow: visible !important; /* Required for the magnetic hover hitbox */
    backdrop-filter: none !important;
    background: none;
}

    .reference-item::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.08), transparent 40%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .reference-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 68, 68, 0.15);
    }

        .reference-item:hover::before {
            opacity: 1;
        }

    .reference-item img {
        max-width: 90%;
        max-height: 90%;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        padding: 10px;
        object-fit: contain;
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.2);
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    }

    .reference-item:hover img {
        transform: scale(1.1) rotate(2deg);
        box-shadow: 0 0 25px rgba(255, 68, 68, 0.5);
    }

/* ============================================
   PHOTO GALLERY
   ============================================ */
#galleryCarousel {
    background: linear-gradient(rgba(10, 20, 40, 0.85), rgba(10, 20, 40, 0.85)) padding-box, radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 68, 68, 1), transparent 40%) border-box, linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) border-box;
    background-clip: padding-box, border-box, border-box;
    border: 2px solid transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 68, 68, 0.05);
    position: relative;
    width: min(95%, 1000px);
}

    #galleryCarousel::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.05), transparent 40%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 2;
    }

    #galleryCarousel:hover::before {
        opacity: 1;
    }

.carousel-inner {
    border-radius: 28px;
    height: 60vh;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-item {
    height: 100%;
}

    .carousel-item.active,
    .carousel-item-next,
    .carousel-item-prev {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .carousel-item img {
        border-radius: 28px;
        user-select: none;
        -webkit-user-drag: none;
        pointer-events: none;
        cursor: zoom-in;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
        margin: 0 auto;
    }

.carousel-control-prev,
.carousel-control-next {
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    min-width: 44px;
    min-height: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 10;
    margin: 0 var(--spacing-md);
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background: rgba(255, 68, 68, 0.8);
        opacity: 1;
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
        transform: translateY(-50%) scale(1.1);
    }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

/* ============================================
   FOOTER SECTION
   ============================================ */
.site-footer {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to top, #050818 0%, rgba(10, 14, 39, 0.8) 100%);
    position: relative;
    z-index: 10;
    padding: var(--section-padding-block) var(--section-padding-inline);
    padding-bottom: var(--safe-area-bottom);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: var(--spacing-2xl);
    max-width: 1200px;
    width: 100%;
    margin-bottom: var(--spacing-xl);
    background: rgba(20, 40, 80, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: var(--spacing-2xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.footer-logo img {
    height: clamp(50px, 8vw, 60px);
    margin-bottom: var(--spacing-md);
    width: auto;
    object-fit: contain;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
    color: #fff;
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
    font-size: var(--font-size-sm);
}

    .footer-links a:hover {
        color: #ff4444;
    }

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.social-icons {
    display: flex;
    gap: var(--spacing-md);
}

.social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
    position: relative;
    overflow: hidden;
}

    .social-icon svg {
        width: 20px;
        height: 20px;
        position: relative;
        z-index: 2;
        transition: transform 0.3s ease;
    }

    .social-icon::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--primary-gradient);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 50%;
        z-index: 1;
    }

    .social-icon:hover {
        background: transparent;
        color: #fff;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
        border-color: rgba(255, 68, 68, 0.5);
    }

        .social-icon:hover::before {
            opacity: 1;
        }

        .social-icon:hover svg {
            transform: scale(1.15) rotate(-5deg);
        }

    /* Individual hover effects for each platform */
    .social-icon[aria-label="LinkedIn"]:hover {
        box-shadow: 0 5px 15px rgba(10, 102, 194, 0.4);
        border-color: rgba(10, 102, 194, 0.5);
    }

        .social-icon[aria-label="LinkedIn"]:hover::before {
            background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
        }

    .social-icon[aria-label="Instagram"]:hover {
        box-shadow: 0 5px 15px rgba(225, 48, 108, 0.4);
        border-color: rgba(225, 48, 108, 0.5);
    }

        .social-icon[aria-label="Instagram"]:hover::before {
            background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
        }

    .social-icon[aria-label="Twitter"]:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.3);
    }

        .social-icon[aria-label="Twitter"]:hover::before {
            background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
        }

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-lg);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes rippleFlow {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

@keyframes clickPress {
    0% {
        scale: 1;
    }

    50% {
        scale: 0.97;
    }

    100% {
        scale: 1;
    }
}

@keyframes navFloatIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.7;
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.4;
    }

    75% {
        transform: translate(15px, 40px) scale(1.05);
        opacity: 0.6;
    }
}

@keyframes iconGlowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardPulse {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 0 rgba(255, 68, 68, 0);
        border-color: transparent;
    }

    50% {
        box-shadow: 0 25px 70px rgba(255, 68, 68, 0.15), inset 0 0 20px rgba(255, 68, 68, 0.1);
        border-color: rgba(255, 68, 68, 0.3);
    }
}

.clicked {
    animation: clickPress 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Desktop Large */
@media (min-width: 1440px) {
    .service-preview-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Landscape */
@media (max-width: 1220px) {
    .hero-title {
        white-space: normal;
    }

    .navbar-floating {
        justify-content: space-between;
    }

    .nav-logo-container {
        display: flex !important;
        align-items: center;
        animation: none;
    }

    .floating-nav-pill {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0;
    }

    .nav-menu-items {
        display: none;
    }

    .navbar-toggler {
        display: flex !important;
    }

    .hero {
        flex: 0 1 auto;
        min-height: 0;
        gap: var(--spacing-md);
        align-items: center;
        flex-direction: row;
    }

    .hero-content {
        flex: 1 1 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .cta-button {
        align-self: flex-start;
    }

    .hero-visual {
        display: flex;
        flex: 1 1 50%;
        max-height: 45vh; /* Daha esnek yükseklik */
        min-height: 250px;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }

    .hero-marquee-wrapper {
        display: flex;
        transform: rotate(0deg);
        height: 100%;
    }

    /* === iPAD PORTRAIT (DİK MOD - 834x1210) İÇİN SABİTLEME === */
    @media (orientation: portrait) {
        .hero {
            flex-direction: column;
            justify-content: center;
            gap: var(--spacing-xl); /* INCREASED: Space between text and marquee */
            margin-bottom: var(--spacing-lg); /* INCREASED: Space before service cards */
        }

        .hero-content {
            flex: 0 0 auto;
            width: 100%;
            align-items: center;
            text-align: center;
        }

        .hero-title {
            font-size: var(--font-size-2xl);
        }

        .hero-subtitle {
            margin-left: 0 !important;
            text-align: center;
        }

        .cta-button {
            align-self: center;
            margin-top: var(--spacing-md);
        }

        .hero-visual {
            flex: 1 1 auto;
            width: 90%;
            max-height: 38vh; /* Slightly reduced to give cards more room */
            margin-top: var(--spacing-sm);
            pointer-events: none;
        }
    }

    .service-preview-wrapper {
        isolation: isolate;
        contain: layout style paint;
        flex: 0 0 auto;
        width: 100%;
    }

    /* RESTORED: Horizontal Scroll Layout for Service Preview Cards on Tablet */
    .service-preview-cards {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: var(--spacing-md);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        width: calc(100% + 2 * var(--section-padding-inline));
        margin-inline: calc(-1 * var(--section-padding-inline));
        padding-block: var(--spacing-sm);
        padding-inline: max(12.5vw, calc(50vw - 250px));
        scroll-padding-inline: max(12.5vw, calc(50vw - 250px));
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        scrollbar-width: none;
        -ms-overflow-style: none;
        touch-action: pan-x pan-y pinch-zoom;
        -webkit-overflow-scrolling: touch;
    }

        .service-preview-cards::-webkit-scrollbar {
            display: none;
        }

    .service-preview-card {
        flex: 0 0 auto;
        width: 42vw; /* Shrink width just enough to show it scrolls horizontally */
        max-width: 260px;
        scroll-snap-align: center;
        aspect-ratio: auto;
        min-height: 250px;
        padding: var(--spacing-sm) var(--spacing-md);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
        transform: scale(0.9);
        opacity: 1;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        justify-content: center;
    }

        .service-preview-card.active {
            transform: scale(1);
            opacity: 1;
            animation: cardPulse 3s infinite ease-in-out;
        }

            .service-preview-card.active .service-preview-icon {
                transform: scale(1.1) rotate(5deg);
                filter: drop-shadow(0 0 15px rgba(255, 68, 68, 0.5));
                transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
            }

    .service-preview-icon {
        width: 38px;
        height: 38px;
        margin-bottom: var(--spacing-xs);
    }

    .service-preview-dot {
        width: 8px;
        height: 8px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transition: all 0.3s ease;
    }

        .service-preview-dot.active {
            background: #ff4444;
            transform: scale(1.5);
            box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
        }

    /* About Section - DESKTOP BEHAVIOR ON TABLET */
    .about-section {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    .about-container {
        height: 100%;
    }

    .about-text-wrapper {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .about-text-content {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .services-section {
        min-height: auto;
        height: auto;
        padding-block: calc(var(--spacing-2xl) * 2);
    }

    .mission-vision-grid {
        grid-template-columns: 1fr;
    }

    .service-content-inner {
        padding-left: var(--spacing-xl);
        overscroll-behavior: contain;
        touch-action: pan-x pan-y; /* Allow both but isolated */
    }

    .slider {
        min-height: 380px; /* CHANGED: Reduced from 400px */
    }

        .slider .slide {
            gap: var(--spacing-md); /* ADDED: Space between elements */
        }

            .slider .slide .project-list {
                max-height: 180px; /* CHANGED: Increased from 160px */
            }
}

/* Tablet Portrait */
@media (max-width: 768px) {

    .hero {
        pointer-events: none;
    }

        .hero .hero-content,
        .hero .hero-content *,
        .service-preview-wrapper,
        .service-preview-cards,
        .service-preview-card,
        .cta-button {
            pointer-events: auto;
        }

    .hero-bg-carousel {
        pointer-events: auto;
    }

        .hero-bg-carousel .hero-carousel-control {
            pointer-events: auto;
            z-index: 999;
        }

        .hero-bg-carousel.mobile-limited-bg {
            bottom: auto;
            overflow: hidden;
        }

    .hero-carousel-control {    
        top: calc(50% + 20vh);
        transform: translateY(-50%);
    }

    .reference-item::after {
        left: calc(var(--spacing-md) / -2);
        right: calc(var(--spacing-md) / -2);
    }

    /* References Grid Mobile (Tablet Portrait) */
    .references-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }

    .reference-item {
        width: clamp(100px, 20vw, 130px);
        height: clamp(100px, 20vw, 130px);
        border-radius: 16px;
        padding: var(--spacing-sm);
        margin-right: var(--spacing-md); /* Maintain spacing */
        flex-shrink: 0 !important; /* Prevent collision on tablet */
    }

    .references-carousel-track {
        gap: 0;
    }

    @keyframes scrollMarquee {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-50% - (var(--spacing-md) / 2)));
        }
    }

    /* About Section - KEEP DESKTOP BEHAVIOR */
    .about-section {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    .about-container {
        height: 100%;
    }

    .about-text-wrapper {
        flex: 1;
        min-height: 0;
        padding: var(--spacing-lg);
        overflow: hidden;
    }

    .about-text-content {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

        .about-text-content p {
            font-size: var(--font-size-sm);
            text-align: left;
        }

    .mv-card {
        padding: var(--spacing-md);
    }

    .mv-icon {
        width: 40px;
        height: 40px;
    }

    .mv-card h4 {
        font-size: var(--font-size-base);
    }

    .mv-list li {
        font-size: var(--font-size-xs);
    }

    /* Service accordion mobile */
    .service-accordion-header {
        padding: var(--spacing-lg);
    }

    .service-header-content {
        gap: var(--spacing-md);
    }

    .service-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .service-title-area h4 {
        font-size: var(--font-size-base);
    }

    .service-content-inner {
        padding: 0 var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
        overscroll-behavior: contain;
        touch-action: pan-x pan-y; /* Allow both but isolated */
    }

    .service-features {
        gap: var(--spacing-xs);
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* Particles smaller on mobile */
    .particle-1 {
        width: 150px;
        height: 150px;
    }

    .particle-2 {
        width: 100px;
        height: 100px;
    }

    .particle-3 {
        width: 80px;
        height: 80px;
    }

    .particle-4 {
        width: 60px;
        height: 60px;
    }

    .particle-5 {
        width: 50px;
        height: 50px;
    }

    /* References slider mobile */
    .slider {
        min-height: 460px; /* CHANGED: Increased from 380px */
    }

        .slider .slide {
            padding: var(--spacing-xl) var(--spacing-lg); /* CHANGED: More padding */
            gap: var(--spacing-lg); /* ADDED: More space */
        }

            .slider .slide img {
                width: 70px; /* CHANGED: Increased from 60px */
                height: 70px;
                padding: 10px;
                margin-bottom: var(--spacing-lg); /* CHANGED: More margin */
            }

            .slider .slide h4 {
                font-size: var(--font-size-lg); /* CHANGED: Larger */
                margin-bottom: var(--spacing-md); /* CHANGED: More margin */
            }

            .slider .slide .project-list {
                max-height: 240px; /* CHANGED: Increased from 140px */
            }

                .slider .slide .project-list li {
                    font-size: var(--font-size-sm);
                    padding: var(--spacing-sm) var(--spacing-md);
                    margin-bottom: var(--spacing-sm);
                    overflow-wrap: break-word;
                    word-break: break-word;
                }

            .slider .slide::before {
                font-size: 5rem;
                top: -10px;
                left: 15px;
            }
}

/* Mobile */
@media (max-width: 480px) {

    .reference-item::after {
        left: calc(var(--spacing-md) / -2);
        right: calc(var(--spacing-md) / -2);
        top: -10px;
        bottom: -10px;
    }

    /* References Grid Small Mobile */
    .references-container {
        gap: var(--spacing-md);
    }

    .references-grid {
        /* Forces exactly 3 uniform columns on phone screens for a very neat app-like grid */
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0;
    }

    .reference-item {
        width: 100px;
        height: 100px;
        border-radius: 12px;
        padding: var(--spacing-xs);
        margin-right: var(--spacing-md); /* Maintain spacing */
        flex-shrink: 0 !important; /* Prevent collision on mobile */
    }

        .reference-item img {
            padding: 6px; /* Slightly smaller internal white bubble */
            box-shadow: 0 0 10px rgba(255, 68, 68, 0.15);
        }

        .reference-item:hover {
            transform: translateY(-4px); /* Less extreme pop-out for thumbs/touch */
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 68, 68, 0.15);
        }

    .section-title {
        font-size: var(--font-size-xl);
        margin-top: var(--spacing-xl);
        margin-bottom: var(--spacing-sm);
    }

    /* About Section - KEEP DESKTOP BEHAVIOR */
    .about-section {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        padding: var(--spacing-md);
        padding-top: calc(var(--safe-area-top) + var(--spacing-lg));
    }

    .about-container {
        height: 100%;
    }

    .about-text-wrapper {
        flex: 1;
        min-height: 0;
        padding: var(--spacing-md);
        overflow: hidden;
    }

    .about-text-content {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

        .about-text-content p.highlight-text {
            padding: var(--spacing-sm) var(--spacing-md);
        }

    .mv-card-header {
        gap: var(--spacing-sm);
    }

    .mv-icon {
        width: 36px;
        height: 36px;
    }

    .mv-list li {
        padding-left: var(--spacing-md);
    }

    .service-header-content {
        flex-direction: row !important;
        align-items: center !important;
        gap: var(--spacing-sm);
    }

    .service-icon-wrapper {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .service-title-area {
        flex: 1;
        min-width: 0;
    }

        .service-title-area h4 {
            font-size: var(--font-size-sm);
            line-height: 1.2;
        }

    .service-subtitle {
        font-size: var(--font-size-xs);
    }

    .service-accordion-header {
        padding: var(--spacing-md);
        padding-right: calc(var(--spacing-md) + 30px);
    }

    .service-expand-indicator {
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
        width: 20px;
        height: 20px;
    }

    .slider {
        min-height: 520px;
    }

        .slider .slide {
            padding: var(--spacing-lg);
            gap: var(--spacing-lg);
        }

            .slider .slide img {
                width: 60px;
                height: 60px;
                padding: 8px;
                margin-bottom: var(--spacing-md);
            }

            .slider .slide h4 {
                font-size: var(--font-size-base);
                margin-bottom: var(--spacing-md);
            }

            .slider .slide .project-list {
                max-height: 280px;
            }

                .slider .slide .project-list li {
                    font-size: var(--font-size-xs);
                    line-height: 1.6;
                    padding: var(--spacing-sm) var(--spacing-md);
                    margin-bottom: var(--spacing-sm);
                    border-left-width: 3px;
                    overflow-wrap: break-word;
                    word-break: break-word;
                    hyphens: auto;
                }

    .slider-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: var(--font-size-base);
    }

    .slider-container {
        gap: var(--spacing-md);
    }

    .service-preview-cards {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
        transform: none;
        -webkit-transform: none;
    }

    .service-preview-card {
        background: rgba(20, 40, 80, 0.95) !important;
        display: flex !important;
        min-height: 140px;
        max-height: 180px;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        border: 2px solid rgba(255, 68, 68, 0.3);
        border-radius: 24px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto;
        aspect-ratio: auto !important;
    }

        .service-preview-card:hover {
            translate: 0 !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        }

            .service-preview-card:hover .service-preview-icon {
                transform: none !important;
            }

            .service-preview-card:hover::before {
                opacity: 0 !important;
            }

    .hero-services-combined {
        display: block !important;
        padding-block: 0 !important;
        min-height: auto !important;
    }

    .hero {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        display: flex;
        flex-direction: column;
        padding-top: calc(var(--navbar-height, 80px) + var(--spacing-xl)) !important;
        padding-bottom: var(--spacing-2xl) !important;
    }

    .service-preview-wrapper {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: var(--navbar-height, 80px) !important;
        margin-top: var(--spacing-xl);
    }

    .hero-title {
        order: 1;
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-xs);
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        width: 100%;
        align-items: flex-start;
    }

    .hero-tagline {
        order: 2;
        margin-top: 0;
        margin-bottom: auto;
        font-style: normal;
    }

    .hero-subtitle {
        order: 3;
        margin-left: 0 !important;
        text-align: left;
        font-size: var(--font-size-sm) !important;
        font-weight: 700;
    }

    .cta-button {
        order: 4;
        margin-top: var(--spacing-xl);
        align-self: flex-start;
    }
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .slider .slide img,
    .slider .slide h4,
    .slider .slide .project-list {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    [data-reveal],
    [data-reveal-child] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .particle {
        animation: none !important;
    }

    .highlight-glow,
    .service-icon-glow {
        animation: none !important;
    }

    .service-preview-card.active {
        animation: none !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mouse-track-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #ff4444;
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   NATIVE LIGHTBOX (Glassmorphism + Touch Gestures)
   ============================================ */

/* Lightbox Container */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    -webkit-tap-highlight-color: transparent;
}

    .lightbox.active {
        opacity: 1;
        visibility: visible;
    }

/* Glassmorphism Backdrop */
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 24, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1;
}

/* Lightbox Container (Glassmorphism) */
.lightbox-container {
    position: relative;
    z-index: 2;
    width: 95vw;
    height: 90vh;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(20, 40, 80, 0.4), rgba(20, 40, 80, 0.4)) padding-box, radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 68, 68, 1), transparent 40%) border-box, linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) border-box;
    background-clip: padding-box, border-box, border-box;
    border: 2px solid transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255, 68, 68, 0.05);
    animation: lightboxZoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Close Button (Glassmorphism) */
.lightbox-close {
    position: absolute;
    top: clamp(10px, 2vh, 20px);
    right: clamp(10px, 2vw, 20px);
    width: clamp(44px, 6vw, 54px);
    height: clamp(44px, 6vw, 54px);
    min-width: 44px;
    min-height: 44px;
    background: rgba(255, 68, 68, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 68, 68, 0.4);
    border-radius: 50%;
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

    .lightbox-close:hover {
        background: #ff4444;
        color: #fff;
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
        transform: scale(1.1) rotate(90deg);
    }

    .lightbox-close svg {
        width: 24px;
        height: 24px;
        stroke-width: 2.5;
    }

/* Navigation Buttons (Glassmorphism) */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(44px, 6vw, 60px);
    height: clamp(44px, 6vw, 60px);
    min-width: 44px;
    min-height: 44px;
    background: rgba(255, 68, 68, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 68, 68, 0.4);
    border-radius: 50%;
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: clamp(10px, 3vw, 20px);
}

.lightbox-next {
    right: clamp(10px, 3vw, 20px);
}

.lightbox-nav:hover {
    background: #ff4444;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
    transform: translateY(-50%) scale(1.15);
}

.lightbox-nav svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

/* Media Wrapper */
.lightbox-media-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 10vh, 100px) clamp(20px, 5vw, 80px) clamp(80px, 12vh, 120px);
    overflow: hidden;
    position: relative;
}

/* Media Element (Image or Video) */
.lightbox-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.3s ease;
}

/* Video Specific Styles */
.lightbox-video {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

    .lightbox-video::-webkit-media-controls-panel {
        background: rgba(20, 40, 80, 0.8);
        backdrop-filter: blur(10px);
    }

/* Caption Bar (Glassmorphism) */
.lightbox-caption {
    position: absolute;
    bottom: clamp(10px, 2vh, 20px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 40, 80, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: var(--spacing-sm) var(--spacing-xl);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Lightbox Animations */
@keyframes lightboxZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Carousel Item Click Cursor */
.carousel-item.active {
    cursor: zoom-in;
}

.carousel-item img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.carousel-item.active:hover img {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* ============================================
   LIGHTBOX RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .lightbox-container {
        width: 95vw;
        height: 85vh;
    }

    .lightbox-media-wrapper {
        padding: 70px 30px 90px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
    }

    .lightbox-close {
        width: 50px;
        height: 50px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .lightbox-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-width: none;
    }

    .lightbox-media-wrapper {
        padding: 80px 15px 100px;
    }

    .lightbox-close {
        top: var(--safe-area-top, 10px);
        right: 10px;
        width: 44px;
        height: 44px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        bottom: calc(var(--safe-area-bottom, 10px) + 10px);
        padding: var(--spacing-xs) var(--spacing-lg);
        font-size: var(--font-size-xs);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .lightbox-media-wrapper {
        padding: 70px 10px 90px;
    }

    .lightbox-close,
    .lightbox-nav {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

        .lightbox-close svg,
        .lightbox-nav svg {
            width: 20px;
            height: 20px;
        }
}

/* Prevent scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Accessibility */
.lightbox[aria-hidden="true"] {
    pointer-events: none;
}

.lightbox[aria-hidden="false"] {
    pointer-events: auto;
}

/* Performance optimization for mobile */
@media (hover: none) and (pointer: coarse) {
    .lightbox-container {
        will-change: transform;
    }

    .lightbox-media {
        will-change: transform;
    }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: clamp(20px, 3vh, 30px);
    right: clamp(20px, 3vw, 30px);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.95), rgba(32, 176, 86, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: whatsappSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both, whatsappPulse 2s ease-in-out 2s infinite;
    overflow: hidden;
}

    .whatsapp-float::before {
        content: '';
        position: absolute;
        inset: -50%;
        background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        transition: transform 0.6s;
    }

    .whatsapp-float:hover::before {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }

    .whatsapp-float:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 12px 48px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.2);
    }

    .whatsapp-float:active {
        transform: translateY(-3px) scale(1.02);
    }

/* Icon Container */
.whatsapp-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: whatsappIconSpin 3s ease-in-out infinite;
}

    .whatsapp-icon svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

/* Text Label */
.whatsapp-text {
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Pulse Ring */
.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    border: 2px solid rgba(37, 211, 102, 0.8);
    animation: whatsappPulseRing 2s ease-out infinite;
    pointer-events: none;
}

/* Animations */
@keyframes whatsappSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    50% {
        box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5), 0 0 0 4px rgba(37, 211, 102, 0.3);
    }
}

@keyframes whatsappPulseRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes whatsappIconSpin {
    0%, 90%, 100% {
        transform: rotate(0deg);
    }

    95% {
        transform: rotate(15deg);
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .whatsapp-float {
        padding: var(--spacing-sm);
        border-radius: 50%;
        width: 56px;
        height: 56px;
        bottom: clamp(15px, 2vh, 20px);
        right: clamp(15px, 3vw, 20px);
    }

    .whatsapp-text {
        display: none;
    }

    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: calc(var(--safe-area-bottom, 10px) + 10px);
        right: 15px;
    }

    .whatsapp-icon {
        width: 26px;
        height: 26px;
    }
}

/* Hide on lightbox open */
.lightbox.active ~ .whatsapp-float {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100px);
}

/* Ensure button stays above most elements but below modals */
@media (hover: none) and (pointer: coarse) {
    .whatsapp-float {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Accessibility */
.whatsapp-float:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

/* ============================================
   MAGNETIC HOVER FIX (ELIMINATING DEAD ZONES)
   ============================================ */

.reference-item {
    /* 1. Change overflow to visible so the hidden hitbox can extend past the borders */
    overflow: visible !important;
    position: relative;
}

    /* 2. Create the invisible expanded hover hitbox */
    .reference-item::after {
        content: '';
        position: absolute;
        /* Span vertically past the item to catch the mouse early */
        top: -20px;
        bottom: -20px;
        /* Reach exactly halfway into the desktop gap layout */
        left: calc(var(--spacing-xl) / -2);
        right: calc(var(--spacing-xl) / -2);
        background: transparent; /* Keep it completely invisible */
        z-index: 1; /* Ensures it registers the hover raycast */
    }

    /* 3. Ensure the inner elements don't block pointer interactions */
    .reference-item img,
    .reference-item::before {
        pointer-events: none;
    }