/* ============================================
   UNIVERSAL HEADER CSS - CLEAN & CONSISTENT
   Use this on ALL pages - NO OVERRIDES ALLOWED
   ============================================ */

/* Header wrapper */
.header-wrapper {
    margin-top: 0;
    width: 100%;
    background: white;
}

/* Topbar - Logo & Account */
.topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    padding: 20px 0;
    margin-top: 0;
    width: 100%;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 98px;
    max-height: 98px;
    height: 98px;
    box-sizing: border-box;
}

.topbar .container {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 0;
    position: relative;
    width: 100%;
    min-height: 58px;
    max-height: 58px;
    height: 58px;
    box-sizing: border-box;
}

/* Brand Logo - Centered */
.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) !important;
    scale: 1 !important;
}

.brand:hover,
.brand:active,
.brand:focus {
    transform: translateX(-50%) !important;
    scale: 1 !important;
}

.brand img {
    height: 58px;
    width: auto;
    min-height: 58px;
    max-height: 58px;
    display: block;
    transform: none !important;
    scale: 1 !important;
}

.brand img:hover,
.brand img:active {
    transform: none !important;
    scale: 1 !important;
}

/* Account Link */
.account-link {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2854a6;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    transform: none !important;
    scale: 1 !important;
}

.account-link:hover {
    background: rgba(40, 84, 166, 0.1);
    color: #1e3f7a;
    transform: none !important;
    scale: 1 !important;
}

.account-link:active,
.account-link:focus {
    background: rgba(40, 84, 166, 0.1);
    color: #1e3f7a;
    transform: none !important;
    scale: 1 !important;
    font-size: 1rem !important;
}

/* Header Divider - Animated Gradient */
.header-divider {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    flex-shrink: 0;
    display: block;
    position: relative;
    z-index: 1;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Blue Navigation - SOLID BLUE (matching blog/articles page) */
.blue-nav {
    background: #2854a6;
    padding: 0;
    width: 100%;
    min-height: 54px;
    max-height: 54px;
    height: 54px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    border-top: none;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.blue-nav .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: nowrap;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    height: 100%;
    min-height: 54px;
    max-height: 54px;
    text-align: center;
    left: 0;
    right: 0;
}

/* Navigation Links - WHITE TEXT - FIXED SIZE */
.blue-nav a,
.blue-nav a:link,
.blue-nav a:hover,
.blue-nav a:active,
.blue-nav a:focus,
.blue-nav a:visited {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500 !important;
    font-size: 1.56rem !important;
    letter-spacing: 0.2px;
    transition: opacity 0.3s;
    line-height: 54px !important;
    white-space: nowrap;
    flex-shrink: 0;
    transform: none !important;
    scale: 1 !important;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.blue-nav a:hover,
.blue-nav a:active,
.blue-nav a:focus {
    opacity: 0.8;
}

/* Prevent layout shift */
.topbar,
.blue-nav,
.header-divider {
    will-change: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* ============================================
   MOBILE RESPONSIVE - Fixed sizes
   ============================================ */

@media (max-width: 768px) {
    .topbar {
        padding: 8px 0;
        min-height: 68px;
        max-height: 68px;
        height: 68px;
    }
    
    .topbar-inner {
        padding: 0 16px;
        min-height: 52px;
        max-height: 52px;
        height: 52px;
    }

    .brand img {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
    }

    .account-link {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .blue-nav {
        padding: 10px 0;
        min-height: 50px;
        max-height: 50px;
        height: 50px;
    }

    .blue-nav .container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 48px;
        flex-wrap: nowrap;
        position: relative;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        height: 54px;
        text-align: center;
        left: 0;
        right: 0;
    }

    .blue-nav a {
        font-size: 1.2rem;
        line-height: 1.2;
    }
}

@media (max-width: 520px) {
    .blue-nav .container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 48px;
        flex-wrap: nowrap;
        position: relative;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        height: 54px;
        text-align: center;
        left: 0;
        right: 0;
    }

    .blue-nav a {
        font-size: 1.15rem;
        line-height: 1.2;
    }
}
