/* Shared site header: brand logo + primary navigation.
   Loaded by every public page that renders includes/site_header.php.
   Desktop: fixed blurred bar. <=768px: static, brand centered above nav. */

.site-header {
    background: rgba(255, 255, 255, .84);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 10px 28px rgba(31, 41, 55, .06);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    font-family: -apple-system, "system-ui", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.site-header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.site-header .logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}
.site-header .logo img {
    height: 40px;
    margin-right: 10px;
    border-radius: 8px;
}
.site-header .logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: #3498db;
    margin: 0;
    line-height: 1.2;
}
.site-header .nav-links {
    display: flex;
    gap: 20px;
}
.site-header .nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.6;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all .2s ease;
    white-space: nowrap;
}
.site-header .nav-links a:hover,
.site-header .nav-links a.active {
    color: #3498db;
    background-color: rgba(52, 152, 219, .1);
    font-weight: 600;
}

/*
 * The account widget is fixed to the viewport rather than participating in
 * the header flex row. Reserve its bounded width while the header container
 * is close enough to the viewport edge for the two regions to collide.
 */
@media (min-width: 769px) and (max-width: 1600px) {
    .site-header .header-container {
        padding-right: clamp(20px, calc(800px - 50vw), 200px);
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .site-header .header-container {
        gap: 12px;
    }
    .site-header .logo img {
        height: 36px;
        margin-right: 8px;
    }
    .site-header .logo h1 {
        font-size: 20px;
    }
    .site-header .nav-links {
        gap: 4px;
    }
    .site-header .nav-links a {
        padding: 5px 4px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .site-header {
        position: static;
    }
    .site-header .header-container {
        flex-direction: column;
        text-align: center;
    }
    .site-header .logo {
        margin-bottom: 10px;
        justify-content: center;
    }
    .site-header .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
    }
}
