/* ============================================================================
   Lions Sports Club, Shared Site Styles
   ----------------------------------------------------------------------------
   Tokens, reset, header, nav, container, buttons, social, footer, and image
   protection. Loaded by every page; page-specific rules live in each page's
   inline <style> block.

   Brand palette:
     Royal Blue    #0059A9   primary
     Cross Red     #ED1C24   accent (scripture refs, urgent CTAs)
     Gold          #D4AF37   accent (eyebrows, highlights)
     Near Black    #141413   primary dark surface (was pure #000)
     Ghost White   #F8F8FF   primary light surface (was pure #FFF)
   ============================================================================ */

:root {
    /* Royal Blue scale */
    --blue-primary: #0059A9;
    --blue-hover:   #006BCB;
    --blue-active:  #004B8F;
    --blue-light:   #5291D0;

    /* Brand accents */
    --gold:         #D4AF37;
    --cross-red:    #ED1C24;

    /* Dark/light scale. --black is now Near Black for visual warmth;
       --dark is the elevated surface (cards/headers); --darker is the
       deepest emphasis tone where needed. --dark-card is the elevated
       background for card components (a touch lighter than --dark). */
    --black:        #141413;
    --dark:         #161616;
    --dark-card:    #1e1e1e;
    --darker:       #0d0d0d;
    --white:        #F8F8FF;

    /* Grays */
    --gray-light:   #DCDCDC;
    --gray-mid:     #5E5E5E;
    --gray-dark:    #424242;
    --gray-text:    #A4A4A4;
    --gray-border:  #C0C0C0;

    /* Type */
    --font-heading: 'League Spartan', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'Helvetica World', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ============================================================================
   Reset
   ============================================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    /* Stops iOS Safari inflating body text when a phone is turned landscape. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #1B1B1B;
    background: var(--black);
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Image protection: prevent selection, drag, and long-press save. */
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================================================
   Container
   ============================================================================ */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
@media (min-width: 1536px) { .container { max-width: 1280px; } }

/* ============================================================================
   Site header. Logo + wordmark + nav
   Mobile order: [hamburger] [logo] [Lions Sports Club]
   Desktop order: [logo] [Lions Sports Club] --- [About] [Join] [Fundraising] [Contact]
   ============================================================================ */
/* The bottom rule was 6% white, which is invisible against a dark page. On
   /gameday the header is #161616 and the hero beneath it is #141413, so the
   bar dissolved into the page and the navigation appeared to float. 14% reads
   as an edge on a dark page and stays invisible on a blue one, where the
   contrast already does the work. */
.site-header {
    background: var(--dark);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
@media (min-width: 480px) { .header-inner { padding: 0 24px; gap: 14px; } }

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.logo {
    width: 48px;
    height: 48px;
    background: transparent url('/media/lsc_head_128.png') center / contain no-repeat;
    /* Image-protection rules also live here so a background-image logo gets
       the same treatment as an <img>. */
    -webkit-user-select: none; user-select: none;
    -webkit-user-drag: none;   user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}
@media (max-width: 479px)  { .logo { width: 40px; height: 40px; } }
@media (min-width: 768px)  { .logo { width: 56px; height: 56px; } }
@media (min-width: 1280px) { .logo { width: 64px; height: 64px; } }

/* Defensive overlay layers interfere with right-click save / screen-capture
   attempts on the logo. Same pattern site-wide. */
.logo::before,
.logo::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.logo::before { background: transparent; z-index: 10; }
.logo::after  {
    background: linear-gradient(45deg, transparent 49%, rgba(0, 89, 169, 0.02) 50%, transparent 51%);
    z-index: 5;
}

.header-name {
    /* Pushes everything after it to the right, which is what puts the nav and
       the action buttons on the far edge at every width. */
    margin-right: auto;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: #F7F7F7;
    /* The wordmark is a single line at every width. Left to wrap it breaks
       into three lines the moment the nav row gets long. */
    white-space: nowrap;
}
@media (max-width: 479px) { .header-name { font-size: 1rem; } }
@media (min-width: 768px) { .header-name { font-size: 1.375rem; } }
.header-name a { color: inherit; text-decoration: none; }

/* ============================================================================
   Primary nav, horizontal on >=1024px, hamburger drawer below
   ============================================================================ */
.primary-nav {
    display: none;
}
.primary-nav ul {
    display: flex;
    /* The header row is capped at 1160px at every width, and eight top-level
       items plus the wordmark and two action buttons do not fit that cap at a
       fixed gap. Fluid, so the row absorbs the buttons instead of overflowing.
       Floor and ceiling are both measured, not chosen. */
    gap: clamp(12px, 1.1vw, 16px);
    align-items: center;
}
@media (min-width: 1160px) { .primary-nav { display: flex; margin-right: 14px; } }

/* ============================================================================
   Header actions, the right hand cluster
   ----------------------------------------------------------------------------
   Outdoor mode and the menu button. Both are 44px targets and both stay in the
   bar at every width, so neither ever floats over the content the way a fixed
   control does. The outdoor button is rendered by /includes/outdoor-toggle.php
   and styled in /css/outdoor.css, so removing that stylesheet leaves this
   container holding the menu button alone and nothing breaks.
   ============================================================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
@media (min-width: 480px) { .header-actions { gap: 10px; } }

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    padding: 12px 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus-visible {
    color: var(--white);
    outline: none;
}
.nav-link[aria-current="page"] { color: var(--white); }
.nav-link[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--blue-light);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    outline: none;
}
.nav-toggle svg { width: 22px; height: 22px; }
@media (min-width: 1160px) { .nav-toggle { display: none; } }

.mobile-nav {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease-out;
}
.mobile-nav.is-open { max-height: 85vh; overflow-y: auto; }
.mobile-nav[hidden] { display: none; }
@media (min-width: 1160px) { .mobile-nav { display: none !important; } }

.mobile-nav ul { padding: 8px 0; }
.mobile-nav-link {
    display: block;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    outline: none;
}
.mobile-nav-link[aria-current="page"] {
    color: var(--white);
    border-left-color: var(--blue-light);
    background: rgba(0, 89, 169, 0.12);
}

/* ============================================================================
   Dropdown navigation (desktop menus + mobile accordion)
   ----------------------------------------------------------------------------
   Driven entirely by a nav item's 'children' array in header.php. Flat by
   design: a solid dark panel with a hairline border and a gold top edge, no
   shadow or glassmorphism. Opens on hover for a mouse, on click or focus for
   touch and keyboard (see site.js). The drawer variant is an accordion.
   ============================================================================ */

.has-dropdown { position: relative; }

/* The global `.primary-nav ul` rule is display:flex; this dropdown panel is a
   nested <ul> and must stack vertically. Higher specificity wins the override. */
.primary-nav ul.dropdown-menu { display: block; gap: 0; }

.nav-dropdown-toggle {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    padding: 12px 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 6px;
    white-space: nowrap;
    transition: color 0.2s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.has-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle[aria-expanded="true"],
.nav-dropdown-toggle.is-active-trail {
    color: var(--white);
    outline: none;
}

.nav-caret { width: 11px; height: 11px; transition: transform 0.2s; }
.has-dropdown:hover .nav-caret,
.nav-dropdown-toggle[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

/* Desktop panel. Flat: border + 2px gold top edge, no shadow. */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 224px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top: 2px solid var(--gold);
    border-radius: 0 0 6px 6px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 60;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 11px 22px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.dropdown-link:hover,
.dropdown-link:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    outline: none;
}
.dropdown-link[aria-current="page"] {
    color: var(--white);
    border-left-color: var(--blue-light);
    background: rgba(0, 89, 169, 0.16);
}

/* Mobile accordion (inside the drawer) */
.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s;
}
.mobile-dropdown-toggle:hover { background: rgba(255, 255, 255, 0.04); color: var(--white); }
.mobile-dropdown-toggle.is-active-trail { color: var(--white); border-left-color: var(--blue-light); }
.mobile-dropdown-toggle .nav-caret { transition: transform 0.2s; }
.mobile-dropdown-toggle[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background: rgba(0, 0, 0, 0.22);
}
.mobile-submenu.is-open { max-height: 320px; }
.mobile-submenu a {
    display: block;
    padding: 13px 24px 13px 40px;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s;
}
.mobile-submenu a:hover { background: rgba(255, 255, 255, 0.04); color: var(--white); }
.mobile-submenu a[aria-current="page"] {
    color: var(--white);
    border-left-color: var(--blue-light);
    background: rgba(0, 89, 169, 0.12);
}

/* ============================================================================
   Nav CTA variant ("Shop" or similar always-visible action item)
   ----------------------------------------------------------------------------
   Used by adding `'style' => 'cta'` to the nav item in header.php's
   $nav_items array. Renders the link as a gold pill instead of a standard
   nav link. CTAs are intentional outliers in the nav hierarchy: hold the
   line on exactly one at a time, or the pattern stops working.

   No icon. The color shift is the entire signal. Adding decoration to a
   color CTA dilutes it and makes the nav row feel inconsistent.
   ============================================================================ */

/* Desktop: gold pill, sits flush with other nav items. Tighter vertical
   padding centers it against the surrounding nav links which use padding
   for spacing rather than a background box. */
.nav-link.nav-link--cta {
    background: var(--gold);
    color: var(--black);
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

/* CTA hover state: subtle lift + brightness shift. Flat design language
   per the LSC standard, no shadow or glow. */
.nav-link.nav-link--cta:hover,
.nav-link.nav-link--cta:focus-visible {
    background: #e8c45c;
    color: var(--black);
    transform: translateY(-1px);
    outline: none;
}

/* Suppress the active-state underline on the CTA. The Shop CTA opens
   externally and is never "active" within the site, so the underline
   treatment does not apply. */
.nav-link.nav-link--cta[aria-current="page"]::after,
.nav-link.nav-link--cta::after {
    display: none;
}

/* Mobile drawer variant. Full-width gold band so the CTA reads with the
   same authority on small screens. Sits visually distinct from the
   stacked text links above it. */
.mobile-nav-link.mobile-nav-link--cta {
    background: var(--gold);
    color: var(--black);
    border-left: 3px solid var(--gold);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-top: 8px;
}

.mobile-nav-link.mobile-nav-link--cta:hover,
.mobile-nav-link.mobile-nav-link--cta:focus-visible {
    background: #e8c45c;
    color: var(--black);
    border-left-color: #e8c45c;
}

/* ============================================================================
   Utility bar. Eventlink / IHSAA / similar quick links above the page hero
   Replaces inline-style soup that previously lived on every page.
   ============================================================================ */
.utility-bar {
    background: var(--blue-primary);
    padding: 14px 16px;
    text-align: center;
}

.utility-bar__inner {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
}

.utility-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s;
}
.utility-bar__link:hover,
.utility-bar__link:focus-visible {
    opacity: 0.7;
    outline: none;
}

.utility-bar__divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.35);
}

.utility-bar__chevron { opacity: 0.6; }

/* ============================================================================
   Buttons
   ============================================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 32px;
    min-height: 56px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.071em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    border: none;
}

.btn-blue {
    background: var(--blue-primary);
    color: var(--white);
}
.btn-blue:hover { background: var(--blue-hover); }

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.85);
}
.btn-outline:hover {
    border-color: var(--white);
    color: var(--white);
}

/* Solid black button. Used on the contact form's Send button and any other
   place where a strong "this is the primary action" treatment on a light
   background is wanted. White text gives clear contrast on the dark fill. */
.btn-black {
    background: var(--black);
    color: var(--white);
}
.btn-black:hover {
    background: #262626;
    color: var(--white);
}

/* ============================================================================
   Section heading, used across pages for major section titles
   ============================================================================ */
.section-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 40px;
}
@media (min-width: 768px)  { .section-heading { font-size: 2.375rem; } }
@media (min-width: 1280px) { .section-heading { font-size: 2.75rem; } }
@media (min-width: 1536px) { .section-heading { font-size: 3rem; } }

.section-heading .hr-accent {
    display: block;
    width: 50px;
    height: 2px;
    margin: 16px auto 0;
    border: none;
}

/* ============================================================================
   Social section (Facebook / Instagram / YouTube row above footer)
   ============================================================================ */
.social-section {
    background: var(--black);
    padding: 56px 0;
    text-align: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.social-links a {
    color: var(--white);
    margin: 0 12px 8px;
    transition: color 0.2s;
    display: inline-flex;
}
.social-links a:hover { color: var(--gray-light); }
.social-links svg { width: 40px; height: 40px; }

@media (min-width: 1024px) {
    .social-links a { margin: 0 20px; }
    .social-links a svg { width: 48px; height: 48px; }
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer-section {
    background: var(--blue-primary);
    padding: 64px 0;
    text-align: center;
}
@media (max-width: 767px) { .footer-section { padding: 48px 0; } }

.footer-copyright {
    color: rgb(218, 218, 225);
    font-size: 0.875rem;
    line-height: 1.5;
}
.footer-copyright a { color: rgba(255, 255, 255, 0.9); }

/* ============================================================================
   Print mode. Degrade logo / images so a printed page can't be used as a usable
   asset extraction. Same pattern site-wide.
   ============================================================================ */
@media print {
    .logo            { filter: blur(5px) opacity(0.2) !important; }
    img              { filter: blur(3px) opacity(0.3) !important; }
}
