/* ============================================================
   Australian School Holidays — Main Stylesheet
   Design: Clean, modern, mobile-first
   Colors: Australian green (#1a6b3c) + gold (#c9a227)
   ============================================================ */

:root {
  --green: #1a6b3c;
  --green-dark: #0f4525;
  --green-light: #e8f5ee;
  --gold: #c9a227;
  --gold-light: #fdf6e0;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --radius: 10px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.section { padding: 48px 0; }
.section-sm { padding: 32px 0; }

/* ── Header ── */
.site-header {
  background: var(--green);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo .logo-icon { font-size: 1.4rem; }
.site-logo .logo-text { line-height: 1.2; }
.site-logo .logo-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
  font-size: 1.4rem;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #2d9b5e 100%);
  color: var(--white);
  padding: 56px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 580px;
  margin: 0 auto 28px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); text-decoration: none; }

.btn-primary { background: var(--gold); color: var(--green-dark); border-color: var(--gold); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-green { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ── Year Tabs ── */
.year-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
  background: transparent;
}

.year-tab {
  padding: 7px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.year-tab.active, .year-tab:hover {
  background: var(--white);
  color: var(--green);
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
}

/* ── State Grid ── */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.state-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.state-card:hover {
  border-color: var(--green);
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--green-dark);
}

.state-card.active {
  border-color: var(--green);
  background: var(--green-light);
}

.state-abbr {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.state-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.state-capital {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.state-next-holiday {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 600;
  background: var(--green-light);
  padding: 3px 8px;
  border-radius: 20px;
}

/* ── Section Headings ── */
.section-heading {
  text-align: center;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
}

.section-heading .badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Holiday Table ── */
.holiday-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.holiday-section-header {
  background: var(--green);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.holiday-section-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.holiday-section-header .year-badge {
  background: rgba(255,255,255,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.82rem;
}

.term-block {
  border-bottom: 1px solid var(--border);
}

.term-block:last-child { border-bottom: none; }

.term-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 20px 10px;
  background: #fafafa;
}

.term-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.term-dates {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.holiday-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--green-light);
}

.holiday-icon { font-size: 1.1rem; }

.holiday-name {
  font-weight: 600;
  color: var(--green-dark);
  font-size: 0.9rem;
}

.holiday-dates-range {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.ph-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
}

.ph-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.ph-name { color: var(--text-muted); }
.ph-date { margin-left: auto; color: var(--text-muted); white-space: nowrap; }

/* ── Public Holidays Table ── */
.ph-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ph-table th {
  background: var(--green);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.ph-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.ph-table tr:last-child td { border-bottom: none; }
.ph-table tr:hover td { background: var(--green-light); }

.ph-table td:first-child { white-space: nowrap; }

.ph-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  padding: 0 4px;
}

/* ── Info Banner ── */
.info-banner {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.info-banner .icon { flex-shrink: 0; }

/* ── Alert / Next Holiday ── */
.next-holiday-banner {
  background: linear-gradient(135deg, var(--green) 0%, #2d9b5e 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.next-holiday-label {
  font-size: 0.8rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.next-holiday-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 4px 0;
}

.next-holiday-dates {
  font-size: 0.9rem;
  opacity: 0.9;
}

.next-holiday-countdown {
  text-align: center;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px 20px;
  flex-shrink: 0;
}

.countdown-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.countdown-label {
  font-size: 0.75rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Quick Nav Pills ── */
.state-pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.state-pill {
  padding: 7px 16px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
  text-decoration: none;
}

.state-pill:hover,
.state-pill.active {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
  text-decoration: none;
}

/* ── Tabs ── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.tab-btn:hover { color: var(--green); }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 { font-size: 1rem; font-weight: 700; }
.card-body { padding: 20px; }

/* ── Overview Grid ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ── Ad Slots ── */
.ad-slot {
  background: #f0f4f8;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin: 24px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Breadcrumbs ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--green); }
.breadcrumb span { opacity: 0.5; }

/* ── Page Header ── */
.page-header {
  background: var(--green);
  color: var(--white);
  padding: 40px 0 32px;
}

.page-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  opacity: 0.9;
  font-size: 1rem;
  max-width: 600px;
}

.page-header .breadcrumb {
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.page-header .breadcrumb a { color: rgba(255,255,255,0.9); }

/* ── State Page Header ── */
.state-nav-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 60px;
  z-index: 90;
}

/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

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

/* ── Footer ── */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 0 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255,255,255,0.55);
}

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

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-4 { gap: 16px; }

.highlight-tag {
  display: inline-block;
  background: var(--gold-light);
  color: #7a5c00;
  border: 1px solid var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; gap: 4px; }
  .nav-toggle { display: flex; }

  .header-inner { height: 56px; }

  .hero { padding: 40px 0 32px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .state-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .next-holiday-banner { flex-direction: column; }

  .holiday-row { grid-template-columns: auto 1fr; }
  .holiday-dates-range { grid-column: 2; }

  .term-header { grid-template-columns: 1fr; }
}

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

/* ── Print ── */
@media print {
  .site-header, .site-footer, .ad-slot, .nav-toggle { display: none; }
  .hero { background: none; color: var(--text); padding: 16px 0; }
  .hero h1 { color: var(--text); }
}
