/* ============================================================
   BAKER HILL FIRE / RESCUE — GLOBAL STYLESHEET v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: clip; /* use clip instead of hidden — fixes sticky */
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f4f4f4;
    color: #111;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
    overflow-x: clip; /* clip instead of hidden */
}

body.dark-theme {
    background: #141414;
    color: #f0f0f0;
}

/* --- CSS VARIABLES --- */
:root {
    --bh-red: #e63946;
    --bh-red-dark: #c1121f;
    --bh-black: #111111;
    --bh-gray: #f4f4f4;
    --card-bg: #ffffff;
    --card-border: #eee;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.14);
    --radius: 12px;
    --transition: 0.25s ease;
}

body.dark-theme {
    --card-bg: #1e1e1e;
    --card-border: #2e2e2e;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.5);
}

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition {
    animation: pageFadeIn 0.4s ease forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.page-exit {
    animation: pageFadeOut 0.25s ease forwards;
}

@keyframes pageFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay: 0.35s; }

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
    background: #000;
    padding: 13px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--bh-red);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

/* Needed so the mobile dropdown positions relative to the nav bar */
nav .nav-container {
    position: relative;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    gap: 0;
}

.nav-brand {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    color: #fff;
    letter-spacing: 3px;
    font-size: 17px;
    white-space: nowrap;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-brand span { color: var(--bh-red); }

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #bbb;
    margin-left: 20px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.2px;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover { color: #fff; }

.nav-links a.active {
    color: var(--bh-red);
    border-bottom-color: var(--bh-red);
}

#theme-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    margin-left: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

#theme-toggle:hover {
    background: var(--bh-red);
    border-color: var(--bh-red);
}

/* ── HAMBURGER ── */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV ── */
@media (max-width: 768px) {
    .nav-hamburger { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 13px); /* clears the nav padding */
        left: -25px;
        right: -25px;
        background: #000;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 25px 24px;
        border-top: 1px solid #1a1a1a;
        box-shadow: 0 12px 24px rgba(0,0,0,0.5);
        z-index: 999;
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        margin-left: 0;
        padding: 11px 0;
        border-bottom: 1px solid #111;
        width: 100%;
        font-size: 13px;
    }

    .nav-links a:last-child { border-bottom: none; }
}
/* ============================================================
   HERO BANNERS
   ============================================================ */
.hero {
    height: 520px;
    background: linear-gradient(160deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 100%),
                url('banner.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #f4f4f4);
    pointer-events: none;
}

body.dark-theme .hero::after {
    background: linear-gradient(to bottom, transparent, #141414);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    margin: 0;
    line-height: 1.05;
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero p.hero-sub {
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin-top: 14px;
    animation: heroReveal 0.8s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Apparatus hero */
.fireb {
    height: 520px;
    background: linear-gradient(160deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 100%),
                url('fire2.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fireb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #f4f4f4);
    pointer-events: none;
}

body.dark-theme .fireb::after {
    background: linear-gradient(to bottom, transparent, #141414);
}

.fireb h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    margin: 0;
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ambob {
    height: 520px;
    background: linear-gradient(160deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 100%),
                url('ambo1.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ambob::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #f4f4f4);
    pointer-events: none;
}

body.dark-theme .ambob::after {
    background: linear-gradient(to bottom, transparent, #141414);
}

.ambob h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    margin: 0;
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1100px;
    margin: 70px auto;
    padding: 0 24px;
    flex: 1;
}

main { flex: 1; }

.content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin: 70px 0;
}

.text-block h2 { margin-top: 0; }

/* Section label */
.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--bh-red);
    margin-bottom: 10px;
    display: block;
}

/* ============================================================
   CARDS & GRIDS
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--bh-red);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bh-red), var(--bh-red-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover::before { transform: scaleX(1); }

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

body.dark-theme .card {
    background: var(--card-bg);
    color: #f0f0f0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-red {
    background: var(--bh-red);
    color: white;
}

.btn-red:hover {
    background: var(--bh-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,57,70,0.4);
}

.btn-dark {
    background: #111;
    color: white;
}

.btn-dark:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

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

.btn-outline:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* ============================================================
   IMAGE PLACEHOLDERS
   ============================================================ */
.image-placeholder {
    background: linear-gradient(135deg, #ddd 0%, #ccc 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #999;
    font-size: 13px;
    letter-spacing: 0.5px;
}

body.dark-theme .image-placeholder {
    background: linear-gradient(135deg, #2a2a2a 0%, #222 100%);
    color: #555;
}

/* ============================================================
   EMERGENCY BAR
   ============================================================ */
.emergency-bar {
    background: var(--bh-red);
    color: white;
    padding: 14px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 12px;
    font-family: 'Barlow Condensed', sans-serif;
}

/* ============================================================
   RECRUITMENT CTA BANNER
   ============================================================ */
.recruit-banner {
    background: linear-gradient(135deg, #111 0%, #1a1a1a 50%, #111 100%);
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.recruit-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(230,57,70,0.03) 40px,
        rgba(230,57,70,0.03) 80px
    );
    pointer-events: none;
}

.recruit-banner h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0 0 16px;
}

.recruit-banner h2 span { color: var(--bh-red); }

.recruit-banner p {
    color: #888;
    font-size: 15px;
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.recruit-banner .btn-red {
    font-size: 13px;
    padding: 15px 40px;
}

/* ============================================================
   PHOTO GALLERY
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    background: #222;
}

.gallery-item img,
.gallery-item .gallery-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #555;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 10px;
}

.gallery-item:hover img,
.gallery-item:hover .gallery-placeholder { transform: scale(1.06); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    transition: background 0.3s;
}

.gallery-item:hover .gallery-overlay { background: rgba(0,0,0,0.45); }

.gallery-caption {
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 28px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
    position: absolute;
    bottom: 24px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ============================================================
   INTERACTIVE APPARATUS TABS
   ============================================================ */
.apparatus-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 22px;
    border: 2px solid #ddd;
    background: transparent;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition);
    color: #666;
    font-family: inherit;
}

.tab-btn:hover {
    border-color: var(--bh-red);
    color: var(--bh-red);
}

.tab-btn.active {
    background: var(--bh-red);
    border-color: var(--bh-red);
    color: white;
}

body.dark-theme .tab-btn {
    border-color: #333;
    color: #aaa;
}

body.dark-theme .tab-btn.active {
    background: var(--bh-red);
    color: white;
    border-color: var(--bh-red);
}

.tab-panel {
    display: none;
    animation: tabFade 0.3s ease;
}

.tab-panel.active { display: block; }

@keyframes tabFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.spec-item {
    background: var(--bh-gray);
    padding: 18px 20px;
    border-radius: 8px;
    border-left: 3px solid var(--bh-red);
}

body.dark-theme .spec-item { background: #252525; }

.spec-item .spec-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 4px;
}

.spec-item .spec-value {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

body.dark-theme .spec-item .spec-value { color: #f0f0f0; }

.apparatus-badge {
    display: inline-block;
    background: rgba(230,57,70,0.1);
    color: var(--bh-red);
    border: 1px solid rgba(230,57,70,0.3);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

/* ============================================================
   STATS COUNTER
   ============================================================ */
.stats-bar {
    background: #111;
    padding: 60px 24px;
    margin: 0;
}

.stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item .stat-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--bh-red);
    line-height: 1;
    display: block;
}

.stat-item .stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin-top: 8px;
    display: block;
}

.stat-divider {
    width: 1px;
    background: #222;
    align-self: stretch;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #0a0a0a;
    color: #ccc;
    padding: 70px 0 24px;
    border-top: 4px solid var(--bh-red);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    padding: 0 24px;
}

.footer-title {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e1e1e;
}

.footer-text {
    font-size: 13px;
    line-height: 2;
    color: #666;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-links a:hover { color: var(--bh-red); padding-left: 5px; }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #161616;
    border-radius: 8px;
    border: 1px solid #222;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.social-icon:hover {
    background: var(--bh-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(230,57,70,0.35);
}

.social-icon svg { display: block; }

.footer-bottom {
    margin-top: 60px;
    padding: 20px 24px;
    border-top: 1px solid #161616;
    text-align: center;
    font-size: 11px;
    color: #3a3a3a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-bottom a { color: #555; text-decoration: none; }
.footer-bottom a:hover { color: var(--bh-red); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.admin-box {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--bh-red);
}

body.dark-theme .admin-box {
    background: var(--card-bg);
    color: #f0f0f0;
}

.admin-list {
    list-style: none;
    padding: 0;
    font-size: 14px;
    line-height: 2.4;
    margin: 0;
}

.admin-list strong { color: var(--bh-red); }

body.dark-theme .contact-input {
    background: #1e1e1e;
    border-color: #333;
    color: #f0f0f0;
}

/* ============================================================
   DOCS PAGE
   ============================================================ */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin: 50px auto;
    max-width: 1150px;
}

.doc-card {
    background: var(--card-bg);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.doc-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--bh-red);
}

body.dark-theme .doc-text { color: #f0f0f0 !important; }

.form-label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fdfdfd;
    font-family: inherit;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--bh-red);
    box-shadow: 0 0 0 4px rgba(230,57,70,0.08);
    background: #fff;
}

body.dark-theme .form-input {
    background: #1e1e1e;
    border-color: #333;
    color: #f0f0f0;
}

.archive-list { list-style: none; padding: 0; margin-top: 20px; }

.archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f1f1f1;
    transition: padding-left 0.2s;
}

.archive-item:hover { padding-left: 4px; }
.archive-item:last-child { border-bottom: none; }
body.dark-theme .archive-item { border-bottom-color: #222; }
.archive-item i { color: var(--bh-red); margin-right: 10px; }

.download-btn {
    background: #111;
    color: #fff;
    padding: 7px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background 0.2s;
    white-space: nowrap;
}

.download-btn:hover { background: var(--bh-red); }

body.dark-theme table { background: #1e1e1e; color: #f0f0f0; }
body.dark-theme tr { border-bottom: 1px solid #2e2e2e; }
body.dark-theme tr:nth-child(even) { background: #252525; }
body.dark-theme td { color: #ddd; }

/* ============================================================
   PERSONNEL PAGE
   ============================================================ */
.personnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.rank-tag {
    font-size: 10px;
    font-weight: 900;
    color: var(--bh-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    display: block;
}

.person-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius);
    text-align: center;
    border-bottom: 3px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.person-card:hover {
    border-bottom-color: var(--bh-red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

body.dark-theme .person-card { background: var(--card-bg); }

.person-img-placeholder {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: #222;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-weight: bold;
    border: 3px solid #333;
}

.person-img-circle {
    width: 160px; height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid rgba(230,57,70,0.3);
    margin: 0 auto 15px;
    display: block;
    transition: border-color 0.3s;
}

.person-img-circle:hover { border-color: var(--bh-red); }

/* ============================================================
   DANGER METER
   ============================================================ */
.danger-meter-container {
    background: var(--card-bg);
    padding: 36px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 60px;
    text-align: center;
    border-top: 5px solid var(--bh-red);
}

.meter-track {
    height: 22px;
    width: 100%;
    background: #eee;
    border-radius: 50px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
    display: flex;
}

body.dark-theme .meter-track { background: #333; }

.meter-segment { flex: 1; height: 100%; border-right: 2px solid rgba(255,255,255,0.3); }
.low  { background: #4CAF50; }
.mod  { background: #FFEB3B; }
.high { background: #FF9800; }
.ext  { background: #f44336; }

.meter-arrow {
    position: absolute;
    top: -3px;
    width: 8px;
    height: calc(100% + 6px);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: left 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESPONSIVE / MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .nav-hamburger { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #000;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 25px 24px;
        border-top: 1px solid #1a1a1a;
        box-shadow: 0 12px 24px rgba(0,0,0,0.5);
        z-index: 999;
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        margin-left: 0;
        padding: 11px 0;
        border-bottom: 1px solid #111;
        width: 100%;
        font-size: 13px;
    }

    .hero { height: 360px; }
    .hero h1, .Ap h1 { font-size: 3rem; letter-spacing: 3px; }
    .Ap { height: 360px; }
    .content-row { grid-template-columns: 1fr; gap: 30px; }
    .docs-grid { grid-template-columns: 1fr; }
    .personnel-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .two-col-form { grid-template-columns: 1fr !important; }
    .footer-container { grid-template-columns: 1fr; gap: 36px; }
    .stats-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
    .recruit-banner h2 { font-size: 2.2rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .apparatus-tabs { gap: 6px; }
    .tab-btn { padding: 8px 14px; font-size: 11px; }
    .stat-divider { display: none; }
}

@media (max-width: 480px) {
    .hero h1, .Ap h1 { font-size: 2.2rem; }
    .container { margin: 40px auto; }
    .card { padding: 22px; }
    .stats-inner { grid-template-columns: 1fr; }
}
/* ============================================================
   MOBILE IMPROVEMENTS — PASTE AT BOTTOM OF style.css
   ============================================================ */

/* NAV — prevent brand + hamburger from overflowing */
@media (max-width: 768px) {
    .nav-brand { font-size: 14px; letter-spacing: 2px; }
    #theme-toggle { font-size: 10px; padding: 5px 10px; margin-left: 10px; }

    /* Hero */
    .hero { height: 280px; }
    .hero h1 { font-size: 2.6rem; letter-spacing: 2px; }
    .hero p.hero-sub { font-size: 11px; letter-spacing: 1.5px; }

    /* Container padding */
    .container { padding: 0 16px; margin: 40px auto; }

    /* Content rows stack cleanly */
    .content-row { gap: 20px; margin: 40px 0; }

    /* Cards */
    .card { padding: 20px; }

    /* Recruit banner */
    .recruit-banner { padding: 50px 16px; }
    .recruit-banner h2 { font-size: 1.8rem; letter-spacing: 2px; }
    .recruit-banner p { font-size: 13px; }

    /* Stats */
    .stats-bar { padding: 40px 16px; }
    .stat-item .stat-number { font-size: 3rem; }

    /* Footer */
    .footer-container { padding: 0 16px; gap: 28px; }

    /* Join page — requirements side by side cards stack */
    .content-row.join-row { grid-template-columns: 1fr; }

    /* Google Form iframe */
    iframe { min-height: 900px !important; }

    /* Personnel mini cards — 2 per row on mobile */
    .rank-body-inner { justify-content: center; }
    .mini-card { width: calc(50% - 8px); }

    /* Docs grid */
    .doc-card { padding: 22px; }

    /* Apparatus tabs scroll horizontally */
    .apparatus-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
    .apparatus-tabs::-webkit-scrollbar { height: 3px; }
    .apparatus-tabs::-webkit-scrollbar-thumb { background: var(--bh-red); border-radius: 2px; }
    .tab-btn { flex-shrink: 0; }

    /* Gallery */
    .gallery-collapse-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Executive command cards stack */
    .grid { grid-template-columns: 1fr; }
    .person-img-circle { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
    .nav-brand { font-size: 12px; letter-spacing: 1px; }
    .hero h1 { font-size: 2rem; }
    .hero p.hero-sub { display: none; }
    .recruit-banner h2 { font-size: 1.5rem; }
    .stat-item .stat-number { font-size: 2.4rem; }

    /* Mini cards 2 per row still but smaller */
    .mini-card { width: calc(50% - 6px); }

    /* Run summary table padding */
    .run-row { padding: 10px 14px; }

    /* Emergency bar smaller text */
    .emergency-bar { font-size: 10px; letter-spacing: 1.5px; padding: 10px; }
}
#page-transition-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: 99998;
}