/* Shared GigGopher brand header and page styling */
.site-header {
    position: sticky; top: 0; z-index: 1000; width: 100%;
    padding: 0; text-align: initial; color: inherit;
    background: rgba(247, 245, 240, 0.97); border-bottom: 1px solid #e8e2d9;
    box-shadow: 0 2px 10px rgba(36, 36, 36, 0.035);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.site-header__inner {
    position: relative; width: min(1100px, calc(100% - 32px)); margin: 0 auto;
    min-height: 92px; padding: 10px 0; display: flex;
    align-items: center; justify-content: center;
}
.site-brand {
    display: block; width: min(820px, calc(100% - 104px)); max-width: 100%; margin-inline: auto;
    line-height: 0; transition: width 220ms ease;
}
.site-brand__image { display: block; width: 100%; height: auto; object-fit: contain; }
.site-menu-toggle {
    font-size: 0; /* Keep the control icon-only even if legacy button text is present. */
    position: absolute; top: 8px; right: 0; z-index: 2;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; min-width: 44px; height: 44px; min-height: 44px;
    margin: 0; padding: 0; border: 1px solid #e3d9cc; border-radius: 10px;
    background: #fff; color: #29242d; cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease;
}
.site-menu-toggle::before, .site-menu-toggle::after { content: none !important; }
.site-menu-toggle:hover, .site-menu-toggle[aria-expanded="true"] {
    background: #fff2df; border-color: #e9b66f;
}
.site-menu-toggle:focus-visible, .site-menu-panel a:focus-visible, .site-brand:focus-visible {
    outline: 3px solid #e98b32; outline-offset: 3px;
}
.site-menu-toggle__icon { width: 19px; display: flex; flex-direction: column; gap: 4px; }
.site-menu-toggle__icon span {
    display: block; width: 19px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
}
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__icon span:first-child { transform: translateY(6px) rotate(45deg); }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__icon span:nth-child(2) { opacity: 0; }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__icon span:last-child { transform: translateY(-6px) rotate(-45deg); }
.site-menu-panel {
    position: absolute; top: calc(100% - 1px); right: 0; z-index: 1001;
    width: min(310px, calc(100vw - 28px)); padding: 9px;
    background: #fff; border: 1px solid #e8e2d9; border-radius: 0 0 13px 13px;
    box-shadow: 0 12px 28px rgba(36, 36, 36, 0.13);
}
.site-menu-panel[hidden] { display: none; }
.site-menu-panel a {
    display: flex; align-items: center; min-height: 43px; padding: 10px 12px;
    margin: 0; border-radius: 8px; background: transparent; color: #34302c;
    text-decoration: none; font-size: 14px; font-weight: 600;
}
.site-menu-panel a:hover, .site-menu-panel a:focus-visible { background: #fff2df; }

.site-menu-logout { margin: 2px 0 0; }
.site-menu-logout button {
    width: 100%; min-height: 43px; padding: 10px 12px; border: 0;
    background: transparent; color: #34302c; text-align: left;
    font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px;
}
.site-menu-logout button:hover, .site-menu-logout button:focus-visible {
    background: #fff2df;
}
.admin-login {
    width: min(420px, calc(100% - 32px)); margin: 58px auto;
    padding: 30px; border: 1px solid #e8e2d9; border-radius: 16px;
    background: #fff;
}
.admin-login h1 { margin-top: 0; }
.admin-login form { display: grid; gap: 12px; }
.admin-login input {
    width: 100%; box-sizing: border-box; padding: 12px;
    border: 1px solid #c5bdb3;
}
.admin-login button { border: 0; padding: 12px; font-weight: bold; cursor: pointer; }
.admin-login__error { color: #9b1822; font-weight: 700; }

.site-header.is-compact .site-header__inner { min-height: 62px; padding-top: 5px; padding-bottom: 5px; }
.site-header.is-compact .site-brand { width: min(430px, calc(100% - 104px)); }
.site-header.is-compact .site-menu-toggle { top: 5px; }
.site-menu-toggle:active { transform: translateY(1px); }

body { background: #f7f5f0; color: #242424; }
.search-panel {
    border: 1px solid #e8e2d9; border-radius: 16px;
    box-shadow: 0 5px 18px rgba(36, 36, 36, 0.045);
}
.search-panel h2, .results-heading h2 { color: #242424; }
/* Leave extra clearance so the results heading and count, not the first card,
   are the first content visible after a fragment jump beneath the sticky header. */
.results-heading { scroll-margin-top: 130px; }
.search-panel p, .event-details, .night-details { color: #68635e; }
input, select, button { border-radius: 8px; }
input:focus-visible, select:focus-visible, button:focus-visible {
    outline: 3px solid rgba(233, 139, 50, 0.35); outline-offset: 1px;
}
button { background: #e99a27; color: #242424; }
button:hover { background: #e8ad54; }
.event, .night, .no-results {
    border: 1px solid #e8e2d9; border-radius: 13px;
    box-shadow: 0 4px 14px rgba(36, 36, 36, 0.04);
}
.event-date, .night-day { color: #a95d0c; }
.event-links a, .night-links a { background: #29242d; border-radius: 8px; }
.event-links a:hover, .night-links a:hover { background: #49404e; }
.event-category, .format, .distance { background: #eeecef; color: #39313e; }
footer { color: #88817a; }

@media (max-width: 700px) {
    .site-header__inner {
        width: calc(100% - 20px); min-height: 68px; padding: 7px 0;
    }
    .site-brand { width: min(300px, calc(100% - 90px)); }
    .site-menu-toggle { top: 6px; right: 0; width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
    .site-header.is-compact .site-header__inner { min-height: 48px; padding: 4px 0; }
    .site-header.is-compact .site-brand { width: min(180px, calc(100% - 60px)); }
    .site-header.is-compact .site-menu-toggle { top: 4px; }
    .site-menu-panel { width: min(330px, calc(100vw - 20px)); }
    main { margin-top: 20px; }
    .results-heading { scroll-margin-top: 108px; }
}
@media (prefers-reduced-motion: reduce) {
    .site-brand, .site-menu-toggle, .site-menu-toggle__icon span { transition: none; }
    .site-menu-toggle:active { transform: none; }
}
