/* --- BRAND COLORS --- */
:root {
    --brand-purple: #7b00e0;
    --brand-blue: #0044cc;
    --neon-purple: #bd00ff;
    --neon-blue: #246bfd;
    --neon-cyan: #00f3ff;
    --bg-deep: #050511;
}

body {
    background-color: var(--bg-deep);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
.font-heading {
    font-family: 'Montserrat', sans-serif;
}

/* --- GRADIENTS & TEXT --- */
.text-gradient-logo {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--brand-blue) 45%, var(--neon-cyan) 55%, var(--brand-blue) 65%, var(--neon-purple) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 15s linear infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* --- UI ELEMENTS --- */
.glass-panel {
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.neon-border-card {
    border: 1px solid rgba(123, 0, 224, 0.5);
    box-shadow: 0 0 15px rgba(123, 0, 224, 0.1);
    transition: all 0.3s ease;
}

.neon-border-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 25px rgba(36, 107, 253, 0.3);
}

/* Floating Dock Menu */
.nav-dock {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    padding: 1.5rem 0.8rem;
}

.nav-item {
    position: relative;
}

.nav-item::before {
    content: attr(title);
    position: absolute;
    right: 140%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-shadow: 0 1px 2px black;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.nav-icon {
    transition: all 0.4s ease;
    color: rgba(255, 255, 255, 0.4);
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
    #product .glass-panel .grid {
        display: flex;
        flex-direction: column-reverse;
        /* Image Top */
        gap: 1.5rem;
        /* Gap under image / above text */
    }

    /* Stack Logo and Text */
    #product .glass-panel .p-8 .flex-row {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .logo-xr {
        margin: 0 auto;
    }

    /* Lightbox Mobile Adjustments */
    #lightbox-content {
        height: 100%;
        border-radius: 0;
    }
}

.nav-icon:hover {
    color: white;
    transform: scale(1.1);
}

.nav-icon.active {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 8px var(--neon-blue));
    transform: scale(1.2);
    /* Extra glow requested */
    text-shadow: 0 0 10px var(--neon-blue);
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
    #product .glass-panel .grid {
        display: flex;
        flex-direction: column-reverse;
        /* Image Top */
        gap: 1.5rem;
        /* Gap under image / above text? 
                       If column-reverse: Image (top) -> Gap -> Text (bottom).
                   */
    }
}

/* --- ANIMATIONS --- */
.reveal-repeat {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-repeat.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-once {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;
}

.reveal-once.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- FEATURE CARDS --- */
.feature-card {
    background: #11111e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: #1a1a2e;
    border-color: var(--brand-blue);
    transform: translateX(10px);
}

/* --- GALLERY GRID --- */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media(min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 350px;
    }

    .grid-span-2 {
        grid-column: span 2;
    }

    .grid-span-1 {
        grid-column: span 1;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.gallery-item img {
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.7s ease;
}

.gallery-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.slide-indicators {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    display: flex;
    gap: 2px;
}

.indicator-segment {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    height: 100%;
}

.indicator-segment.active {
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

/* --- MAP ELEMENTS --- */
.map-beacon {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(36, 107, 253, 0.3);
    cursor: pointer;
    transition: transform 0.3s;
}

.map-beacon:hover,
.group.active .map-beacon {
    transform: scale(1.4);
    background: white;
}

.map-beacon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--neon-blue);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}

.map-tooltip {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(5, 5, 20, 0.95);
    border: 1px solid var(--neon-blue);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: white;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 0 20px rgba(36, 107, 253, 0.3);
    text-align: center;
}

.group:hover .map-tooltip,
.group.active .map-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- BUTTONS --- */
.neon-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.neon-btn:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(36, 107, 253, 0.4);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.loc-btn {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.3s;
}

.loc-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Scale Video to ALWAYS COVER container */
.hero-video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    /* scale(1.2) pushes YouTube's title bar (top) and logo (bottom-right) outside the cropped container */
    transform: translate(-50%, -50%) scale(1.2);
    /* CSS Aspect Ratio Hack for formatting:
       If screen is wider than 16/9, width=100vw, height=auto (but min-height 100vh) 
       Actually, standard object-fit simulation: */
    min-width: 100%;
    min-height: 100%;

    /* If screen is ultra-wide */
    @media (min-aspect-ratio: 16/9) {
        height: 56.25vw;
        width: 100vw;
    }

    /* If screen is tall */
    @media (max-aspect-ratio: 16/9) {
        width: 177.78vh;
        height: 100vh;
    }
}

.map-edge-gradient {
    background: linear-gradient(to bottom, #050511 0%, transparent 15%, transparent 85%, #050511 100%);
}

/* Key Features Icon Glow - Trigger on CARD hover */
.feature-card:hover .feature-icon-glow {
    transform: scale(1.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Specific Colors */
.feature-card:hover .feature-icon-glow.text-blue-400 {
    filter: drop-shadow(0 0 12px #3b82f6);
    /* Blue-500 */
}

.feature-card:hover .feature-icon-glow.text-purple-400 {
    filter: drop-shadow(0 0 12px #a855f7);
    /* Purple-500 */
}

/* Local hero video: always cover the hero, cropping the overflow */
.hero-video-local {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- FADE IN FOR VIDEO --- */
#hero-video-container {
    transition: opacity 2s ease-in-out;
    opacity: 0;
}

#hero-video-container.loaded {
    opacity: 1;
}

.logo-xr {
    max-width: 14rem;
}

/* --- ALLIES MARQUEE --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* --- ALLIES MARQUEE --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    width: fit-content;
    animation: marquee 200s linear infinite;
    /* 30% Slower than 160s approx */
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ally-item {
    flex: 0 0 auto;
    width: calc(100vw / 2);
    /* Mobile: 2 items */
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 2-line text ellipsis */
.ally-item p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 2.4em;
    /* 1.2 * 2 */
}

/* Remove border/bg from logo container if present, handled in JS generation usually or here if hardcoded */
.ally-logo-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

@media(min-width: 768px) {
    .ally-item {
        width: calc(100vw / 3);
        /* Tablet: 3 items */
    }
}

@media(min-width: 1024px) {
    .ally-item {
        width: calc(100vw / 5);
        /* Desktop: 5 items */
    }
}

/* --- FILTERS --- */
.filter-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    transition: all 0.3s ease;
}

@media(min-width: 1024px) {

    /* Success Stories Filters ONLY - applied via class later or precise selector */
    #projects-filters .filter-btn {
        min-width: 170px;
        text-align: center;
        justify-content: center;
    }
}

.filter-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-blue);
}

.filter-btn.active {
    background: var(--brand-blue);
    /* Solid Blue BG */
    color: white;
    border-color: var(--brand-blue);
    box-shadow: 0 0 15px rgba(0, 68, 204, 0.4);
}

/* Remove the underline style */
.filter-btn.active::after {
    display: none;
}

/* Custom Scrollbar for Lightbox Description */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #3b82f6;
    border-radius: 9999px;
}

/* Ally Logo Custom Style */
.ally-logo-styled {
    filter: brightness(0) invert(1) saturate(1);
    transition: filter 0.3s ease-in-out;
}

.ally-item:hover .ally-logo-styled {
    filter: brightness(1.1) invert(0) saturate(1.1);
}

/* Splide Allies Carousel */
.splide__slide {
    width: 290px !important;
}

.ally-logo-container {
    width: 13rem !important;
}

.splide__track {
    overflow: visible !important;
}

/* --- SETTINGS DOCK: one pill holding the theme (day/night) and language buttons --- */
/* Same look as .nav-dock; its width matches the nav dock (desktop) and the menu button (mobile). */
.settings-dock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    padding: 0.5rem 0.45rem;
}

.settings-dock--sm {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    padding: 0.375rem;
}

.settings-dock__divider {
    width: 60%;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

/* Buttons inside the dock: no own circle, just the icon / label like the nav icons */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.4s ease;
}

.settings-dock--sm .theme-toggle {
    color: white;
}

.theme-toggle:hover {
    color: var(--neon-blue);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    transition: transform 0.5s ease, filter 0.4s ease;
}

.theme-toggle:hover svg {
    filter: drop-shadow(0 0 8px var(--neon-blue));
    transform: rotate(20deg);
}

/* Sun in dark mode (go to day), moon in light mode (go to night) */
.theme-toggle .icon-moon,
.theme-logo-light {
    display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun,
html[data-theme="light"] .theme-logo-dark {
    display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon,
html[data-theme="light"] .theme-logo-light {
    display: block;
}

/* --- LANGUAGE TOGGLE (EN / ES): same button as the theme toggle, with a text label --- */
.lang-toggle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.lang-toggle:hover {
    text-shadow: 0 0 8px var(--neon-blue);
}

/* Language menu: opens to the left of the settings dock on hover (desktop) or tap (touch, via .is-open) */
.lang-switch {
    position: relative;
}

.lang-switch__menu {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translate(8px, -50%);
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Invisible bridge over the gap so the menu stays open while the pointer travels to it */
.lang-switch__menu::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 16px;
}

.lang-switch:hover .lang-switch__menu,
.lang-switch:focus-within .lang-switch__menu,
.lang-switch.is-open .lang-switch__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
}

.lang-switch__option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease;
}

.lang-switch__option:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.lang-switch__option.is-active {
    color: var(--neon-blue);
    background: rgba(36, 107, 253, 0.15);
}

/* Smooth color swap only while switching themes */
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, fill 0.5s ease !important;
}

/* ============================================
   LIGHT MODE
   Same brand pinks/purples & blues, light surfaces.
   Nav dock + theme toggle stay dark on purpose.
   ============================================ */
html[data-theme="light"] {
    --bg-deep: #f5f6fb;
    --lt-surface-2: #eceef8;
    --lt-ink: #0e0f2a;
    --lt-muted: #4a4f6a;
    --lt-subtle: #767b95;
    --lt-line: rgba(14, 15, 42, 0.09);
    color-scheme: light;
}

html[data-theme="light"] body {
    color: var(--lt-ink);
}

/* Text utilities */
html[data-theme="light"] .text-white {
    color: var(--lt-ink);
}

html[data-theme="light"] .text-gray-300,
html[data-theme="light"] .text-gray-400 {
    color: var(--lt-muted);
}

html[data-theme="light"] .text-gray-500,
html[data-theme="light"] .text-gray-600 {
    color: var(--lt-subtle);
}

html[data-theme="light"] .text-blue-400 {
    color: var(--neon-blue);
}

html[data-theme="light"] .text-purple-400 {
    color: var(--brand-purple);
}

html[data-theme="light"] .hover\:text-white:hover {
    color: var(--lt-ink);
}

html[data-theme="light"] .hover\:text-blue-400:hover,
html[data-theme="light"] .group:hover .group-hover\:text-blue-400 {
    color: var(--neon-blue);
}

/* Buttons on solid brand fills keep white text */
html[data-theme="light"] .bg-gradient-to-r.text-white,
html[data-theme="light"] .bg-blue-600 {
    color: #fff;
}

/* Borders & backgrounds */
html[data-theme="light"] .border-white\/5,
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-white\/20 {
    border-color: var(--lt-line);
}

html[data-theme="light"] .border-blue-900 {
    border-color: rgba(0, 68, 204, 0.2);
}

html[data-theme="light"] .hover\:border-blue-500:hover {
    border-color: #3b82f6;
}

html[data-theme="light"] .bg-black\/20 {
    background-color: rgba(255, 255, 255, 0.6);
}

html[data-theme="light"] .bg-black\/40 {
    background-color: var(--lt-surface-2);
}

html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .hover\:bg-white\/5:hover {
    background-color: rgba(14, 15, 42, 0.05);
}

html[data-theme="light"] .bg-white\/10 {
    background-color: var(--lt-line);
}

/* Areas that stay dark (photos with dark overlays, dark buttons) */
html[data-theme="light"] .theme-dark-surface {
    color: #fff;
}

html[data-theme="light"] .theme-dark-surface .text-white,
html[data-theme="light"] .theme-dark-surface .hover\:text-white:hover {
    color: #fff;
}

html[data-theme="light"] .theme-dark-surface .text-blue-400 {
    color: #60a5fa;
}

html[data-theme="light"] .theme-dark-surface .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .theme-dark-surface .bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Panels & cards */
html[data-theme="light"] .glass-panel {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--lt-line);
    box-shadow: 0 12px 40px rgba(20, 20, 60, 0.08);
}

html[data-theme="light"] .neon-border-card {
    border-color: rgba(123, 0, 224, 0.35);
    box-shadow: 0 10px 40px rgba(123, 0, 224, 0.08);
}

html[data-theme="light"] .neon-border-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 10px 40px rgba(36, 107, 253, 0.18);
}

html[data-theme="light"] .feature-card {
    background: #fff;
    border-color: var(--lt-line);
    box-shadow: 0 4px 18px rgba(20, 20, 60, 0.05);
}

html[data-theme="light"] .feature-card:hover {
    background: #fbfaff;
    border-color: var(--brand-blue);
    box-shadow: 0 10px 40px rgba(36, 107, 253, 0.12);
}

html[data-theme="light"] .bg-\[\#161b33\] {
    background-color: #e9efff;
}

html[data-theme="light"] .bg-\[\#241333\] {
    background-color: #f3e9ff;
}

/* Filters */
html[data-theme="light"] .filter-btn {
    background: rgba(14, 15, 42, 0.04);
    border-color: rgba(14, 15, 42, 0.1);
    color: var(--lt-subtle);
}

html[data-theme="light"] .filter-btn:hover {
    color: var(--lt-ink);
    background: rgba(14, 15, 42, 0.07);
    border-color: var(--neon-blue);
}

html[data-theme="light"] .filter-btn.active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 68, 204, 0.25);
}

/* Hero */
html[data-theme="light"] #hero-video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 246, 251, 0.35);
    pointer-events: none;
}

html[data-theme="light"] .hero-fade {
    background-image: linear-gradient(to bottom, transparent, var(--bg-deep));
}

html[data-theme="light"] #hero h1 {
    filter: drop-shadow(0 4px 25px rgba(255, 255, 255, 0.8));
}

/* Allies: burned-out B/W logos, full color on hover */
html[data-theme="light"] .ally-logo-styled {
    filter: grayscale(1) contrast(0.85) brightness(1.1);
}

html[data-theme="light"] .ally-item:hover .ally-logo-styled {
    filter: grayscale(0) contrast(1) brightness(1);
}

/* Logos drawn for dark backgrounds (white text): flip lightness, keep hue */
html[data-theme="light"] .ally-logo-styled.ally-logo-invert {
    filter: invert(1) hue-rotate(180deg) grayscale(1) contrast(0.85) brightness(1.1);
}

html[data-theme="light"] .ally-item:hover .ally-logo-styled.ally-logo-invert {
    filter: invert(1) hue-rotate(180deg) grayscale(0) contrast(1) brightness(1);
}

/* Success Stories CTA */
html[data-theme="light"] .cta-story {
    background-color: #fff !important;
    border-color: var(--brand-purple);
    box-shadow: 0 8px 24px rgba(123, 0, 224, 0.12);
}

html[data-theme="light"] .cta-story:hover {
    color: var(--brand-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 25px rgba(36, 107, 253, 0.35);
}

/* Contact */
html[data-theme="light"] #contact {
    background-image: none !important;
}

html[data-theme="light"] #contact .glass-panel {
    border-color: rgba(0, 68, 204, 0.18);
    box-shadow: 0 20px 60px rgba(0, 68, 204, 0.1);
}

html[data-theme="light"] #contact-form input,
html[data-theme="light"] #contact-form select,
html[data-theme="light"] #contact-form textarea {
    background: #fff;
    border-color: rgba(14, 15, 42, 0.12);
}

html[data-theme="light"] #contact-form input:focus,
html[data-theme="light"] #contact-form select:focus,
html[data-theme="light"] #contact-form textarea:focus {
    border-color: var(--neon-blue);
}

/* Locations map & footer */
html[data-theme="light"] #map-dots-canvas {
    opacity: 0.35;
}

html[data-theme="light"] .map-edge-gradient {
    background: linear-gradient(to bottom, var(--bg-deep) 0%, transparent 15%, transparent 85%, var(--bg-deep) 100%);
}

html[data-theme="light"] .map-tooltip {
    background: rgba(255, 255, 255, 0.97);
    color: var(--lt-ink);
    box-shadow: 0 10px 30px rgba(36, 107, 253, 0.2);
}

html[data-theme="light"] .map-beacon:hover,
html[data-theme="light"] .group.active .map-beacon {
    background: var(--brand-purple);
}

html[data-theme="light"] .loc-btn:hover {
    background: rgba(14, 15, 42, 0.06);
    color: var(--lt-ink);
    text-shadow: none;
}

html[data-theme="light"] #locations footer {
    background: rgba(255, 255, 255, 0.7);
}

/* Mobile menu */
html[data-theme="light"] #mobile-menu-overlay {
    background: rgba(245, 246, 251, 0.97);
}

html[data-theme="light"] #mobile-menu-close {
    color: rgba(14, 15, 42, 0.5);
}

html[data-theme="light"] #mobile-menu-close:hover {
    color: var(--lt-ink);
}

/* Success modal */
html[data-theme="light"] #success-modal {
    background: rgba(14, 15, 42, 0.55);
}

html[data-theme="light"] #success-modal-content {
    background: #fff;
    border-color: rgba(36, 107, 253, 0.25);
    box-shadow: 0 20px 60px rgba(36, 107, 253, 0.2);
}

html[data-theme="light"] #success-modal-content>button:first-child {
    color: rgba(14, 15, 42, 0.45);
}

/* Lightbox: dark backdrop + image stage, light details sidebar */
html[data-theme="light"] #lightbox-content {
    background: #fff;
    border-color: var(--lt-line);
}

html[data-theme="light"] .lb-sidebar {
    background: #fff;
    border-color: var(--lt-line);
}

html[data-theme="light"] .lb-footer {
    background: #f6f7fc;
    border-color: var(--lt-line);
}

/* --- HERO ENTRANCE: pure CSS, starts with the first paint (no wait for JavaScript) -> fast LCP for Google --- */
.hero-enter {
    animation: hero-enter 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

.hero-enter--2 { animation-delay: 0.1s; }
.hero-enter--3 { animation-delay: 0.2s; }
.hero-enter--4 { animation-delay: 0.3s; }

@keyframes hero-enter {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-enter { animation: none; }
}

/* --- LANGUAGE HINT: discreet suggestion when the browser language has its own version (never redirects) --- */
.lang-hint {
    position: fixed;
    z-index: 70;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -12px);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100% - 32px);
    padding: 8px 8px 8px 18px;
    border-radius: 9999px;
    background: rgba(10, 10, 28, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #d1d5db;
    font: 13px/1.4 'Inter', sans-serif;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.lang-hint.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.lang-hint__go {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 9999px;
    background: linear-gradient(to right, #6b21a8, #1e40af);
    color: #fff;
    font: 700 12px 'Montserrat', sans-serif;
    text-decoration: none;
}

.lang-hint__close {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
}

.lang-hint__close:hover { opacity: 1; }

@media (max-width: 767px) {
    .lang-hint {
        left: 16px;
        right: 88px; /* leaves room for the menu button and settings on the right */
        max-width: none;
        border-radius: 16px;
        transform: translateY(-12px);
    }

    .lang-hint.is-visible { transform: none; }
    .lang-hint__text { flex: 1; }
}

html[data-theme="light"] .lang-hint {
    background: rgba(255, 255, 255, 0.96);
    color: #4a4f6a;
    border-color: rgba(14, 15, 42, 0.12);
    box-shadow: 0 8px 30px rgba(14, 15, 42, 0.15);
}

/* Contact form: tooltip with the field's name when its placeholder is gone (js/app.js initFieldTips) */
.field-tip {
    position: relative;
    display: block;
    width: 100%;
}

.field-tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 12px;
    bottom: calc(100% + 8px);
    z-index: 20;
    max-width: calc(100% - 24px);
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(10, 10, 28, 0.96);
    border: 1px solid rgba(96, 165, 250, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #e5e7eb;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.field-tip.has-value:hover::after {
    opacity: 1;
    transform: translateY(0);
}

html[data-theme="light"] .field-tip::after {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(29, 78, 216, 0.3);
    box-shadow: 0 6px 20px rgba(14, 15, 42, 0.15);
    color: #1f2340;
}
