/* Smooth Scroll */
html { 
    scroll-behavior: smooth; 
}

/* Background Pattern Logic */
body {
    background-color: #ffffff;
    min-height: 100vh;
    transition: 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;
}

@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);
}

/* --- PREMIUM CARD GLOW EFFECTS --- */
.card-base {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* --- PROFESSIONAL POP CARD STYLES --- */
.card-pop {
    background-color: #ffffff;
    border: 1px solid #cbd5e1; /* slate-300 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html.dark .card-pop {
    background-color: #131313; 
    border: 1px solid #2d2d2d; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.card-pop:hover {
    transform: translateY(-6px);
    border-color: rgba(220, 38, 38, 0.4); 
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(220, 38, 38, 0.1); 
}

html.dark .card-pop:hover {
    background-color: #171717;
    border-color: rgba(220, 38, 38, 0.6); 
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(220, 38, 38, 0.15); 
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Modal Animation */
.modal-overlay { 
    transition: opacity 0.4s ease; 
}
.modal-content { 
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease; 
}

.modal-hidden { 
    visibility: hidden; 
    pointer-events: none; 
}
.modal-hidden .modal-overlay { 
    opacity: 0; 
}
.modal-hidden .modal-content { 
    transform: scale(0.95) translateY(20px); 
    opacity: 0; 
}

/* Modal Scrollbar */
.modal-scroll::-webkit-scrollbar {
    width: 6px;
}
.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.modal-scroll::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 20px;
}
.dark .modal-scroll::-webkit-scrollbar-thumb {
    background-color: #262626;
}

/* Glassmorphism for Modal */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.dark .glass-panel {
    background: rgba(23, 23, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* View Transitions API for Theme Toggle */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

/* --- 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;
}

/* Theme Toggle Button Glow */
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);
}

/* Theme Toggle Icon Glow */
.theme-icon-glow {
    filter: none;
}
html.dark .theme-icon-glow {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* --- MOBILE PERFORMANCE PATCH --- */
@media screen and (max-width: 768px) {
    /* Stop background animation */
    .bg-pattern {
        animation: none !important;
        background-attachment: scroll !important;
    }
    /* Remove heavy glows/shadows on mobile cards */
    .card-pop, .card-base {
        box-shadow: none !important;
        transform: none !important;
    }

    /* Mobile Borders for Visibility */
    .card-pop, .card-base {
        border: 1px solid rgba(0, 0, 0, 0.3) !important; /* Dark grey stroke for light mode */
    }
    html.dark .card-pop, html.dark .card-base {
        border: 1px solid rgba(255, 255, 255, 0.15) !important; /* Lighter stroke for dark mode */
    }

    /* Disable blur filters */
    .blur-content, [class*="backdrop-blur"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* 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;
}

/* Price Pulse Animation */
@keyframes pricePulseLight {
    0%, 100% { color: #16a34a; } /* green-600 */
    50% { color: #000000; } /* black */
}
@keyframes pricePulseDark {
    0%, 100% { color: #22c55e; } /* green-500 */
    50% { color: #ffffff; } /* white */
}
.animate-price-pulse { animation: pricePulseLight 3s infinite ease-in-out; }
.dark .animate-price-pulse-dark { animation: pricePulseDark 3s infinite ease-in-out; }

/* --- NEWSLETTER STYLES --- */
.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;
    justify-content: center;
}

/* 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);
}