/* Kerala Heritage Explorer — Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #00695c;
  --primary-dark: #00493e;
  --primary-light: #4db6ac;
  --secondary: #ff6f00;
  --secondary-light: #ffa040;
  --text: #212121;
  --muted: #607d8b;
  --bg: #ffffff;
  --bg-soft: #f5f7f7;
  --border: #e0e0e0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', 'Noto Sans Malayalam', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); }
a:hover { color: var(--secondary); }

/* Skip to content */
.skip-to-content {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 1000;
}
.skip-to-content:focus { left: 0; }

/* ─── Site Header ─── */
.site-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 1.25rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.site-header a.brand {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
.site-header nav ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: 0; margin: 0;
}
.site-header nav a {
  color: #fff; text-decoration: none; opacity: .92; font-size: .95rem; padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] {
  border-bottom-color: var(--secondary); opacity: 1;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none; color: #fff; font-size: 1.5rem;
  cursor: pointer; padding: .25rem;
}

/* ─── Main Content ─── */
main {
  max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem;
}

/* ─── Page Hero (sub-pages) ─── */
.page-hero h1 {
  font-size: 2.2rem; line-height: 1.25; color: var(--primary-dark); margin-bottom: .75rem;
}
.page-hero p.lede {
  font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem;
}

/* ─── Article Styles (sub-pages) ─── */
article h2 {
  font-size: 1.5rem; color: var(--primary-dark); margin: 2.25rem 0 .9rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
article h3 {
  font-size: 1.15rem; color: var(--primary-dark); margin: 1.6rem 0 .6rem;
}
article p { margin-bottom: 1rem; }
article ul, article ol { margin: 0 0 1rem 1.5rem; }
article li { margin-bottom: .35rem; }
article em { color: var(--primary-dark); font-style: italic; }

.callout {
  background: var(--bg-soft); border-left: 4px solid var(--primary-light);
  padding: 1rem 1.1rem; margin: 1.5rem 0; border-radius: 0 8px 8px 0;
}

.related {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.related h2 { border-left: none; padding-left: 0; font-size: 1.2rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem 1.5rem; }
.related li { margin: 0; }

/* ─── Home Hero ─── */
.home-hero {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 12px;
  margin-bottom: 2.5rem;
}
.home-hero h1 {
  font-size: 2.6rem; margin-bottom: .75rem; line-height: 1.2;
}
.home-hero .lede {
  font-size: 1.1rem; max-width: 820px; margin: 0 auto; opacity: .95; line-height: 1.6;
}

/* ─── Home Introduction ─── */
.home-intro {
  margin-bottom: 3rem;
}
.home-intro h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.home-intro p { margin-bottom: 1rem; }

/* ─── Topic Grid ─── */
.topic-grid-section {
  margin-bottom: 3rem;
}
.topic-grid-section h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: .5rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.section-subtitle {
  color: var(--muted); margin-bottom: 1.5rem; padding-left: .75rem;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.topic-card {
  display: block;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,105,92,0.12);
  border-color: var(--primary-light);
  color: var(--text);
}
.topic-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: .5rem;
}
.topic-card h3 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: .4rem;
}
.topic-card p {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ─── Facts Section ─── */
.facts-section {
  margin-bottom: 3rem;
}
.facts-section h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1.25rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.fact-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
}
.fact-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.fact-label {
  font-size: .85rem;
  opacity: .9;
}

/* ─── Did You Know ─── */
.dyk-section {
  margin-bottom: 3rem;
}
.dyk-section h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1.25rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.dyk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.dyk-card {
  background: var(--bg-soft);
  border-left: 4px solid var(--secondary);
  padding: 1rem 1.1rem;
  border-radius: 0 8px 8px 0;
}
.dyk-card p {
  font-size: .95rem;
  margin: 0;
  line-height: 1.6;
}

/* ─── History Overview ─── */
.history-overview {
  margin-bottom: 3rem;
}
.history-overview h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.history-overview p { margin-bottom: 1rem; }
.history-overview a {
  font-weight: 600; color: var(--primary);
}

/* ─── Culture Highlights ─── */
.culture-highlights {
  margin-bottom: 3rem;
}
.culture-highlights h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1.25rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.highlight-card {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.highlight-card h3 {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: .6rem;
}
.highlight-card p {
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: .75rem;
  line-height: 1.55;
}
.highlight-card a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
}

/* ─── Travel Section ─── */
.travel-section {
  margin-bottom: 3rem;
}
.travel-section h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1.25rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.travel-info {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.travel-info h3 {
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-bottom: .5rem;
}
.travel-info p {
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: .75rem;
  line-height: 1.55;
}
.travel-info ul {
  margin: 0 0 .75rem 1.25rem;
  font-size: .9rem;
  color: var(--muted);
}
.travel-info li { margin-bottom: .3rem; }
.travel-info a {
  font-size: .9rem; font-weight: 600; color: var(--primary);
}

/* ─── About Brief ─── */
.about-brief {
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(0,105,92,0.05), rgba(77,182,172,0.08));
  border-radius: 10px;
  border: 1px solid rgba(0,105,92,0.12);
}
.about-brief h2 {
  font-size: 1.4rem; color: var(--primary-dark); margin-bottom: .75rem;
}
.about-brief p { margin-bottom: .75rem; font-size: .95rem; }
.about-brief a { font-weight: 600; color: var(--primary); }

/* ─── Donation Widget ─── */
.donation-section {
  margin-bottom: 3rem;
  text-align: center;
}
.donation-widget {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  max-width: 600px;
  margin: 0 auto;
}
.donation-widget h3 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.donation-widget p {
  margin-bottom: 1.25rem;
  opacity: .92;
  font-size: .95rem;
}
.donation-widget .donate-btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  background: var(--secondary);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.donation-widget .donate-btn:hover {
  background: var(--secondary-light);
  color: #fff;
  transform: translateY(-2px);
}

/* ─── Contact Form ─── */
.contact-page { margin-bottom: 2rem; }
.contact-page h2 {
  font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 1rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.contact-form { max-width: 600px; }
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block; margin-bottom: .35rem;
  font-weight: 500; color: var(--text); font-size: .95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .7rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,105,92,0.12);
}
.form-group textarea {
  min-height: 130px; resize: vertical;
}
.form-submit {
  display: inline-block;
  padding: .7rem 2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.form-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ─── About Page ─── */
.about-page { margin-bottom: 2rem; }
.about-page h2 {
  font-size: 1.5rem; color: var(--primary-dark); margin: 2rem 0 .9rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.about-page p { margin-bottom: 1rem; }
.about-page ul { margin: 0 0 1rem 1.5rem; }
.about-page li { margin-bottom: .35rem; }

/* ─── Privacy Page ─── */
.privacy-page { margin-bottom: 2rem; }
.privacy-page h2 {
  font-size: 1.5rem; color: var(--primary-dark); margin: 2rem 0 .9rem;
  border-left: 5px solid var(--secondary); padding-left: .75rem;
}
.privacy-page h3 {
  font-size: 1.15rem; color: var(--primary-dark); margin: 1.5rem 0 .5rem;
}
.privacy-page p { margin-bottom: 1rem; }
.privacy-page ul { margin: 0 0 1rem 1.5rem; }
.privacy-page li { margin-bottom: .35rem; }

/* ─── Site Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-col h4 {
  font-size: .95rem;
  margin-bottom: .75rem;
  color: #fff;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: .35rem; }
.footer-col a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: .9rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--secondary-light);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.25rem;
  text-align: center;
  font-size: .85rem;
  opacity: .8;
}
.footer-bottom p { margin-bottom: .25rem; }

/* ─── Cookie Banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary-dark);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 200;
  font-size: .9rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.cookie-banner a {
  color: var(--secondary-light);
}
.cookie-btn {
  background: var(--secondary);
  color: #fff;
  border: none;
  padding: .5rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.cookie-btn:hover {
  background: var(--secondary-light);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-header nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-header nav.nav-open {
    display: block;
  }
  .site-header nav ul {
    flex-direction: column;
    gap: 0;
    padding-top: .5rem;
  }
  .site-header nav a {
    display: block;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  .home-hero h1 { font-size: 1.9rem; }
  .page-hero h1 { font-size: 1.75rem; }
  article h2 { font-size: 1.3rem; }
  main { padding-top: 1.5rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .cookie-banner { flex-direction: column; gap: .75rem; text-align: center; }
}

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


/* --- Artwork --- */
.hero-art {
  display: block;
  width: 100%;
  max-width: 1100px;
  height: auto;
  margin: 0 auto 28px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 77, 64, 0.25);
}
.page-emblem {
  display: block;
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
}
.topic-emblem {
  display: block;
  width: 86px;
  height: 86px;
  margin: 0 auto 12px;
}
.byline {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 10px;
}
.byline a { color: inherit; }
@media (max-width: 600px) {
  .page-emblem { width: 88px; height: 88px; }
  .hero-art { border-radius: 10px; }
}
