/* ===================================================
   North Frontenac — Design System
   Light, warm, forest community portal
   =================================================== */

:root {
  /* Sky gradient */
  --sky-top: #87CEEB;
  --sky-mid: #B8E4F0;
  --sky-bottom: #E8F5E9;

  /* Forest greens */
  --forest-dark: #1B5E20;
  --forest-mid: #2E7D32;
  --forest-light: #43A047;
  --forest-bright: #66BB6A;

  /* Accent */
  --gold: #FFB300;
  --gold-soft: #FFF8E1;

  /* Earth */
  --bark: #5D4037;
  --bark-light: #795548;

  /* Surfaces */
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(255, 255, 255, 0.6);
  --surface-frosted: rgba(255, 255, 255, 0.75);

  /* Text */
  --text-dark: #1B3A1D;
  --text-body: #2E4A30;
  --text-light: #FFFFFF;
  --text-muted: rgba(46, 74, 48, 0.6);

  /* Ad zones */
  --ad-bg: rgba(255, 255, 255, 0.5);
  --ad-border: rgba(27, 94, 32, 0.12);

  /* Layout */
  --max-width: 1140px;
  --nav-height: 72px;
}

/* ---- Reset ---- */

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html, body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-body);
  background: #E8F5E9;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--text-dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

a { color: var(--forest-mid); text-decoration: none; }
a:hover { color: var(--forest-dark); }

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

/* ---- Sky Background ---- */

.sky-bg {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 30%, var(--sky-bottom) 60%, #C8E6C9 100%);
  min-height: 100vh;
  position: relative;
}

.page-sky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40vh;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 60%, var(--sky-bottom) 100%);
  z-index: -1;
}

/* ---- Navigation: Icon Tab Bar ---- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(27, 94, 32, 0.1);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  text-decoration: none;
  color: var(--forest-dark);
}

.nav-brand svg {
  width: 40px;
  height: 40px;
}

.nav-brand-text {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.2rem;
  color: var(--forest-dark);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  list-style: none;
  padding: 0;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 18px;
  height: 100%;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-tab:hover,
.nav-tab.active {
  color: var(--forest-dark);
  border-bottom-color: var(--forest-mid);
}

.nav-tab svg {
  width: 22px;
  height: 22px;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--forest-dark);
}

.nav-toggle svg { width: 28px; height: 28px; }

/* Mobile bottom tab bar */
.mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(27, 94, 32, 0.1);
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  justify-content: space-around;
}

.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.mobile-tab.active { color: var(--forest-dark); }

.mobile-tab svg {
  width: 24px;
  height: 24px;
}

/* Mobile slide-up menu (from "More" tab) */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
}

.mobile-menu-overlay.open { display: block; }

.mobile-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 40px;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open { transform: translateY(0); }

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 1px solid rgba(27, 94, 32, 0.08);
  text-decoration: none;
}

.mobile-menu-link svg {
  width: 22px;
  height: 22px;
  color: var(--forest-mid);
}

@media (max-width: 768px) {
  .nav-tabs { display: none; }
  .nav-toggle { display: block; }
  .mobile-tab-bar { display: flex; }
  body { padding-bottom: 70px; }
}

/* ---- Container ---- */

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

/* ---- Frosted Glass Cards ---- */

.frosted-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid var(--card-border);
  box-shadow:
    0 20px 60px rgba(27, 94, 32, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

.frosted-card-sm {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 30px rgba(27, 94, 32, 0.08);
  padding: 1.5rem;
}

/* ---- Pill Tags ---- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--forest-dark);
}

.tag svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tag-gold {
  background: linear-gradient(135deg, var(--gold-soft), #FFECB3);
  color: #5D4037;
}

/* ---- Buttons ---- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 94, 32, 0.25);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(27, 94, 32, 0.35);
  color: white;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: white;
  color: var(--forest-dark);
  border: 2px solid #C8E6C9;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--forest-mid);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold), #FF8F00);
  color: #1B3A1D;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms ease;
}
.btn-gold:hover {
  transform: translateY(-2px);
  color: #1B3A1D;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ---- Section Layout ---- */

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Two-Column Content Layout (single pages) ---- */

.content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 24px;
}

.content-main { min-width: 0; }

.content-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
  }
}

/* ---- Card Grids ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Explore Grid (asymmetric 2-col) ---- */

.explore-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.explore-featured {
  grid-row: 1 / 3;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

.explore-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-featured .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(27, 62, 29, 0.85));
  color: white;
}

@media (max-width: 768px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
  .explore-featured {
    grid-row: auto;
    min-height: 280px;
  }
}

/* ---- Events Strip (horizontal scroll) ---- */

.events-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 24px 2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--forest-bright) transparent;
}

.events-strip::-webkit-scrollbar {
  height: 6px;
}

.events-strip::-webkit-scrollbar-thumb {
  background: var(--forest-bright);
  border-radius: 3px;
}

.event-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.event-date {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.5rem;
  color: var(--forest-dark);
  line-height: 1;
}

.event-month {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest-mid);
}

/* ---- Civic Quick Links ---- */

.civic-link-card {
  text-align: center;
  padding: 2rem 1.5rem;
  transition: transform 0.2s ease;
}

.civic-link-card:hover {
  transform: translateY(-4px);
}

.civic-link-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.civic-link-icon svg {
  width: 28px;
  height: 28px;
  color: var(--forest-dark);
}

/* ---- Ad Zones ---- */

.ad-zone {
  text-align: center;
  padding: 12px;
}

.ad-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ad-leaderboard {
  padding: 12px 0;
  background: var(--ad-bg);
  border-bottom: 1px solid var(--ad-border);
}

.ad-sidebar {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid var(--card-border);
  padding: 16px;
  text-align: center;
}

.ad-native {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.ad-native-inner {
  background: var(--surface-frosted);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid var(--card-border);
  padding: 20px;
  text-align: center;
}

/* ---- Footer ---- */

.site-footer {
  position: relative;
  padding-top: 6rem;
  margin-top: 4rem;
  overflow: hidden;
}

.footer-content {
  position: relative;
  z-index: 10;
  background: rgba(27, 94, 32, 0.9);
  backdrop-filter: blur(12px);
  padding: 3rem 0 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-brand {
  color: rgba(255, 255, 255, 0.9);
}

.footer-brand h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: white;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-col h4 {
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  text-align: center;
  padding: 1.5rem 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  background: rgba(27, 94, 32, 0.95);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ---- Hero Scene (homepage) ---- */

.hero-scene {
  position: relative;
  min-height: 85vh;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 30%, var(--sky-bottom) 60%, #C8E6C9 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 620px;
  width: 100%;
  padding: 48px 40px 40px;
}

.hero-card h1 {
  color: var(--forest-dark);
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--forest-mid);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Page Header (interior pages) ---- */

.page-header {
  position: relative;
  padding: 120px 0 3rem;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 40%, var(--sky-bottom) 100%);
  text-align: center;
  overflow: hidden;
}

.page-header h1 {
  position: relative;
  z-index: 10;
}

.page-header p {
  position: relative;
  z-index: 10;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0.5rem auto 0;
}

/* ---- Breadcrumb ---- */

.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--forest-mid);
  font-weight: 600;
}

.breadcrumb .sep {
  margin: 0 8px;
  opacity: 0.4;
}

/* ---- Article Content Styling ---- */

.article-content h2 {
  margin: 2rem 0 1rem;
}

.article-content h3 {
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.2rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content blockquote {
  border-left: 4px solid var(--forest-bright);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(232, 245, 233, 0.5);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.article-content img {
  border-radius: 16px;
  margin: 1.5rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.article-content th {
  background: var(--forest-dark);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
}

.article-content th:first-child { border-radius: 12px 0 0 0; }
.article-content th:last-child { border-radius: 0 12px 0 0; }

.article-content td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(27, 94, 32, 0.08);
  font-size: 0.9rem;
}

.article-content tr:nth-child(even) {
  background: rgba(232, 245, 233, 0.3);
}

/* ---- Cross-Promo NFNM ---- */

.nfnm-promo {
  border-left: 4px solid var(--forest-mid);
  padding-left: 16px;
}

.nfnm-promo h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest-mid);
  margin-bottom: 12px;
}

.nfnm-promo-link {
  display: block;
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 1px solid rgba(27, 94, 32, 0.08);
}

.nfnm-promo-link:hover { color: var(--forest-mid); }

/* ---- Newsletter Signup ---- */

.newsletter-section {
  text-align: center;
  padding: 3rem;
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
}

.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #C8E6C9;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-input:focus {
  border-color: var(--forest-mid);
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* ---- Pine Tree Icon ---- */

.pine-icon {
  display: inline-block;
}

.pine-icon svg {
  width: 56px;
  height: 56px;
}

/* ---- Utility ---- */

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-12 { gap: 12px; }
.gap-20 { gap: 20px; }
