/* =====================================================
   HEADER – Minimal & Aesthetic (Desktop + Mobile)
   ===================================================== */

/* ---------- Global Header ---------- */
#header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(11, 9, 24, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}
#header.hide-header {
    transform: translateY(-100%);
}


/* ---------- Logo ---------- */
.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 80px;
}
.logo-img {
    max-width: 100%;
    height: auto;
}

/* ---------- Desktop Navbar ---------- */
.navbar{
    margin-left: -10px;
}
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.6rem 1.2rem !important;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}
.navbar-nav .nav-link.active {
    background: var(--primary);
    color: #fff !important;
}

/* ---------- Dropdowns ---------- */
.dropdown-menu {
    background: rgba(11, 9, 24, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
}
.dropdown-item i,
.dropdown-item img {
    width: 18px;
    text-align: center;
}
.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.06);
}

/* Scrollable dropdown (categories) */
.dropdown-menu-scrollable {
    max-height: 300px;
    overflow-y: auto;
}
.dropdown-menu-scrollable::-webkit-scrollbar {
    width: 4px;
}
.dropdown-menu-scrollable::-webkit-scrollbar-track {
    background: transparent;
}
.dropdown-menu-scrollable::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* ---------- Language Selector ---------- */
.language-selector .dropdown-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 0.3rem 1rem;
    font-size: 0.9rem;
}
.language-selector .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- Auth Buttons ---------- */
.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* ---------- Search Toggle & Overlay ---------- */
.nav-icon-btn {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3rem;
    padding: 0.3rem 0.5rem;
    transition: color 0.3s;
}
.nav-icon-btn:hover {
    color: #fff;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 9, 24, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.search-overlay.active {
    display: flex;
}
.search-form {
    width: 90%;
    max-width: 600px;
    position: relative;
}
.search-form input {
    width: 100%;
    padding: 1.2rem 4.5rem 1.2rem 2rem;
    font-size: 1.3rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 60px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}
.search-form input:focus {
    border-color: var(--primary);
}
.search-form button[type="submit"] {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.search-form button[type="submit"]:hover {
    transform: translateY(-50%) scale(1.1);
}
.search-form .btn-close {
    position: absolute;
    right: -3rem;
    top: 50%;
    transform: translateY(-50%);
    filter: invert(1);
    opacity: 0.6;
}

/* ---------- Navbar Toggler (Burger) ---------- */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =====================================================
   MOBILE SLIDE MENU (appears on < 992px)
   ===================================================== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: var(--accent-navy);
    z-index: 1050;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 2rem;
    border-radius: 0 20px 20px 0;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
}
.mobile-nav-container.active {
    left: 0;
}

/* ---------- Mobile Header ---------- */
.mobile-nav-header {
    background: var(--primary-gradient);
    padding: 1.5rem;
    border-radius: 0 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-nav-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.mobile-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
}
.mobile-logo-container {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.mobile-logo {
    max-width: 100%;
    height: auto;
}
.mobile-logo-text .site-name {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.mobile-logo-text .site-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin: 0;
}
.mobile-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}
.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* ---------- Mobile Search ---------- */
.mobile-search-container {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
}
.mobile-search-group {
    background: var(--accent-navy-light);
    border-radius: 30px;
    overflow: hidden;
    padding: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-search-group .search-icon-wrapper {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0.8rem;
}
.mobile-search-input {
    border: none;
    background: transparent;
    color: #fff;
    padding: 0.6rem 0.2rem;
}
.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.mobile-search-input:focus {
    box-shadow: none;
    background: transparent;
}
.mobile-search-btn {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
    transition: 0.3s;
}
.mobile-search-btn:hover {
    transform: scale(1.05);
}

/* ---------- Mobile Navigation Links ---------- */
.mobile-nav-links {
    padding: 0.5rem 0;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
}
.mobile-nav-link .nav-icon {
    width: 32px;
    height: 32px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
}
.mobile-nav-link .nav-text {
    flex: 1;
    font-weight: 500;
}
.mobile-nav-link .nav-arrow {
    opacity: 0.5;
    transition: 0.3s;
}
.mobile-nav-link:hover .nav-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ---------- Mobile Dropdowns ---------- */
.mobile-dropdown-content {
    padding-left: 3rem;
    background: rgba(255, 255, 255, 0.02);
}
.mobile-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}
.mobile-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #fff;
}
.mobile-dropdown-item i,
.mobile-dropdown-item img {
    width: 18px;
    text-align: center;
}

/* ---------- Mobile Language ---------- */
.mobile-language-section {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}
.section-title {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
.language-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.language-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
}
.language-card:hover {
    background: rgba(139, 92, 246, 0.15);
}
.language-card.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary);
}
.language-flag {
    width: 24px;
    height: 18px;
    overflow: hidden;
    border-radius: 4px;
}
.language-name {
    flex: 1;
    font-size: 0.9rem;
}
.active-indicator {
    color: #fff;
}

/* ---------- Mobile Auth ---------- */
.mobile-auth-section {
    padding: 1.5rem;
}
.auth-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.login-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.login-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
.register-btn {
    background: var(--primary-gradient);
    color: #fff;
}
.register-btn:hover {
    transform: scale(1.03);
}
.dashboard-btn {
    background: rgba(139, 92, 246, 0.2);
    color: #fff;
    width: 100%;
    justify-content: center;
}
.free-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    margin-top: 1rem;
}
.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}
.user-info {
    flex: 1;
}
.user-name {
    color: #fff;
    font-size: 1rem;
    margin: 0;
}
.user-email {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin: 0;
}
.logout-btn {
    background: rgba(255, 0, 0, 0.1);
    border: none;
    color: #ff4444;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}
.logout-btn:hover {
    background: #ff4444;
    color: #fff;
}

/* ---------- Mobile App CTA ---------- */
.mobile-app-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    margin: 0 1.5rem 1rem;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.app-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.app-content h4 {
    color: #fff;
    font-size: 0.95rem;
    margin: 0;
}
.app-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin: 0;
}
.app-download-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}
.app-download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */
@media (max-width: 991.98px) {
    /* Hide Bootstrap collapse on mobile – we use our own slide menu */
    .navbar-collapse {
        display: none !important;
    }
    .navbar-toggler {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    /* Hide mobile slide menu on desktop */
    .mobile-nav-overlay,
    .mobile-nav-container {
        display: none !important;
    }
}