/* ============================================================
   Brayton Fire Department Association — Main Stylesheet
   Colors: Navy #2c3e50 | Red #e74c3c | Gray #f8f8f8
   Font: Inter, system-ui, sans-serif
   ============================================================ */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #444444;
  background: #f8f8f8;
}

a { color: #e74c3c; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: #2c3e50;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
}

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

/* Layout container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  background: #2c3e50;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  padding: 8px 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav-brand:hover { text-decoration: none; color: #ecf0f1; }

.nav-logo {
  height: 48px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  color: #bdc3c7;
  padding: 16px 14px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: #ffffff; }
.nav-links a.active { color: #ffffff; }

.nav-links .nav-contact a {
  background: #e74c3c;
  color: #ffffff;
  font-weight: 700;
  padding: 16px 18px;
}
.nav-links .nav-contact a:hover { background: #c0392b; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #2c3e50;
    position: absolute;
    top: 100%;
    left: 0;
    border-top: 1px solid #34495e;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 14px 20px; border-bottom: 1px solid #34495e; }
  .nav-links .nav-contact a { background: none; color: #e74c3c; }
  .site-nav { position: relative; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #2c3e50 60%, #34495e 100%);
  border-left: 6px solid #e74c3c;
  padding: 60px 20px;
}

.hero-inner { max-width: 1100px; margin: 0 auto; }

.hero-eyebrow {
  color: #e74c3c;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-subtitle {
  color: #bdc3c7;
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 28px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: #e74c3c; color: #ffffff; border: 2px solid #e74c3c; }
.btn-primary:hover { background: #c0392b; border-color: #c0392b; text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: #ecf0f1; border: 2px solid #ecf0f1; }
.btn-outline:hover { background: rgba(255,255,255,0.08); text-decoration: none; color: #fff; }

/* ============================================================
   Homepage body: 2/3 + 1/3 columns
   ============================================================ */
.home-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

@media (max-width: 800px) {
  .home-body { grid-template-columns: 1fr; }
}

/* Section labels */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e74c3c;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ============================================================
   News cards
   ============================================================ */
.news-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-left: 3px solid #e74c3c;
}
.news-card + .news-card { border-left-color: #bdc3c7; }
.news-card:first-of-type { border-left-color: #e74c3c; }

.news-date { font-size: 0.78rem; color: #999999; margin-bottom: 4px; }
.news-title { font-weight: 700; color: #2c3e50; font-size: 0.95rem; margin: 0 0 6px; }
.news-summary { font-size: 0.875rem; color: #666666; margin: 0; }

/* ============================================================
   Sidebar: events + contact CTA
   ============================================================ */
.event-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.event-date-block {
  background: #2c3e50;
  color: #ffffff;
  text-align: center;
  border-radius: 4px;
  padding: 6px 10px;
  min-width: 44px;
  flex-shrink: 0;
}
.event-date-block .month { font-size: 0.65rem; text-transform: uppercase; }
.event-date-block .day { font-size: 1.3rem; font-weight: 700; line-height: 1; }

.event-info .event-title { font-size: 0.875rem; font-weight: 700; color: #2c3e50; margin: 0 0 3px; }
.event-info .event-meta { font-size: 0.78rem; color: #888888; }

.contact-cta {
  background: #e74c3c;
  border-radius: 6px;
  padding: 18px;
  text-align: center;
  margin-top: 16px;
}
.contact-cta h3 { color: #ffffff; font-size: 1rem; margin-bottom: 6px; }
.contact-cta p { color: #fadbd8; font-size: 0.875rem; margin-bottom: 14px; }
.contact-cta .btn-cta {
  display: inline-block;
  background: #ffffff;
  color: #e74c3c;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 4px;
  text-decoration: none;
}
.contact-cta .btn-cta:hover { background: #f0f0f0; text-decoration: none; }

/* ============================================================
   Inner page layout
   ============================================================ */
.page-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.page-title {
  color: #2c3e50;
  font-size: 1.9rem;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 3px solid #e74c3c;
}

/* Events list page */
.events-section-heading {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #666666;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

.event-list-item {
  background: #ffffff;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 12px;
  border-left: 3px solid #e74c3c;
}
.event-list-item.past { border-left-color: #bdc3c7; opacity: 0.8; }
.event-list-item .event-heading { font-weight: 700; color: #2c3e50; font-size: 1rem; margin: 0 0 6px; }
.event-list-item .event-meta { font-size: 0.875rem; color: #666666; margin-bottom: 10px; }
.event-list-item .event-body { font-size: 0.9rem; color: #444444; }

/* ============================================================
   Gallery
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.gallery-item a {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.gallery-item img:hover { transform: scale(1.04); }

.gallery-empty {
  color: #666666;
  font-style: italic;
  margin-top: 24px;
}

/* ============================================================
   Contact form
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  margin-top: 24px;
}

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #444444;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c3e50;
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* Honeypot — visually hidden but not display:none (some bots ignore that) */
.honeypot {
  position: absolute;
  left: -9999px;
}

.form-submit {
  background: #e74c3c;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.form-submit:hover { background: #c0392b; }
.form-submit:disabled { background: #aaaaaa; cursor: not-allowed; }

.form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}
.form-message.success { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.form-message.error   { background: #fdf2f2; color: #922b21; border: 1px solid #f5b7b1; }

.contact-info h3 { color: #2c3e50; margin-bottom: 12px; }
.contact-info p { font-size: 0.9rem; color: #666666; line-height: 1.7; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #2c3e50;
  padding: 16px 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p { color: #7f8c8d; font-size: 0.8rem; margin: 0; }

@media (max-width: 500px) {
  .footer-inner { flex-direction: column; gap: 4px; text-align: center; }
}

/* ============================================================
   Markdown content body (about, members pages)
   ============================================================ */
.content-body { font-size: 0.95rem; line-height: 1.75; }
.content-body h2 { margin-top: 32px; font-size: 1.3rem; }
.content-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.content-body th, .content-body td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}
.content-body th { background: #f0f0f0; font-weight: 700; color: #2c3e50; }

/* ============================================================
   Weather Alert Ticker
   ============================================================ */
.weather-ticker {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  overflow: hidden;
  font-size: 13px;
  gap: 10px;
}

.weather-ticker--no-alerts {
  background: #2d5a27;
  color: #7ec87a;
}

.ticker-badge {
  flex-shrink: 0;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ticker-badge--warning  { background: #e74c3c; }
.ticker-badge--watch    { background: #e67e22; }
.ticker-badge--advisory { background: #f39c12; }

.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-text {
  color: #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-scroll 20s linear infinite;
}

.ticker-track span {
  color: #f0f0f0;
  padding-right: 60px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
