/* =============================================================
   Theme Park Crowd — styles.css
   Light, airy, family-friendly design system
   ============================================================= */

/* ─── CSS Custom Properties ─── */
:root {
  --white: #ffffff;
  --off-white: #f8f9ff;
  --light-gray: #f1f3f9;
  --border: #e2e8f0;
  --text-primary: #1a1f36;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  --low: #22c55e;
  --low-bg: #f0fdf4;
  --moderate: #f59e0b;
  --moderate-bg: #fffbeb;
  --high: #ef4444;
  --high-bg: #fef2f2;
  --extreme: #7c3aed;
  --extreme-bg: #faf5ff;

  --brand-blue: #3b82f6;
  --brand-blue-dark: #2563eb;
  --brand-purple: #8b5cf6;
  --brand-coral: #f97316;
  --brand-yellow: #fbbf24;

  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-pill: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
  --transition: 0.2s ease;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ─── Typography ─── */
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; color: var(--text-primary); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; line-height: 1.3; color: var(--text-primary); }
h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
p { color: var(--text-secondary); line-height: 1.7; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.lead { font-size: 1.125rem; color: var(--text-secondary); }

/* ─── Layout Utilities ─── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }
.section-lg { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header p { max-width: 600px; margin: 0.75rem auto 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 1rem; flex-wrap: wrap; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-btn);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-decoration: none; border: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--brand-blue); color: var(--white); }
.btn-primary:hover { background: var(--brand-blue-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--brand-blue); border: 2px solid var(--brand-blue); }
.btn-outline:hover { background: var(--brand-blue); color: var(--white); }
.btn-coral { background: var(--brand-coral); color: var(--white); }
.btn-coral:hover { background: #ea6c0a; color: var(--white); }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* ─── Navigation ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.2rem; font-weight: 800; color: var(--text-primary);
  text-decoration: none; display: flex; align-items: center; gap: 0.4rem;
}
.nav-logo:hover { text-decoration: none; color: var(--brand-blue); }
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-links a {
  padding: 0.45rem 0.85rem; border-radius: 6px;
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  transition: var(--transition); text-decoration: none;
}
.nav-links a:hover { background: var(--light-gray); color: var(--text-primary); text-decoration: none; }
.nav-links a.active { color: var(--brand-blue); }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 0.5rem; border-radius: 6px;
  flex-direction: column; gap: 5px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none; background: var(--white); border-top: 1px solid var(--border);
  padding: 1rem;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: 0.65rem 0.75rem; border-radius: 6px;
  font-size: 0.95rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: var(--transition);
}
.nav-mobile a:hover { background: var(--light-gray); color: var(--text-primary); }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(59,130,246,0.1); color: var(--brand-blue);
  padding: 0.35rem 1rem; border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .lead { max-width: 640px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Crowd Badge Components ─── */
.crowd-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.85rem; border-radius: var(--radius-pill);
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}
.crowd-low { background: var(--low-bg); color: #15803d; border: 1px solid #bbf7d0; }
.crowd-moderate { background: var(--moderate-bg); color: #92400e; border: 1px solid #fde68a; }
.crowd-high { background: var(--high-bg); color: #b91c1c; border: 1px solid #fecaca; }
.crowd-extreme { background: var(--extreme-bg); color: #5b21b6; border: 1px solid #ddd6fe; }

.crowd-score {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  font-weight: 800; font-size: 0.95rem;
}
.crowd-score.low { background: var(--low-bg); color: #15803d; border: 2px solid var(--low); }
.crowd-score.moderate { background: var(--moderate-bg); color: #92400e; border: 2px solid var(--moderate); }
.crowd-score.high { background: var(--high-bg); color: #b91c1c; border: 2px solid var(--high); }
.crowd-score.extreme { background: var(--extreme-bg); color: #5b21b6; border: 2px solid var(--extreme); }

/* ─── Current Week Strip ─── */
.week-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}
.week-strip-header { text-align: center; margin-bottom: 1.5rem; }
.week-strip-header h2 { font-size: 1.4rem; }
.park-badges-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
}
.park-badge-item {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.6rem 1rem;
  font-size: 0.875rem; font-weight: 500;
}

/* ─── Park Card Grid ─── */
.park-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.5rem;
  box-shadow: var(--shadow); transition: var(--transition);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.park-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.park-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.park-card h3 { font-size: 1.05rem; }
.park-card .location { font-size: 0.8rem; color: var(--text-muted); }
.park-card .best-month { font-size: 0.8rem; }
.park-card .best-month span { color: var(--low); font-weight: 600; }
.park-card-link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.875rem; font-weight: 600; color: var(--brand-blue);
}
.park-card-link:hover { gap: 0.5rem; text-decoration: none; }

/* ─── Calendar Grid ─── */
.calendar-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.month-block {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.25rem;
  text-align: center; cursor: pointer; transition: var(--transition);
  text-decoration: none; display: block;
}
.month-block:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.month-block.cal-low { background: var(--low-bg); border-color: #bbf7d0; }
.month-block.cal-moderate { background: var(--moderate-bg); border-color: #fde68a; }
.month-block.cal-high { background: var(--high-bg); border-color: #fecaca; }
.month-block.cal-extreme { background: var(--extreme-bg); border-color: #ddd6fe; }
.month-block .month-name { font-weight: 700; font-size: 0.95rem; display: block; margin-bottom: 0.4rem; }
.month-block .month-rating { font-size: 0.75rem; font-weight: 600; opacity: 0.8; }

/* ─── Week Calendar Table ─── */
.week-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.week-table th {
  background: var(--light-gray); padding: 0.75rem 1rem;
  text-align: left; font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
}
.week-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.week-table tr:last-child td { border-bottom: none; }
.week-table tr.current-week td { background: #eff6ff; }
.week-table tr:hover td { background: var(--off-white); }
.week-tip { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-top: 0.25rem; }

/* ─── Month Overview Strip ─── */
.month-nav {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
  margin: 1.5rem 0;
}
.month-nav a {
  padding: 0.35rem 0.8rem; border-radius: var(--radius-pill);
  font-size: 0.8rem; font-weight: 600; border: 1px solid var(--border);
  text-decoration: none; transition: var(--transition);
  background: var(--white); color: var(--text-secondary);
}
.month-nav a:hover { background: var(--brand-blue); color: var(--white); border-color: var(--brand-blue); text-decoration: none; }
.month-nav a.low { background: var(--low-bg); color: #15803d; border-color: #bbf7d0; }
.month-nav a.moderate { background: var(--moderate-bg); color: #92400e; border-color: #fde68a; }
.month-nav a.high { background: var(--high-bg); color: #b91c1c; border-color: #fecaca; }
.month-nav a.extreme { background: var(--extreme-bg); color: #5b21b6; border-color: #ddd6fe; }

/* ─── Affiliate CTA Boxes ─── */
.affiliate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.affiliate-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa; border-radius: var(--radius-card);
  padding: 1.5rem; text-align: center; transition: var(--transition);
}
.affiliate-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.affiliate-card .aff-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.affiliate-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.affiliate-card p { font-size: 0.875rem; margin-bottom: 1rem; }

/* ─── Info Box / Alert ─── */
.info-box {
  background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-card); padding: 1.25rem 1.5rem;
}
.info-box.success { background: var(--low-bg); border-color: #bbf7d0; border-left-color: var(--low); }
.info-box.warning { background: var(--moderate-bg); border-color: #fde68a; border-left-color: var(--moderate); }
.info-box.danger { background: var(--high-bg); border-color: #fecaca; border-left-color: var(--high); }
.info-box h4 { margin-bottom: 0.35rem; }

/* ─── Tips / Article Cards ─── */
.tip-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.5rem;
  box-shadow: var(--shadow); transition: var(--transition);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.tip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.tip-card .tip-tag {
  display: inline-block; background: #eff6ff; color: var(--brand-blue);
  font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill); margin-bottom: 0.25rem;
}
.tip-card h3 { font-size: 1.05rem; }
.tip-card p { font-size: 0.875rem; flex: 1; }
.tip-card a.read-more {
  font-size: 0.875rem; font-weight: 600; color: var(--brand-blue);
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: auto;
}

/* ─── Article Content ─── */
.article-body { max-width: 780px; }
.article-body h2 { margin: 2rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.article-body h2:first-of-type { border-top: none; padding-top: 0; }
.article-body h3 { margin: 1.5rem 0 0.5rem; }
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { margin: 0.75rem 0 1rem 1.5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.4rem; color: var(--text-secondary); line-height: 1.65; }
.article-body strong { color: var(--text-primary); }

/* ─── Sidebar ─── */
.page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.25rem;
  box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.sidebar-card h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 1rem; }
.sidebar-card table { width: 100%; font-size: 0.85rem; }
.sidebar-card td { padding: 0.4rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.sidebar-card td:first-child { color: var(--text-muted); font-weight: 500; width: 45%; }
.sidebar-card tr:last-child td { border-bottom: none; }

/* ─── FAQ Section ─── */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.1rem 0; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: 1rem; font-weight: 600; color: var(--text-primary);
  font-family: var(--font);
}
.faq-question:hover { color: var(--brand-blue); }
.faq-icon { font-size: 1.25rem; transition: var(--transition); flex-shrink: 0; color: var(--text-muted); }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--brand-blue); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.faq-answer-inner { padding: 0 0 1.1rem; }
.faq-answer-inner p { font-size: 0.95rem; }

/* ─── Best Time Highlights ─── */
.highlight-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.highlight-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.25rem; text-align: center;
  box-shadow: var(--shadow);
}
.highlight-card .hl-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.highlight-card h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.highlight-card p { font-size: 0.8rem; }

/* ─── Footer ─── */
.footer {
  background: var(--light-gray); border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); max-width: 280px; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem;
}
.footer-col ul li { margin-bottom: 0.35rem; }
.footer-col ul li a { font-size: 0.875rem; color: var(--text-secondary); text-decoration: none; }
.footer-col ul li a:hover { color: var(--brand-blue); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.25rem;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-disclaimer { font-size: 0.78rem; color: var(--text-muted); max-width: 720px; line-height: 1.5; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Page Header ─── */
.page-header {
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  padding: 3rem 0 2.5rem;
}
.page-header .breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem;
}
.page-header .breadcrumb a { color: var(--brand-blue); text-decoration: none; }
.page-header .breadcrumb a:hover { text-decoration: underline; }
.page-header h1 { margin-bottom: 0.75rem; }
.page-header .lead { max-width: 680px; }

/* ─── Nav Pagination ─── */
.page-nav-strip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0; border-top: 1px solid var(--border); margin-top: 2rem;
}

/* ─── Tables ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  background: var(--light-gray); padding: 0.75rem 1rem;
  text-align: left; font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--off-white); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--border); }

/* ─── Tips bullets ─── */
.tips-list { display: flex; flex-direction: column; gap: 0.75rem; }
.tip-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--off-white); border-radius: 8px; padding: 0.85rem 1rem;
}
.tip-item .tip-num {
  background: var(--brand-blue); color: var(--white);
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0; margin-top: 0.1rem;
}
.tip-item p { font-size: 0.9rem; margin: 0; }

/* ─── Section Divider ─── */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ─── Responsive — 1024px ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .calendar-grid { grid-template-columns: repeat(3, 1fr); }
  .affiliate-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Responsive — 768px ─── */
@media (max-width: 768px) {
  .section { padding: 2.5rem 0; }
  .section-lg { padding: 3rem 0; }
  .hero { padding: 3rem 0 2.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: repeat(2, 1fr); }
  .affiliate-grid { grid-template-columns: 1fr; }
  .highlight-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .week-table { font-size: 0.8rem; }
  .week-table th, .week-table td { padding: 0.6rem 0.6rem; }
}

@media (max-width: 480px) {
  .calendar-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { text-align: center; justify-content: center; }
}
