/* ============================================================
   header-modern.css – Modern, Responsive Header Design
   ============================================================ */

/* Root Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #7c3aed;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-hover: #f1f5f9;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   TOP BAR - MODERN MINIMALIST
   ============================================================ */

.top-bar-modern {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-bar-modern-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 0;
}

.top-bar-modern-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-modern-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    transition: color var(--transition);
}

.top-bar-modern-info:hover {
    color: rgba(255, 255, 255, 0.95);
}

.top-bar-modern-info i {
    font-size: 13px;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.top-bar-modern-info:hover i {
    opacity: 1;
}

.top-bar-modern-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.top-bar-modern-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.top-bar-modern-link:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.top-bar-modern-link.admin {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.top-bar-modern-link.admin:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
}

/* ============================================================
   MAIN NAVBAR - MODERN & CLEAN
   ============================================================ */

.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all var(--transition);
    position: relative;
    z-index: 999;
}

.navbar-modern.scrolled {
    padding: 6px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   BRAND/LOGO - MODERN DESIGN
   ============================================================ */

.brand-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform var(--transition);
    min-width: fit-content;
    flex-shrink: 0;
}

.brand-modern:hover {
    transform: translateY(-1px);
}

.brand-icon-modern {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.brand-icon-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.brand-text-modern {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1;
}

.brand-title-modern {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.brand-title-modern strong {
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline-modern {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================================================
   SEARCH BAR - MODERN & FUNCTIONAL
   ============================================================ */

.nav-search-modern {
    position: relative;
    width: 360px;
    margin: 0 24px;
    flex-grow: 1;
    max-width: 400px;
    z-index: 1050;
}

.search-wrapper-modern {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon-modern {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
    transition: color var(--transition);
    z-index: 2;
}

.search-input-modern {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-light);
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text-dark);
}

.search-input-modern::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.search-input-modern:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
}

.search-input-modern:focus ~ .search-icon-modern {
    color: var(--primary-color);
}

.search-dropdown-modern {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    z-index: 2001;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-dropdown-modern.show {
    display: block;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-dropdown-item-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-light);
    transition: all var(--transition);
    color: var(--text-dark);
    text-decoration: none;
}

.search-dropdown-item-modern:hover {
    background: var(--bg-light);
    padding-left: 18px;
}

.search-dropdown-item-modern:last-child {
    border-bottom: none;
}

.search-dropdown-item-modern i {
    color: var(--primary-color);
    font-size: 14px;
    min-width: 20px;
}

/* ============================================================
   NAVIGATION LINKS - MODERN STYLE
   ============================================================ */

.nav-links-modern {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link-modern {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark) !important;
    padding: 6px 14px !important;
    border-radius: 7px;
    transition: all var(--transition);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link-modern:hover {
    background: var(--bg-hover);
    color: var(--primary-color) !important;
}

.nav-link-modern i {
    font-size: 14px;
}

.nav-separator-modern {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
    opacity: 0.5;
}

/* ============================================================
   DROPDOWN MENU - FIXED & MODERN
   ============================================================ */

.nav-item-modern {
    position: relative;
}

.nav-dropdown-trigger-modern {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px !important;
    border-radius: 7px;
    transition: all var(--transition);
    text-decoration: none;
}

.nav-dropdown-trigger-modern:hover {
    background: var(--bg-hover);
    color: var(--primary-color) !important;
}

.nav-dropdown-trigger-modern i.arrow {
    font-size: 11px;
    transition: transform var(--transition);
    margin-left: 4px;
}

.nav-item-modern.active .nav-dropdown-trigger-modern i.arrow {
    transform: rotate(180deg);
}

.dropdown-menu-modern {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 8px 0;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    pointer-events: none;
}

.nav-item-modern.active .dropdown-menu-modern {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu-modern a,
.dropdown-menu-modern button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    text-align: left;
}

.dropdown-menu-modern a:hover,
.dropdown-menu-modern button:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 20px;
}

.dropdown-menu-modern a i {
    color: var(--primary-color);
    min-width: 18px;
    text-align: center;
}

.dropdown-divider-modern {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ============================================================
   CTA BUTTON - MODERN DESIGN
   ============================================================ */

.btn-cta-modern {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff !important;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-cta-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.btn-cta-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-cta-modern:hover::before {
    opacity: 1;
}

.btn-cta-modern:active {
    transform: translateY(0);
}

/* ============================================================
   MOBILE MENU TOGGLE - MODERN
   ============================================================ */

.navbar-toggler-modern {
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    position: relative;
    width: 32px;
    height: 32px;
}

.navbar-toggler-modern span {
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
    transition: all var(--transition);
    display: block;
}

.navbar-toggler-modern.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggler-modern.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler-modern.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================================
   MOBILE MENU - MODERN
   ============================================================ */

.nav-menu-mobile-modern {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-mobile-modern.active {
    display: flex;
}

.nav-menu-mobile-modern .nav-link-modern {
    width: 100%;
    padding: 10px 12px !important;
    justify-content: flex-start;
    border-radius: 6px;
}

.nav-menu-mobile-modern .btn-cta-modern {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .nav-search-modern {
        width: 300px;
        margin: 0 16px;
    }

    .brand-title-modern {
        font-size: 15px;
    }

    .nav-link-modern {
        font-size: 12px;
        padding: 6px 12px !important;
    }

    .dropdown-menu-modern {
        min-width: 180px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Top Bar */
    .top-bar-modern {
        padding: 10px 0;
    }

    .top-bar-modern-content {
        gap: 12px;
        flex-wrap: wrap;
    }

    .top-bar-modern-left {
        gap: 12px;
        font-size: 10px;
        width: 100%;
        order: 2;
    }

    .top-bar-modern-right {
        width: 100%;
        order: 1;
    }

    .top-bar-modern-link {
        font-size: 10px;
        padding: 6px 12px;
        flex: 1;
        justify-content: center;
    }

    /* Navbar */
    .navbar-modern {
        padding: 8px 0;
    }

    .navbar-container-modern {
        flex-wrap: wrap;
    }

    .brand-modern {
        gap: 8px;
    }

    .brand-icon-modern {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .brand-title-modern {
        font-size: 14px;
    }

    .brand-tagline-modern {
        font-size: 9px;
    }

    /* Search Bar */
    .nav-search-modern {
        width: 100%;
        margin: 8px 0 0 0;
        max-width: 100%;
        order: 3;
    }

    .search-input-modern {
        font-size: 12px;
        padding: 8px 12px 8px 36px;
    }

    /* Navigation */
    .nav-links-modern {
        display: none;
        width: 100%;
        order: 4;
    }

    .nav-links-modern.show {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-left: 0;
        margin-top: 12px;
        border-top: 1px solid var(--border-color);
        padding-top: 12px;
    }

    .nav-link-modern {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px !important;
    }

    .nav-separator-modern {
        display: none;
    }

    /* CTA Button */
    .btn-cta-modern {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    /* Dropdowns */
    .nav-item-modern .dropdown-menu-modern {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
        border: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
        pointer-events: auto;
    }

    .nav-item-modern.active .dropdown-menu-modern {
        max-height: 400px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .brand-title-modern {
        font-size: 13px;
    }

    .brand-tagline-modern {
        display: none;
    }

    .brand-icon-modern {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .search-input-modern {
        font-size: 11px;
        padding: 7px 10px 7px 32px;
    }

    .nav-link-modern {
        font-size: 12px;
        padding: 8px 10px !important;
    }

    .btn-cta-modern {
        font-size: 11px;
        padding: 7px 14px;
    }

    .top-bar-modern-info {
        font-size: 9px;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.nav-link-modern:focus,
.nav-dropdown-trigger-modern:focus,
.btn-cta-modern:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    .navbar-modern,
    .top-bar-modern {
        display: none;
    }
}
