/**
 * Header Core CSS
 * Base styles shared by all templates
 */

/* =====================================================
   TOPBAR
   ===================================================== */
.header-topbar {
    padding: 8px 0;
    font-size: 13px;
    transition: all 0.3s ease;
}

.header-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-topbar-left,
.header-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.topbar-item:hover {
    opacity: 0.8;
    text-decoration: none;
}

.topbar-social {
    display: flex;
    gap: 12px;
}

.topbar-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
    transition: all 0.2s;
}

.topbar-social .social-icon:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* =====================================================
   HEADER BASE
   ===================================================== */
.header-desktop {
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-sticky {
    position: sticky;
    top: 0;
}

.header-shadow {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 30px;
}

/* =====================================================
   LOGO
   ===================================================== */
.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    max-height: 50px;
    width: auto;
    transition: transform 0.2s;
}

.logo-link:hover .logo-image {
    transform: scale(1.02);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

/* =====================================================
   MENU
   ===================================================== */
.header-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-menu-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.menu-link:hover {
    background: rgba(0,0,0,0.04);
    text-decoration: none;
}

.menu-item.active .menu-link {
    background: rgba(0,0,0,0.06);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.menu-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* =====================================================
   REGULAR DROPDOWN
   ===================================================== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding: 8px 0;
    margin-top: 4px;
    list-style: none;
    border-radius: 8px;
    border: 1px solid;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.menu-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    margin: 0;
}

.dropdown-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item a:hover {
    background: rgba(0,0,0,0.04);
}

.dropdown-item.active a {
    background: rgba(0,0,0,0.06);
}

.dropdown-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    color: #fff;
}

/* =====================================================
   CTA BUTTON
   ===================================================== */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid;
    transition: all 0.2s;
    white-space: nowrap;
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
}

.header-cta-outline:hover {
    background: rgba(0,0,0,0.04);
}

/* =====================================================
   MOBILE TOGGLE (Hidden on Desktop)
   ===================================================== */
.header-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 991px) {
    .header-topbar {
        display: none;
    }
    
    .header-menu {
        display: none;
    }
    
    .header-cta {
        display: none;
    }
    
    .header-mobile-toggle {
        display: flex;
    }
    
    .header-nav {
        padding: 10px 0;
    }
}

@media (max-width: 575px) {
    .logo-image {
        max-height: 40px;
    }
}

/* =====================================================
   BOOTSTRAP OVERRIDE - Fix dropdown display
   ===================================================== */
.header-desktop .dropdown-menu {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.header-desktop .menu-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
