/* ===================================================
   Crouse Volunteer Fire Department - Styles
   =================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --color-primary: #B71C1C;
  --color-primary-dark: #8B0000;
  --color-navy: #0D1B2A;
  --color-navy-light: #1B3A4B;
  --color-gold: #C9923A;
  --color-white: #FFFFFF;
  --color-light: #F4F4F4;
  --color-text: #2B2B2B;
  --color-text-muted: #5A5A5A;

  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  --banner-height: 500px;
  --banner-height-shrunk: 70px;
  --container-max: 1100px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* ===================================================
   BANNER / HEADER
   =================================================== */
.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--banner-height);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height var(--transition);

  /* Background image with gradient overlay.
     Replace hero-bg.jpg with an actual station or department photo. */
  background:
    linear-gradient(
      160deg,
      rgba(13, 27, 42, 0.92) 0%,
      rgba(27, 58, 75, 0.82) 40%,
      rgba(139, 0, 0, 0.78) 100%
    ),
    url('../images/hero-bg.jpg') center / cover no-repeat;
  background-color: var(--color-navy);
  color: var(--color-white);
}

.banner.shrunk {
  height: var(--banner-height-shrunk);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* When shrunk make the overlay more opaque so the compact bar is readable */
.banner.shrunk::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-navy) 60%, var(--color-primary-dark));
  opacity: 0.25;
  pointer-events: none;
  transition: opacity var(--transition);
}

/* ---------- Banner Bar (top strip, always visible) ---------- */
.banner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition: padding var(--transition);
}

.banner.shrunk .banner-bar {
  padding: 10px 28px;
}

/* Brand (logo + text) */
.banner-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--color-white);
  max-width: calc(100vw - 560px);
}

.logo {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  transition: width var(--transition), height var(--transition);
}

.banner.shrunk .logo {
  width: 44px;
  height: 44px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 20px rgba(201, 146, 58, 0.4));
  transition: filter var(--transition);
}

.banner.shrunk .logo-img {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.banner-text {
  display: flex;
  flex-direction: column;
  border-left: 2px solid rgba(201, 146, 58, 0.6);
  padding-left: 20px;
  transition: border-color var(--transition), padding-left var(--transition);
}

.banner.shrunk .banner-text {
  border-left-color: rgba(201, 146, 58, 0.35);
  padding-left: 14px;
}

.dept-name {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
  background: linear-gradient(180deg, #FFFFFF 0%, #E0C98A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9))
    drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
  transition: font-size var(--transition), filter var(--transition);
}

.banner.shrunk .dept-name {
  font-size: 1.12rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.dept-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  opacity: 0.9;
  margin-top: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  transition: opacity var(--transition), font-size var(--transition), margin var(--transition);
}

.banner.shrunk .dept-subtitle {
  opacity: 0;
  font-size: 0;
  line-height: 0;
  margin-top: 0;
}

/* ---------- Navigation ---------- */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 6px;
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 1001;
  transition: top var(--transition);
}

.nav-links.shrunk {
  top: 16px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--color-white);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--color-navy);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ---------- Banner Hero Content ---------- */
.banner-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 28px 40px;
  position: relative;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.banner.shrunk .banner-hero {
  opacity: 0;
  pointer-events: none;
}

.hero-heading {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-sub {
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Banner Spacer ---------- */
.banner-spacer {
  height: var(--banner-height);
  transition: height var(--transition);
}

.banner-spacer.shrunk {
  height: var(--banner-height-shrunk);
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-white);
}

.btn-lg {
  padding: 14px 34px;
  font-size: 1rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===================================================
   SECTIONS
   =================================================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-light);
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  color: var(--color-navy);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  margin: 14px auto 0;
  border-radius: 2px;
}

.section-title-light {
  color: var(--color-white);
}

.section-title-light::after {
  background: var(--color-gold);
}

/* ---------- Mission ---------- */
.mission-block {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.mission-icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin: 0 auto 24px;
}

.mission-text {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--color-text-muted);
  border: none;
  padding: 0;
  margin: 0;
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: var(--color-primary);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--color-navy);
}

.card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ---------- Service Area ---------- */
.area-content {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.area-text {
  flex: 1;
}

.area-text p {
  margin-bottom: 16px;
  color: var(--color-text-muted);
}

.area-text p:last-child {
  margin-bottom: 0;
}

.county-badges {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.county-badge {
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: 8px;
  padding: 24px 36px;
  text-align: center;
  min-width: 180px;
}

.county-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.county-role {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

/* ---------- Volunteer CTA ---------- */
.volunteer-section {
  background:
    linear-gradient(
      160deg,
      rgba(13, 27, 42, 0.93) 0%,
      rgba(139, 0, 0, 0.88) 100%
    ),
    url('../images/hero-bg.jpg') center / cover no-repeat;
  background-color: var(--color-navy);
  color: var(--color-white);
  text-align: center;
}

.volunteer-text {
  max-width: 700px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: 0.9;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.contact-card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.contact-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.contact-card address,
.contact-card p {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
}

.contact-card-emergency {
  background: var(--color-navy);
  color: var(--color-white);
}

.contact-card-emergency h3 {
  color: var(--color-gold);
}

.emergency-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-white) !important;
}

.contact-note {
  text-align: center;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.contact-note a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-note a:hover {
  color: var(--color-primary-dark);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
}

.footer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  transition: background 0.3s ease;
}

.social-link:hover {
  background: #1877F2;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
}

/* ===================================================
   RESPONSIVE
   =================================================== */

/* ---- Tablet ---- */
@media (max-width: 900px) {
  :root {
    --banner-height: 420px;
  }

  .banner-brand {
    max-width: calc(100vw - 100px);
  }

  .hero-heading {
    font-size: 2.2rem;
  }

  .area-content {
    flex-direction: column;
  }

  .county-badges {
    flex-direction: row;
    width: 100%;
  }

  .county-badge {
    flex: 1;
    min-width: 0;
  }

  /* Hamburger visible at tablet */
  .nav-toggle {
    display: flex;
  }

  .nav-links,
  .nav-links.shrunk {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100dvh;
    flex-direction: column;
    background: #0D1B2A;
    padding: 80px 28px 28px;
    gap: 0;
    transition: right 0.35s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 1002;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: normal;
  }
}

/* ---- Mobile ---- */
@media (max-width: 680px) {
  :root {
    --banner-height: 380px;
    --banner-height-shrunk: 62px;
  }

  .banner-bar {
    padding: 12px 18px;
  }

  .banner.shrunk .banner-bar {
    padding: 8px 18px;
  }

  .logo {
    width: 64px;
    height: 64px;
  }

  .banner.shrunk .logo {
    width: 36px;
    height: 36px;
  }

  .banner-text {
    padding-left: 14px;
  }

  .dept-name {
    font-size: 1.35rem;
  }

  .banner.shrunk .dept-name {
    font-size: 0.95rem;
  }

  .dept-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }


  /* Hero */
  .banner-hero {
    padding: 0 18px 28px;
  }

  .hero-heading {
    font-size: 1.7rem;
  }

  .hero-sub {
    font-size: 0.92rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Sections */
  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card {
    padding: 28px 22px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-top {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 8px;
  }
}

/* ---- Small mobile ---- */
@media (max-width: 400px) {
  :root {
    --banner-height: 340px;
  }

  .hero-heading {
    font-size: 1.45rem;
  }

  .county-badges {
    flex-direction: column;
  }
}

/* ---------- Focus Styles ---------- */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ---------- Mobile nav overlay ---------- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
}

.nav-overlay.active {
  display: block;
}
