/* Header and logo styling for the pages that do not load /styles.css (freesamples, requests, requests-list).
   Mirrors the header rules in styles.css; keep the two in sync. */
.main-header { background: #000; box-shadow: 0 2px 10px rgba(0,0,0,0.5); z-index: 1000; }
.main-header .header-content { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.25rem; padding: 0 2rem; }
.main-header .logo-section .main-logo {
    height: 120px; width: auto; max-width: 100%; display: block;
    animation: logoPulse 3.4s ease-in-out infinite;
}
.main-header .logo-link { display: block; line-height: 0; }
@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(138,180,248,0.35)) drop-shadow(0 0 14px rgba(118,75,162,0.25)); }
    50%      { filter: drop-shadow(0 0 10px rgba(138,180,248,0.85)) drop-shadow(0 0 26px rgba(118,75,162,0.65)); }
}
@media (prefers-reduced-motion: reduce) { .main-header .logo-section .main-logo { animation: none; } }
.main-header.compact .logo-section .main-logo { height: 44px; }
.main-header .main-navigation { align-items: center; justify-content: center; gap: 0.9rem; flex-wrap: wrap; }
.main-header .main-navigation .nav-link {
    display: inline-block; box-sizing: border-box; margin: 0; font-size: 1rem; line-height: 1.5;
    font-weight: 600; padding: 0.5rem 1.2rem; border-radius: 999px;
    /* frosted-glass pill to match the logo's glass panel (same as styles.css) */
    color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.45); border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.13) 100%) padding-box,
        linear-gradient(#2b3450, #2b3450) padding-box,
        linear-gradient(90deg, #7fa6ff, #b07cff) border-box;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 12px rgba(138,180,248,0.28);
    transition: box-shadow 0.25s ease, filter 0.25s ease;
}
.main-header .main-navigation .nav-link:hover { filter: brightness(1.2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 20px rgba(118,75,162,0.65); }
.nav-toggle { display: none; }   /* these pages have their own phone layout, so no Menu button */
.footer-logo-img { height: 150px; width: auto; max-width: 100%; margin-bottom: 1rem; }
@media (max-width: 900px) {
    .main-header .header-content { padding: 0 1rem; }
    .main-header .logo-section .main-logo { height: 38px; }
    .main-header.compact .logo-section .main-logo { height: 32px; }
}

/* ===== Header v3: fixed header that glides between its tall and slim states ===== */
/* Fixed (not sticky), so changing its height never moves the page: no scroll feedback loop, no flicker. */
.main-header { position: fixed; top: 0; left: 0; right: 0; padding: 0; }
html { scroll-padding-top: 90px; }
body { padding-top: 60px; }                      /* phones: room for the fixed header */
@media (max-width: 900px) { .main-header { padding: 8px 0; } }   /* phones: header = 44px button + 16px air = 60px */
.logo-section .main-logo { transition: height 0.3s ease; }
@media (min-width: 901px) {
    /* The logo is wider than the row of menu pills, so it overhangs them on both sides.
       It scales down on narrow windows (never wider than the window), up to 170px tall. */
    :root { --logo-h: clamp(100px, calc((100vw - 48px) / 5.633), 170px); }
    body { padding-top: calc(var(--logo-h) + 68px); }   /* room for the header at full height */
    .header-content { position: relative; display: block; height: calc(var(--logo-h) + 68px); padding: 0; transition: height 0.3s ease; }
    .logo-section { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: max-content; transition: top 0.3s ease, left 0.3s ease, transform 0.3s ease; }
    .logo-section .main-logo { height: var(--logo-h); max-width: none; }   /* never squeeze the logo */
    .main-navigation { position: absolute; top: calc(var(--logo-h) + 14px); left: 50%; transform: translateX(-50%); width: max-content; flex-wrap: nowrap; transition: top 0.3s ease, left 0.3s ease, transform 0.3s ease; }
}
@media (min-width: 1100px) {
    /* scrolled, wide windows: logo left, menu right, one slim row */
    .main-header.compact .header-content { height: 68px; }
    .main-header.compact .logo-section { top: 12px; left: 32px; transform: translateX(0); }
    .main-header.compact .main-navigation { top: 13px; left: calc(100% - 32px); transform: translateX(-100%); }
}
@media (min-width: 901px) and (max-width: 1099px) {
    /* scrolled, medium windows: small logo, menu stays underneath */
    .main-header.compact .header-content { height: 108px; }
    .main-header.compact .logo-section { top: 6px; }
    .main-header.compact .main-navigation { top: 54px; }
}
@media (prefers-reduced-motion: reduce) {
    .header-content, .logo-section, .main-navigation, .logo-section .main-logo { transition: none; }
}

/* These pages have no Menu button, so on phones their header wraps to several rows. Keep it in the page flow there. */
@media (max-width: 900px) {
    .main-header { position: sticky; top: 0; }
    body { padding-top: 0; }
}
