/* Landing Page & Map Structure - DO NOT MODIFY WITHOUT CONSULTING THE USER */
/* globals.css - Core Design System & Global Elements */

:root {
    --primary: #10b981;
    --primary-light: #34d399;
    --dark: #020617;
    --dark-lighter: #0f172a;
    --light: #f8fafc;
    --accent: #3b82f6;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.05);
    --glass: rgba(15, 23, 42, 0.7);
    --gold: #f59e0b;
}

.theme-light,
.light-mode {
    --primary: #059669;
    --dark: #f8fafc;
    --light: #0f172a;
    --dark-lighter: #ffffff;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --glass: rgba(255, 255, 255, 0.85);
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Nav */
header {
    padding: 1.2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.theme-light header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.logo {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    letter-spacing: -0.02em;
}

.nav-links { align-items: center;
    display: flex;
    gap: 2.5rem; /* Slightly reduced gap for better responsiveness */
    align-items: center;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.7;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.theme-light .nav-links a {
    color: #1e293b;
    opacity: 0.8;
}

.theme-light .nav-links a:hover {
    color: var(--primary);
    opacity: 1;
}

.nav-dropdown-trigger { line-height: normal;
    color: #f59e0b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: normal; /* Fix for baseline shifts */
}

.nav-dropdown-trigger .material-icons {
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    padding: 1.2rem 2.8rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 10px 20px -10px rgba(16, 185, 129, 0.5);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.6);
    background: var(--primary-light);
}

.btn-glass {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--light);
    backdrop-filter: blur(5px);
}

.btn-glass:hover {
    background: var(--border);
    border-color: var(--primary);
}

.theme-light .btn-glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--dark);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
    font-size: 1rem;
}

/* Dropdowns & User Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--dark-lighter);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.5rem;
    width: 200px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.dropdown-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--primary);
    color: var(--dark) !important;
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Footer */
footer {
    padding: 4rem 10%;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.theme-light footer {
    background: #f1f5f9;
    color: #475569;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    z-index: 9999;
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: calc(100% - 4rem);
}

#cookie-banner .cookie-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

#cookie-banner .cookie-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
}

#cookie-banner .cookie-content p a {
    color: var(--primary);
    text-decoration: underline;
}

#cookie-banner .cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.theme-light #cookie-banner {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.theme-light #cookie-banner .cookie-content h4 {
    color: #0f172a;
}

.theme-light #cookie-banner .cookie-content p {
    color: #475569;
}

/* Legal Overlay */
#legal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

#legal-overlay.active {
    display: flex;
}

.legal-modal {
    background: var(--dark-lighter);
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 32px;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.legal-header {
    padding: 2rem 3rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-body {
    padding: 3rem;
    overflow-y: auto;
    color: var(--light);
    line-height: 1.7;
}

.close-legal {
    background: var(--border);
    color: var(--light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Hamburger Button (Hidden on Desktop) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    z-index: 2000;
}

.theme-light .hamburger-btn {
    color: #0f172a;
}

/* Material Icons Support */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    header {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.15rem;
    }

    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -110%; /* Ensure it's fully off-screen */
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--dark-lighter);
        flex-direction: column;
        padding: 6rem 1.5rem 3rem;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Smoother premium transition */
        box-shadow: -15px 0 50px rgba(0,0,0,0.4);
        z-index: 1001;
        gap: 0.8rem;
        overflow-y: auto;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .theme-light .nav-links {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: -15px 0 50px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a, 
    .nav-dropdown-trigger { 
        font-size: 1.1rem;
        width: 100%;
        padding: 0.8rem 1rem;
        opacity: 1;
        border-radius: 12px;
        transition: 0.2s;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        color: var(--light);
        gap: 1rem;
    }

    .theme-light .nav-links a,
    .theme-light .nav-dropdown-trigger {
        color: #1e293b;
    }

    .nav-links a:active,
    .nav-dropdown-trigger:active {
        background: rgba(16, 185, 129, 0.1);
        color: var(--primary);
    }

    #auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 1.5rem;
        padding: 0 0.5rem;
        gap: 1rem;
    }

    #auth-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    .dropdown-container, 
    .user-menu,
    .notifications-trigger {
        width: 100%;
        justify-content: flex-start;
        margin: 0 !important;
        padding: 0.6rem 1rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border);
    }

    .theme-light .user-menu,
    .theme-light .dropdown-container,
    .theme-light .notifications-trigger {
        background: rgba(0, 0, 0, 0.03);
    }

    #user-profile-menu {
        margin-top: auto !important; /* Push user profile to bottom of menu */
        border: 1px solid var(--primary);
        background: rgba(16, 185, 129, 0.05);
    }

    .nav-dropdown {
        position: static;
        width: 100% !important;
        background: rgba(255,255,255,0.02);
        margin: 0.5rem 0;
        display: none;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem; /* Indent sub-items */
    }

    .theme-light .nav-dropdown {
        background: rgba(0,0,0,0.02);
    }

    .nav-dropdown.show {
        display: flex;
    }

    #lang-dropdown-container {
        order: -2; /* Lang switcher at the very top */
        margin-bottom: 2rem !important;
        background: transparent;
        border: none;
        padding: 0;
    }

    #lang-curr-trigger {
        width: fit-content;
        background: var(--border);
    }


    footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    #cookie-banner {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }

    #cookie-banner .cookie-buttons {
        width: 100%;
    }

    #cookie-banner .cookie-buttons button {
        flex: 1;
    }
}

/* Ad Spaces - Internal Reservation */
.ad-slot {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    display: none; /* Reserved internally, not visible yet */
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 120px; /* Preliminary height reservation for standard banner */
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ad-slot.active {
    display: flex;
}
