/* uep-header.css - Modernized Header & Mobile Menu */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --uep-orange: #EE711A;
    --uep-purple: #6B2A7B;
    --uep-dark: #19221A;
    --uep-light-text: #ffffff;
    --uep-gray-100: #f8f9fa;
    --uep-gray-200: #e9ecef;
    --uep-gray-300: #dee2e6;
    --uep-gray-600: #6c757d;
    --uep-gray-700: #495057;
    --uep-gray-800: #343a40;
    --page-bg: #f4f6f9;
    --card-bg: #ffffff;
    --text-primary: var(--uep-dark);
    --text-secondary: var(--uep-gray-700);
    --icon-color: var(--uep-gray-600);
    --button-bg: var(--uep-purple);
    --button-text: var(--uep-light-text);
    --card-shadow: 0 4px 12px rgba(var(--uep-dark-rgb, 25, 34, 26), 0.06);
    --image-border-color: var(--uep-gray-200);
    --link-color: var(--uep-orange);
    --link-hover-color: #d6600f;
    --banner-overlay-color: rgba(var(--uep-dark-rgb, 25, 34, 26), 0.65);
    --filter-header-bg: var(--uep-gray-100);
    --filter-options-bg: var(--card-bg);
    --filter-border-color: var(--uep-gray-300);

    --uep-orange-rgb: 238, 113, 26;
    --uep-purple-rgb: 107, 42, 123;
    --uep-dark-rgb: 25, 34, 26;
    --text-primary-rgb: var(--uep-dark-rgb);
    --card-bg-rgb: 255, 255, 255;
    --link-color-rgb: var(--uep-orange-rgb);
    --font-primary: 'Poppins', sans-serif;
}

body.dark-mode {
    --page-bg: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --icon-color: var(--uep-gray-600);
    --button-bg: var(--uep-orange);
    --button-text: var(--uep-light-text);
    --card-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
    --image-border-color: #333333;
    --link-color: var(--uep-orange);
    --link-hover-color: #ff852b;
    --banner-overlay-color: rgba(0, 0, 0, 0.8);
    --filter-header-bg: #333333;
    --filter-options-bg: var(--card-bg);
    --filter-border-color: #444444;
    --text-primary-rgb: 240, 240, 240;
    --card-bg-rgb: 30, 30, 30;
}

body {
    font-family: var(--font-primary);
}

/* Base Header */
.header {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(1200px, 92vw);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    padding: 12px 28px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

body.dark-mode .header {
    background: rgba(26, 26, 26, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .header.scrolled {
    background: rgba(26, 26, 26, 0.95);
}

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.left-nav, .right-nav {
    flex: 1;
}

.left-nav { display: flex; justify-content: flex-start; }
.right-nav { display: flex; justify-content: flex-end; }

/* Logo */
.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 10;
}

.logo-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Desktop Menu Items */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.8;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--uep-orange);
    background: rgba(238, 113, 26, 0.08);
    opacity: 1;
}

/* Explore Button */
.explore-btn {
    background: linear-gradient(135deg, var(--uep-orange), #ff9f43);
    color: white !important;
    border: none;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    font-weight: 600;
    opacity: 1 !important;
    box-shadow: 0 4px 15px rgba(238, 113, 26, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(238, 113, 26, 0.4);
    background: linear-gradient(135deg, var(--uep-orange), #ff9f43) !important;
}

/* Dropdown (Desktop) */
.dropdown-item-wrapper { position: relative; }
.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 10px;
    z-index: 10001;
    list-style: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .dropdown-menu-custom {
    background: rgba(30, 30, 30, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.dropdown-menu-custom.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item-custom {
    display: block;
    padding: 10px 15px !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    margin-bottom: 2px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

body.dark-mode .dropdown-item-custom {
    color: #e0e0e0 !important;
}

.dropdown-item-custom:hover {
    background: var(--uep-gray-100) !important;
    color: var(--uep-orange) !important;
    transform: translateX(5px);
}

body.dark-mode .dropdown-item-custom:hover {
    background: rgba(238, 113, 26, 0.15) !important;
    color: var(--uep-orange) !important;
}

/* -------------------------------------------------------------------------- */
/* MODERN MOBILE MENU STYLE START                                            */
/* -------------------------------------------------------------------------- */

/* Animated Hamburger Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 99999; /* Highest z-index to stay on top of overlay */
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.hamburger-box {
    width: 24px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

.hamburger-inner::before, .hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 4px;
    position: absolute;
    content: "";
    display: block;
    transition-property: transform, opacity;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

.hamburger-inner::before { top: -8px; }
.hamburger-inner::after { bottom: -8px; }

/* Active State (X Icon) */
.menu-toggle.active .hamburger-inner {
    transform: rotate(45deg);
}
.menu-toggle.active .hamburger-inner::before {
    top: 0;
    opacity: 0;
}
.menu-toggle.active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
}

/* Full Screen Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99998; /* Just below hamburger */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .mobile-nav-overlay {
    background: rgba(18, 18, 18, 0.95);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.mobile-nav-content {
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px 30px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.mobile-nav-overlay.active .mobile-nav-content {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Profile Card */
.mobile-profile-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--uep-gray-200);
}

.profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--uep-orange);
}

.profile-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Mobile Links */
.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link-mobile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-link-mobile .icon {
    font-size: 20px;
    color: var(--uep-gray-600);
    width: 24px;
    display: flex;
    justify-content: center;
}

.nav-link-mobile:hover, .nav-link-mobile.active {
    background: #fff5eb;
    color: var(--uep-orange);
    transform: scale(1.02);
    border-color: rgba(238, 113, 26, 0.2);
    box-shadow: 0 4px 12px rgba(238, 113, 26, 0.1);
}

body.dark-mode .nav-link-mobile:hover, body.dark-mode .nav-link-mobile.active {
    background: rgba(238, 113, 26, 0.12);
    color: var(--uep-orange);
    border-color: rgba(238, 113, 26, 0.25);
}

.nav-link-mobile:hover .icon, .nav-link-mobile.active .icon {
    color: var(--uep-orange);
}

/* Accordion (Categories) */
.mobile-accordion {
    width: 100%;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    transition: all 0.2s ease;
}

.accordion-toggle .arrow {
    margin-left: auto;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.accordion-toggle.active {
    background: #fff5eb;
    color: var(--uep-orange);
}

body.dark-mode .accordion-toggle.active {
    background: rgba(238, 113, 26, 0.12);
    color: var(--uep-orange);
}

.accordion-toggle.active .arrow {
    transform: rotate(180deg);
}

.accordion-toggle.active .icon {
    color: var(--uep-orange);
}

.accordion-content {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 15px 0 15px 55px;
}

.accordion-content.show {
    display: flex;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.accordion-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 8px 0;
    transition: 0.2s;
}

.accordion-link:hover {
    color: var(--uep-orange);
    padding-left: 5px;
}

/* Auth Buttons Mobile */
.mobile-auth-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-mobile-auth {
    flex: 1;
    padding: 15px;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s;
}

.btn-mobile-auth.login {
    background: var(--uep-gray-200);
    color: var(--text-primary);
}

body.dark-mode .btn-mobile-auth.login {
    background: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

.btn-mobile-auth.register {
    background: var(--uep-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(238, 113, 26, 0.3);
}

.btn-mobile-auth.logout {
    background: #fee2e2;
    color: #ef4444;
}

body.dark-mode .btn-mobile-auth.logout {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Responsive Trigger */
@media (max-width: 991.98px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        transform: none !important;
        border-radius: 0;
        padding: 15px 20px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        border: none;
        display: flex;
        justify-content: space-between;
    }

    .menu-toggle { display: block; order: 1; }
    .logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; order: 2; }
    .left-nav, .right-nav { display: none; }
    
    /* Hide header background when menu is active for cleaner look */
    body.menu-open .header {
        background: transparent;
        box-shadow: none;
        border: none;
    }
}