/* ===================================================================
   Zubopact Header & Navigation CSS
   Extracted from inline styles for better caching & performance
   =================================================================== */

/* === CSS Variables (legacy compat & header-specific) === */
:root {
    --primary: var(--zp-brand);
    --primary-glow: var(--zp-brand-glow);
    --dark-base: #0f172a;
    --surface-glass: rgba(255, 255, 255, 0.1);
    --sidebar-width: 360px;
    --transition: var(--zp-transition);
}

/* === Search Box (header-only component) === */
.search-wrapper {
    background: #F3F4F6;
    border-radius: 12px;
    padding: 6px 14px;
    border: 1px solid #E5E7EB;
    transition: var(--transition);
}

.search-wrapper:focus-within {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-wrapper input {
    background: transparent;
    border: none;
    padding: 6px;
    font-size: 13px;
    width: 100%;
}

.search-wrapper input:focus {
    outline: none;
}

/* === User Trigger (logged-in avatar button) === */
.user-trigger {
    display: flex;
    align-items: center;
    padding: 4px;
    padding-right: 12px;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.user-trigger:hover {
    background: #E5E7EB;
    transform: translateY(-1px);
}

.user-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* === Mobile Sidebar (offcanvas) === */
.offcanvas-mobile {
    width: 100% !important;
    background: white !important;
    z-index: 1045 !important;
    pointer-events: auto;
}

.offcanvas-mobile .offcanvas-header,
.offcanvas-mobile .offcanvas-body {
    pointer-events: auto;
}

body .offcanvas-backdrop {
    z-index: 1040 !important;
}

/* === Sidebar (desktop panel) === */
.offcanvas-premium {
    width: var(--sidebar-width) !important;
    background: var(--dark-base) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 24px;
    margin: 0 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    margin-bottom: 15px;
    border: 3px solid var(--primary);
    padding: 3px;
    background: #1e293b;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 4px 18px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link-custom:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-link-custom.active {
    background: var(--primary);
    color: white;
}

.nav-link-custom i {
    font-size: 1.2rem;
    margin-right: 14px;
}

.nav-link-ai {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
    color: #fff !important;
}

/* === Brand Ticker === */
.brand-ticker-section {
    padding: 60px 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    background: white;
}

.ticker-track {
    display: flex;
    gap: 40px;
    animation: scroll-left 30s linear infinite;
    padding: 20px 0;
    will-change: transform;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.brand-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .brand-ticker-section {
        padding: 40px 0;
    }

    .ticker-track {
        gap: 30px;
        animation-duration: 25s;
    }

    .brand-item {
        font-size: 14px;
    }
}

/* === Dropdown Animation === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    animation: fadeInUp 0.2s ease;
}

/* === Dropdown Menu Positioning Fix === */
.dropdown-menu {
    max-width: 280px;
    max-height: 70vh;
    overflow-y: auto;
}

.dropdown-divider {
    margin: 6px 0;
    border-color: #E5E7EB;
}

/* === Featured Profiles Scroll === */
.featured-profiles-scroll {
    display: flex;
    flex-direction: row;
    direction: rtl;
    gap: 12px;
    padding: 12px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    background: white;
    border-radius: 8px;
}

.featured-profiles-scroll::-webkit-scrollbar {
    height: 6px;
}

.featured-profiles-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.featured-profiles-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.featured-profiles-scroll::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.featured-profiles-scroll .col-6 {
    flex: 0 0 calc(25% - 9px);
    min-width: calc(25% - 9px);
    padding: 0 !important;
    margin: 0;
    direction: ltr;
}

.featured-profiles-scroll .col-6>a {
    display: block;
}

.featured-profiles-scroll .col-6>a .card {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    border-radius: 12px !important;
    background: white !important;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.featured-profiles-scroll .col-6>a .card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-4px);
}

.featured-profiles-scroll .card-body {
    padding: 20px 16px !important;
    text-align: center !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    height: 100%;
}

.featured-profiles-scroll .card-body img {
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 12px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
}

.featured-profiles-scroll .card-body h6 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0a66c2 !important;
    line-height: 1.3;
    word-break: break-word;
}

.featured-profiles-scroll .card-body p {
    font-size: 12px !important;
    margin: 6px 0 0 0 !important;
    padding: 0 !important;
    line-height: 1.3;
    color: #1f2937 !important;
}

.featured-profiles-scroll .card-body small {
    font-size: 11px !important;
    color: #6b7280 !important;
    display: block;
    margin-top: 6px !important;
    padding: 0 !important;
}

@media (max-width: 1200px) {
    .featured-profiles-scroll .col-6 {
        flex: 0 0 calc(33.333% - 8px);
        min-width: calc(33.333% - 8px);
    }
}

@media (max-width: 1024px) {
    .featured-profiles-scroll .col-6 {
        flex: 0 0 calc(50% - 6px);
        min-width: calc(50% - 6px);
    }

    .featured-profiles-scroll .card-body {
        padding: 16px 12px !important;
    }

    .featured-profiles-scroll .card-body img {
        width: 56px !important;
        height: 56px !important;
        margin: 0 auto 10px !important;
    }

    .featured-profiles-scroll .card-body h6 {
        font-size: 13px !important;
    }

    .featured-profiles-scroll .card-body p {
        font-size: 11px !important;
    }
}

@media (max-width: 768px) {
    .featured-profiles-scroll .col-6 {
        flex: 0 0 calc(50% - 6px);
        min-width: calc(50% - 6px);
    }

    .featured-profiles-scroll .card-body {
        padding: 14px 10px !important;
    }

    .featured-profiles-scroll .card-body img {
        width: 48px !important;
        height: 48px !important;
        margin: 0 auto 8px !important;
    }

    .featured-profiles-scroll .card-body h6 {
        font-size: 12px !important;
    }

    .featured-profiles-scroll .card-body p {
        font-size: 10px !important;
    }

    .featured-profiles-scroll .card-body small {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .featured-profiles-scroll .col-6 {
        flex: 0 0 calc(60% - 7px);
        min-width: calc(60% - 7px);
    }

    .featured-profiles-scroll .card-body {
        padding: 12px 8px !important;
    }

    .featured-profiles-scroll .card-body img {
        width: 44px !important;
        height: 44px !important;
        margin: 0 auto 6px !important;
    }

    .featured-profiles-scroll .card-body h6 {
        font-size: 11px !important;
    }

    .featured-profiles-scroll .card-body p {
        font-size: 9px !important;
    }
}

/* === Profile Count Badges === */
.profile-count-badge {
    background: #222;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    max-width: fit-content;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
}

/* === Mobile Submenu (offcanvas accordion) === */
.mobile-menu-section {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 1px;
    background: #f9fafb;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #e5e7eb;
    pointer-events: auto !important;
    z-index: 10;
    user-select: none;
    position: relative;
}

.mobile-menu-toggle:hover {
    background: #f3f4f6;
}

.mobile-menu-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.expanded i {
    transform: rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    pointer-events: none;
}

.mobile-submenu.show {
    max-height: 1000px;
    pointer-events: auto !important;
}

.mobile-submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 40px;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    width: 100%;
    box-sizing: border-box;
}

.mobile-submenu-item:hover {
    background: #f9fafb;
    color: #2563eb;
    padding-left: 44px;
}

.mobile-submenu-item i {
    margin-right: 12px;
    font-size: 16px;
}

/* === MOBILE-ONLY HEADER: hamburger left, logo center === */
@media (max-width: 991.98px) {
    .navbar-right-actions {
        display: none !important;
    }

    .navbar-premium .mobile-hamburger,
    .mobile-hamburger {
        order: -1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 8px 6px !important;
        border: none !important;
        background: transparent !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        margin-right: 8px !important;
        margin-left: 0 !important;
        z-index: 10 !important;
    }

    .mobile-hamburger .toggler-bar {
        display: block !important;
        width: 24px !important;
        height: 2.5px !important;
        background: #334155 !important;
        border-radius: 2px !important;
        transition: all 0.25s ease !important;
    }

    .mobile-hamburger:focus {
        box-shadow: none !important;
        outline: none !important;
    }

    .brand-logo {
        margin: 0 auto !important;
        padding-right: 40px !important;
    }

    .navbar-premium .container-fluid {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        position: relative !important;
    }
}

/* Hide hamburger on desktop */
@media (min-width: 992px) {

    .mobile-hamburger,
    .navbar-premium .mobile-hamburger {
        display: none !important;
    }
}

