/* 3. ENSURE HTML DOESN'T SCROLL SIDEWAYS EITHER */
html {
    overflow-x: hidden;
    width: 100vw;
}

/* Smooth Scroll */
/* html { 
    scroll-behavior: smooth; 
} */

/* Custom Scrollbar - Wider to prevent accidental snap-back */
::-webkit-scrollbar {
    width: 16px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5); /* Neutral Gray */
    border-radius: 20px;
    border: 4px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(107, 114, 128, 0.8);
}

/* Background Pattern Logic */
body {
    /* 1. HIDE CONTENT UNTIL LOADED (Fixes the messy flash) */
    opacity: 0;
    visibility: hidden;
    
    /* 2. PREVENT SIDE SCROLLING (Fixes the cut-off text) */
    overflow-x: hidden;
    width: 100%;
    position: relative;

    background-color: #ffffff;
    min-height: 100vh;
    transition: opacity 0.4s ease-in, background-color 0.3s ease, color 0.3s ease;
}

html.dark body {
    background-color: #000000; 
}

/* Text Shadow for Pattern Visibility */
.pattern-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
}
html.dark .pattern-text {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Doodle Pattern Visibility */
.bg-pattern {
    background-image: url('../images/Background.webp');
    background-size: 400px;
    background-repeat: repeat;
    background-position: center;
    animation: bgMove 120s linear infinite;
    transition: filter 0.5s ease;
}

@keyframes bgMove {
    0% { background-position: 0 0; }
    100% { background-position: 400px 400px; }
}

/* Light Mode: Black lines on White background */
html:not(.dark) .bg-pattern {
    filter: opacity(0.06); 
}

/* Dark Mode: White lines on Black background (Invert black lines to white) */
html.dark .bg-pattern {
    filter: invert(1) opacity(0.11);
}

/* Top Blur Gradient Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    z-index: 40;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.hide-top-blur::before {
    opacity: 0;
}

/* Theme Toggle Button Glow */
@keyframes themeGlow {
    0%, 100% { box-shadow: 0 0 5px var(--glow-color-start); }
    50% { box-shadow: 0 0 20px var(--glow-color-end); }
}
html:not(.dark) {
    --glow-color-start: rgba(0, 0, 0, 0.2);
    --glow-color-end: rgba(0, 0, 0, 0.4);
}
html.dark {
    --glow-color-start: rgba(255, 255, 255, 0.4);
    --glow-color-end: rgba(255, 255, 255, 0.8);
}

/* Icon Glow Effect */
.icon-glow {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}
html.dark .icon-glow {
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.8));
}

/* Theme Toggle Icon Glow */
.theme-icon-glow {
    filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.6));
    /* No glow in light mode */
    filter: none;
}
html.dark .theme-icon-glow {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* --- PREMIUM CARD GLOW EFFECTS --- */
.card-base {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    overflow: visible; /* Allow shadows to pop out */
}

@media (hover: hover) {
    .card-base:hover {
        z-index: 10; /* Bring to front on hover */
    }
}

/* Green Glow - Light Mode Pop & Deep Inner Shadow */
.glow-green { 
    /* Subtle Mint Tint + Strong Shadow + Deep Green Inner Shadow */
    background: linear-gradient(145deg, #ffffff, #ecfdf5) #ffffff; 
    box-shadow: 
        0 10px 15px -3px rgba(34, 197, 94, 0.1), 
        0 4px 6px -2px rgba(34, 197, 94, 0.05), 
        inset 0 5px 10px rgba(34, 197, 94, 0.1), 
        inset 0 15px 35px rgba(34, 197, 94, 0.05),
        inset 0 0 0 1px rgba(34, 197, 94, 0.2) !important;
}
html.dark .glow-green { 
    background: rgba(34, 197, 94, 0.05);
    box-shadow: inset 0 0 30px rgba(34, 197, 94, 0.15), 0 4px 20px rgba(0,0,0,0.5) !important; 
    border: 1px solid rgba(34, 197, 94, 0.2) !important; 
}

/* Yellow Glow - Light Mode Pop & Deep Inner Shadow */
.glow-yellow { 
    /* Subtle Yellow Tint + Shadow + Deep Yellow Inner Shadow */
    background: linear-gradient(145deg, #ffffff, #fefce8) #ffffff;
    box-shadow: 
        0 10px 15px -3px rgba(234, 179, 8, 0.1), 
        0 4px 6px -2px rgba(234, 179, 8, 0.05), 
        inset 0 5px 10px rgba(234, 179, 8, 0.1), 
        inset 0 15px 35px rgba(234, 179, 8, 0.05),
        inset 0 0 0 1px rgba(234, 179, 8, 0.2) !important;
}
html.dark .glow-yellow { 
    background: rgba(234, 179, 8, 0.05);
    box-shadow: inset 0 0 30px rgba(234, 179, 8, 0.15), 0 4px 20px rgba(0,0,0,0.5) !important; 
    border: 1px solid rgba(234, 179, 8, 0.2) !important; 
}

/* Red Glow - Light Mode Pop & Deep Inner Shadow */
.glow-red { 
    /* Subtle Red Tint + Shadow + Deep Red Inner Shadow */
    background: linear-gradient(145deg, #ffffff, #fef2f2) #ffffff;
    box-shadow: 
        0 10px 15px -3px rgba(220, 38, 38, 0.1), 
        0 4px 6px -2px rgba(220, 38, 38, 0.05), 
        inset 0 5px 10px rgba(220, 38, 38, 0.1), 
        inset 0 15px 35px rgba(220, 38, 38, 0.05),
        inset 0 0 0 1px rgba(220, 38, 38, 0.2) !important;
}
html.dark .glow-red { 
    background: rgba(220, 38, 38, 0.05);
    box-shadow: inset 0 0 30px rgba(220, 38, 38, 0.15), 0 4px 20px rgba(0,0,0,0.5) !important; 
    border: 1px solid rgba(220, 38, 38, 0.2) !important; 
}

/* Blue Glow - Light Mode Pop & Deep Inner Shadow */
.glow-blue { 
    /* Subtle Blue Tint + Shadow + Deep Blue Inner Shadow */
    background: linear-gradient(145deg, #ffffff, #eff6ff) #ffffff;
    box-shadow: 
        0 10px 15px -3px rgba(59, 130, 246, 0.1), 
        0 4px 6px -2px rgba(59, 130, 246, 0.05), 
        inset 0 5px 10px rgba(59, 130, 246, 0.1), 
        inset 0 15px 35px rgba(59, 130, 246, 0.05),
        inset 0 0 0 1px rgba(59, 130, 246, 0.2) !important;
}
html.dark .glow-blue { 
    background: rgba(59, 130, 246, 0.05);
    box-shadow: inset 0 0 30px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0,0,0,0.5) !important; 
    border: 1px solid rgba(59, 130, 246, 0.2) !important; 
}

/* Purple Glow - Light Mode Pop & Deep Inner Shadow */
.glow-purple {
    /* Subtle Purple Tint + Shadow + Deep Purple Inner Shadow */
    background: linear-gradient(145deg, #ffffff, #faf5ff) #ffffff;
    box-shadow: 
        0 10px 15px -3px rgba(168, 85, 247, 0.1), 
        0 4px 6px -2px rgba(168, 85, 247, 0.05), 
        inset 0 5px 10px rgba(168, 85, 247, 0.1), 
        inset 0 15px 35px rgba(168, 85, 247, 0.05),
        inset 0 0 0 1px rgba(168, 85, 247, 0.2) !important;
}
html.dark .glow-purple {
    background: rgba(168, 85, 247, 0.05);
    box-shadow: inset 0 0 30px rgba(168, 85, 247, 0.15), 0 4px 20px rgba(0,0,0,0.5) !important;
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
}

/* --- HOVER STATES (Desktop Only) --- */
@media (hover: hover) {
    .glow-green:hover { 
        background: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(34, 197, 94, 0.6) !important;
        transform: translateY(-4px); 
    }
    html.dark .glow-green:hover {
         background: #171717;
         border-color: rgba(34, 197, 94, 0.5) !important;
    }

    .glow-yellow:hover { 
        background: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(234, 179, 8, 0.6) !important;
        transform: translateY(-4px); 
    }
    html.dark .glow-yellow:hover {
         background: #171717;
         border-color: rgba(234, 179, 8, 0.5) !important;
    }

    .glow-red:hover { 
        background: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(220, 38, 38, 0.6) !important;
        transform: translateY(-4px); 
    }
    html.dark .glow-red:hover {
         background: #171717;
         border-color: rgba(220, 38, 38, 0.5) !important;
    }

    .glow-blue:hover { 
        background: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(59, 130, 246, 0.6) !important;
        transform: translateY(-4px); 
    }
    html.dark .glow-blue:hover {
         background: #171717;
         border-color: rgba(59, 130, 246, 0.5) !important;
    }

    .glow-purple:hover {
        background: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(168, 85, 247, 0.6) !important;
        transform: translateY(-4px);
    }
    html.dark .glow-purple:hover {
        background: #171717;
        border-color: rgba(168, 85, 247, 0.5) !important;
    }
}

/* --- NEW: Inner Shadow Style for Quick Links Bar --- */
.inner-glow-red {
    /* Light Mode: BLACK BACKGROUND with 3D feel */
    background: #0a0a0a;
    position: relative;
    box-shadow: 
        /* Outer Shadows (Lift) */
        0 20px 40px -5px rgba(0, 0, 0, 0.5), 
        0 8px 10px -6px rgba(0, 0, 0, 0.3),
        /* Inner Shadows (Depth/Thickness) */
        inset 0 1px 1px rgba(255,255,255,0.15), 
        inset 0 -10px 20px rgba(0,0,0,0.8), 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}
.inner-glow-red::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(220, 38, 38, 0.6), 
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

/* Ensure content sits above the glow */
.inner-glow-red > * {
    position: relative;
    z-index: 1;
}

html.dark .inner-glow-red {
    background: rgba(220, 38, 38, 0.05);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.5), 
        inset 0 4px 12px rgba(0,0,0,0.6), 
        inset 0 0 0 1px rgba(220, 38, 38, 0.2) !important;
}
html.dark .inner-glow-red::before {
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(220, 38, 38, 0.3), 
        transparent 40%
    );
}

@media (hover: hover) {
    .inner-glow-red:hover::before {
        opacity: 1;
    }
    .inner-glow-red:hover {
        transform: translateY(-2px);
        /* Enhanced outer shadow on hover */
        box-shadow: 
            0 30px 60px -12px rgba(0, 0, 0, 0.6), 
            inset 0 1px 1px rgba(255,255,255,0.2),
            inset 0 -10px 20px rgba(0,0,0,0.8),
            inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    }
}


.cursor-blink {
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Typing cursor style */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: #ef4444;
    margin-left: 2px;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- BLUR EFFECT FOR BODY CONTENT --- */
.blur-content {
    filter: blur(5px);
    transition: filter 0.3s ease-out;
    pointer-events: none; /* Prevent clicks on background */
    user-select: none;
}

/* --- MENU STAGGERED ANIMATION --- */
.menu-link-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-animate-open .menu-link-item {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger Delays */
.menu-animate-open .menu-link-item:nth-child(1) { transition-delay: 0.1s; }
.menu-animate-open .menu-link-item:nth-child(2) { transition-delay: 0.15s; }
.menu-animate-open .menu-link-item:nth-child(3) { transition-delay: 0.2s; }
.menu-animate-open .menu-link-item:nth-child(4) { transition-delay: 0.25s; }
.menu-animate-open .menu-link-item:nth-child(5) { transition-delay: 0.3s; }
.menu-animate-open .menu-link-item:nth-child(6) { transition-delay: 0.35s; }

/* Chat button delay */
.menu-animate-open .menu-chat-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.menu-chat-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* --- SCROLL REVEAL ANIMATION CLASSES (LEFT/RIGHT) --- */
.reveal-from-left {
    opacity: 0;
    transform: translateX(-100px);
    filter: blur(5px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal-from-right {
    opacity: 0;
    transform: translateX(100px);
    filter: blur(5px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
}

/* --- HERO FADE TRANSITION --- */
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 10;
}

/* Black and white on hover for the hero card (Desktop Only) */
@media (hover: hover) {
    .group:hover .hero-slide.active {
        filter: grayscale(100%) blur(0px);
        transition: filter 0.5s ease;
    }
}

/* Utility to hide scrollbar but keep functionality */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* View Transitions API for Theme Toggle */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

/* --- MARQUEE HOVER SWAP LOGIC (Desktop Only) --- */
@media (hover: hover) {
    /* Light Mode: Hover shows Dark Image */
    html:not(.dark) #marquee-container .group:hover img:nth-child(1) {
        display: none;
    }
    html:not(.dark) #marquee-container .group:hover img:nth-child(2) {
        display: block;
    }

    /* Dark Mode: Hover shows Light Image */
    html.dark #marquee-container .group:hover img:nth-child(1) {
        display: block;
    }
    html.dark #marquee-container .group:hover img:nth-child(2) {
        display: none;
    }
}

/* --- HERO FLOATING ICONS --- */
.hero-image-wrapper {
    position: relative;
    z-index: 20;
}
.hero-float-icon {
    position: absolute;
    z-index: 40;
    animation: floatIcon 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Stagger Animations */
.icon-tr { animation-delay: 0s; }
.icon-ml { animation-delay: 1.5s; }
.icon-mr { animation-delay: 3s; }
.icon-bl { animation-delay: 4.5s; }

/* Positioning Rules */
/* Mobile (Default) - Tucked/Overlapping */
.icon-tr { top: 50px; right: -10px; }
.icon-ml { top: 30%; left: -15px; }
.icon-mr { top: 65%; right: -15px; }
.icon-bl { bottom: 20px; left: -10px; }

/* Tablet (md) - Straddle Edge */
@media (min-width: 768px) {
    .icon-tr { top: 40px; right: -25px; }
    .icon-ml { top: 35%; left: -30px; }
    .icon-mr { top: 60%; right: -30px; }
    .icon-bl { bottom: 40px; left: -25px; }
}

/* Desktop (lg) - Push Outwards */
@media (min-width: 1280px) {
    .icon-tr { top: 30px; right: -50px; }
    .icon-ml { top: 25%; left: -60px; }
    .icon-mr { top: 70%; right: -60px; }
    .icon-bl { bottom: 50px; left: -50px; }
}

/* --- RIPPLE EFFECT --- */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 50;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* --- MOBILE PERFORMANCE PATCH --- */
@media screen and (max-width: 768px) {
    /* Stop background animation */
    .bg-pattern {
        animation: none !important;
        background-attachment: scroll !important;
    }
    /* Stop floating icons */
    .hero-float-icon {
        animation: none !important;
    }
    /* Remove heavy glows on mobile */
    .glow-green, .glow-red, .glow-yellow, .glow-blue, .glow-purple, .glow-pink, .glow-cyan {
        box-shadow: none !important;
        background: #ffffff !important;
    }

    /* Add colored strokes for light mode phone */
    .glow-green { border: 2px solid #bbf7d0 !important; }
    .glow-red { border: 2px solid #fecaca !important; }
    .glow-yellow { border: 2px solid #fde68a !important; }
    .glow-blue { border: 2px solid #bfdbfe !important; }
    .glow-purple { border: 2px solid #e9d5ff !important; }
    .glow-pink { border: 2px solid #fbcfe8 !important; }
    .glow-cyan { border: 2px solid #a5f3fc !important; }

    html.dark .glow-green, html.dark .glow-red, html.dark .glow-yellow, html.dark .glow-blue, html.dark .glow-purple, html.dark .glow-pink, html.dark .glow-cyan {
        background: #171717 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    /* Fix Floating Card (inner-glow-red) */
    .inner-glow-red {
        box-shadow: none !important;
        background: #0a0a0a !important;
    }
    html.dark .inner-glow-red {
        background: #171717 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    /* Disable blur filters */
    .blur-content, [class*="backdrop-blur"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* --- NEWSLETTER & POPUP STYLES --- */

/* Footer Newsletter Section */
.fuaprint-footer-newsletter {
    background-color: transparent;
    padding: 10px 0;
}

.fuaprint-footer-newsletter p {
    color: #888;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

/* The Input + Button Row */
.fuaprint-footer-newsletter .input-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* The Email Field */
.fuaprint-footer-newsletter input[type="email"] {
    width: 200px;
    padding: 6px 10px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    outline: none;
    transition: 0.3s;
    font-size: 0.8rem;
}

.fuaprint-footer-newsletter input:focus {
    border-color: #ffffff; /* White Glow */
}

/* The Subscribe Button */
.fuaprint-footer-newsletter button {
    padding: 6px 12px;
    background-color: #ffffff; /* White */
    color: #000; /* Black Text */
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
    font-size: 0.8rem;
}

.fuaprint-footer-newsletter button:hover {
    background-color: #e5e5e5; /* Light Gray */
    transform: translateY(-2px);
}

/* Mobile: Stack them vertically on phones */
@media (max-width: 600px) {
    .fuaprint-footer-newsletter button {
        width: auto;
    }
}

/* Pop-up Backdrop */
.popup-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px); /* Blur effect */
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* Pop-up Box */
.popup-content {
    background: #111;
    border: 1px solid #333;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.15); /* Green Glow */
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Typography */
.popup-content h3 { color: #fff; margin-bottom: 10px; font-size: 1.5rem; font-weight: 900; }
.popup-content p { color: #ccc; margin-bottom: 20px; line-height: 1.5; }
.tiny-text { font-size: 0.75rem; color: #555; margin-top: 15px; }

/* Inputs */
.popup-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
}

.popup-content button {
    width: 100%;
    padding: 12px;
    background: #00e676; /* Neon Green */
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.popup-content button:hover { background: #00c853; }

/* Close X */
.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Hide Header on Mobile Footer Intersection */
.header-hidden-mobile {
    transform: translate(-50%, -200%) !important; /* Maintain X centering, move Y up */
    opacity: 0;
    pointer-events: none;
}

/* --- OVERLAY BACKDROP --- */
.fua-overlay {
    /* display: none; Removed to allow transitions */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    
    /* Initial State for Animation */
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}

/* Active State for Overlay */
.fua-overlay.is-active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* --- THE CARD CONTAINER --- */
.fua-card {
    display: flex;
    width: 90%;
    max-width: 750px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative; /* Essential for button positioning */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    
    /* Initial State for Card Animation */
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active State for Card */
.fua-overlay.is-active .fua-card {
    opacity: 1;
    transform: translateY(0);
}

/* --- THE CLOSE BUTTON (RED CIRCLE FIX) --- */
.fua-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;       /* Fixed width */
    height: 36px;      /* Fixed height */
    border-radius: 50%; /* Makes it a circle */
    background-color: #D32F2F; /* Brand Red */
    border: 2px solid #fff;
    color: white;
    font-size: 24px;
    line-height: 1; /* Centers the X vertically */
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the X horizontally */
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s ease;
    padding: 0; /* Removes default button padding */
}

.fua-close-btn:hover {
    transform: scale(1.1);
    background-color: #b71c1c;
}

/* --- LEFT SIDE: IMAGE --- */
.fua-image-side {
    width: 45%;
    position: relative;
    aspect-ratio: 4 / 5;
}

.fua-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- RIGHT SIDE: CONTENT --- */
.fua-content-side {
    width: 55%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.fua-content-side h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 800;
    text-transform: none;
    line-height: 1;
}

.fua-content-side p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* INPUTS */
.fua-input-group {
    margin-bottom: 10px;
}

.fua-input-group input {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    text-align: left;
}

.fua-input-group input:focus {
    border-color: #D32F2F;
    outline: none;
}

/* SUBMIT BUTTON */
.fua-submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #D32F2F;
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: background 0.3s;
    margin-top: 10px;
}

.fua-submit-btn:hover {
    background-color: #fff;
    color: #D32F2F;
}

.fua-disclaimer {
    font-size: 0.8rem;
    color: #666;
    margin-top: 20px;
    text-align: center;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .fua-card {
        flex-direction: column;
        width: 90%;
        max-width: 350px;
    }
    .fua-image-side, .fua-content-side {
        width: 100%;
    }
    .fua-image-side {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .fua-content-side {
        padding: 25px;
    }
}

/* Fix Brevo Chat Z-Index & Touch Events to ensure it's clickable on mobile */
#brevo-conversations-widget-wrapper,
#sib-conversations-widget-wrapper {
    z-index: 2147483647 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    position: fixed !important;
}

/* Ensure iframe inside the widget is also clickable */
#brevo-conversations-widget-wrapper iframe,
#sib-conversations-widget-wrapper iframe {
    pointer-events: auto !important;
    touch-action: manipulation !important;
}