/* =====================================================================
   தமிழ்த் திருத்தலங்கள் — shared stylesheet
   Common header / nav / footer + all page components
   ===================================================================== */

:root {
  --saffron: #e1701a;
  --saffron-light: #ffb35c;
  --saffron-dark: #b35500;
  --maroon: #7a1f1f;
  --maroon-dark: #571313;
  --cream: #fff8ef;
  --ink: #33261a;
  --muted: #5a4636;
  --line: #e8d8c4;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.16);
}

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

::selection { background: var(--saffron); color: #fff; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans Tamil", "Noto Sans", "Latha", "Nirmala UI", "Tamil Sangam MN", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.85;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------- Top header / nav ------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--maroon-dark), var(--maroon));
  box-shadow: 0 3px 12px rgba(50, 8, 8, 0.4);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  padding: 0.7rem 1.2rem;
}

.brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

.brand span { color: var(--saffron-light); }

.brand:hover span { color: #ffe7a1; }

.nav-links { display: flex; flex-wrap: wrap; gap: 0.2rem; }

.nav-links a {
  color: #ffe9d6;
  text-decoration: none;
  padding: 0.45rem 0.95rem;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover { background: rgba(255, 255, 255, 0.14); }
.nav-links a.active { background: var(--saffron); color: #fff; }

/* ------------------------- Hero ------------------------- */
.hero {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, var(--saffron-dark), var(--maroon) 78%);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem 4.4rem;
}

.hero-symbol { font-size: 3.2rem; line-height: 1; margin-bottom: 0.5rem; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }

.hero h1 {
  font-size: 2.9rem;
  line-height: 1.2;
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.hero p { font-size: 1.16rem; opacity: 0.95; max-width: 700px; margin: 0 auto; }

.btn {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.7rem 1.9rem;
  border-radius: 30px;
  background: var(--saffron-light);
  color: var(--maroon-dark);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28); }

/* ------------------------- Layout & headings ------------------------- */
main { flex: 1; width: 100%; max-width: 1100px; margin: 2rem auto; padding: 0 1.2rem; }
main.narrow { max-width: 860px; }

section { margin-bottom: 3rem; }
section:last-child { margin-bottom: 1rem; }

h2 {
  color: var(--saffron-dark);
  font-size: 1.55rem;
  line-height: 1.3;
  padding-bottom: 0.5rem;
  margin-bottom: 1.1rem;
}

h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  border-radius: 4px;
  margin-top: 0.55rem;
  background: linear-gradient(90deg, var(--saffron), var(--saffron-light));
}

h3 { color: var(--maroon); margin: 1.3rem 0 0.5rem; font-size: 1.18rem; }
p { margin-bottom: 1rem; text-align: justify; }
ul { margin: 0.6rem 0 1rem 1.6rem; }
li { margin-bottom: 0.35rem; }
strong { color: var(--maroon); }
a { color: var(--saffron-dark); text-decoration-thickness: 1.5px; }

/* ------------------------- Cards (hubs) ------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--saffron);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .card-icon { font-size: 2.6rem; }

.card h2 {
  color: var(--maroon);
  margin: 0.7rem 0 0.5rem;
  font-size: 1.45rem;
  padding: 0;
}

.card h2::after { display: none; }
.card p { color: var(--muted); text-align: left; margin-bottom: 0; }

.card .more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--saffron-dark);
  font-weight: 700;
}

.card:hover .more { color: var(--maroon); }

/* ------------------------- Highlights (Srirangam) ------------------------- */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.highlights .card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--saffron);
  border-top: none;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.highlights .card strong { color: var(--saffron-dark); display: block; margin-bottom: 0.2rem; }

/* ------------------------- Gallery ------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.3rem 0;
}

.gallery img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* ------------------------- Quote / info box ------------------------- */
.quote {
  background: linear-gradient(135deg, #fdeeda, #fff3e0);
  border-left: 5px solid var(--saffron);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  font-size: 1.05rem;
  margin: 1.3rem 0;
}

.info-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.7rem;
  box-shadow: var(--shadow);
}

.info-box p { margin-bottom: 0.6rem; text-align: left; }
.info-box p:last-child { margin-bottom: 0; }

/* ------------------------- Stat grids (Divya Desam) ------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  margin: 1.1rem 0;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--saffron);
  border-radius: 10px;
  padding: 1rem 0.7rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.stat .num { font-size: 1.8rem; font-weight: 800; color: var(--maroon); line-height: 1.2; }
.stat .label { font-size: 0.88rem; color: var(--muted); }

/* ------------------------- Toolbar / table ------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 1rem 0;
}

.toolbar input[type="search"] {
  flex: 1 1 260px;
  padding: 0.75rem 1.1rem;
  border: 2px solid var(--saffron);
  border-radius: 30px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: #fff;
}

.toolbar input[type="search"]:focus { box-shadow: 0 0 0 3px rgba(225, 112, 26, 0.25); }

.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover { border-color: var(--saffron); }
.chip.active { background: var(--saffron); color: #fff; border-color: var(--saffron); }
.count { color: var(--saffron-dark); font-weight: 700; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

table { border-collapse: collapse; width: 100%; min-width: 780px; font-size: 0.92rem; }

thead th {
  background: var(--maroon);
  color: #fff;
  padding: 0.8rem 0.65rem;
  text-align: left;
  position: sticky;
  top: 0;
  font-size: 0.9rem;
  white-space: nowrap;
}

tbody td { padding: 0.6rem; border-bottom: 1px solid #f0e4d4; vertical-align: top; }
tbody tr:nth-child(even) { background: #fffaf4; }
tbody tr:hover { background: #fdeeda; }
td.place { font-weight: 600; color: var(--maroon); }
td.no { color: var(--saffron-dark); font-weight: 700; text-align: right; }
mark { background: #ffd9a8; padding: 0 2px; border-radius: 3px; }
.empty { display: none; text-align: center; padding: 2rem; color: #886; }

/* ------------------------- Tiruchendur components ------------------------- */
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title .sym { font-size: 2.4rem; line-height: 1; display: block; margin-bottom: 0.4rem; }
.section-title h2 { display: inline-block; font-size: 1.7rem; padding-bottom: 0.5rem; }
.section-title h2::after { margin: 0.55rem auto 0; }

section.intro,
section.history,
section.info {
  background: #fdf1e0;
  border-radius: var(--radius);
  padding: 2.4rem 1.6rem;
}

.intro-box,
.history-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.08rem;
}

.intro-box { text-align: center; }
.intro-box p:last-child,
.history-content p:last-child { margin-bottom: 0; }

.highlight {
  background: linear-gradient(135deg, var(--saffron-dark), var(--maroon));
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
}

.highlight h2 { color: var(--saffron-light); }
.highlight p { max-width: 760px; margin: 0 auto; color: #ffe9d6; font-size: 1.1rem; }

.festival-card {
  padding: 1.6rem 1.4rem;
  background: #fff;
  border-radius: 12px;
  border-left: 5px solid var(--saffron);
  box-shadow: var(--shadow);
}

.festival-card .f-icon { font-size: 1.7rem; margin-bottom: 0.3rem; }
.festival-card h3 { color: var(--maroon); margin: 0 0 0.5rem; }
.festival-card p { color: var(--muted); text-align: left; margin-bottom: 0; }

.info-table {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.info-row { display: grid; grid-template-columns: 34% 66%; }
.info-row:nth-child(even) { background: #fffaf4; }
.info-row:not(:last-child) { border-bottom: 1px solid #f0e4d4; }
.info-label { padding: 0.95rem 1.1rem; font-weight: 700; background: #fff6e9; color: var(--saffron-dark); }
.info-value { padding: 0.95rem 1.1rem; }

.quote-band {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
}

.quote-band .sym { font-size: 2.6rem; color: var(--saffron-light); }
.quote-band p { font-size: 1.4rem; max-width: 760px; margin: 0.8rem auto; color: #ffe7a1; font-weight: 700; }
.quote-band small { color: #fff; opacity: 0.9; }

/* ------------------------- Footer ------------------------- */
footer {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: #ffe9d6;
  text-align: center;
  padding: 2.2rem 1rem;
  margin-top: 3rem;
}

footer .foot-brand { color: #fff; font-size: 1.15rem; font-weight: 800; margin-bottom: 0.5rem; }
footer .foot-links { margin-bottom: 0.7rem; }

footer .foot-links a {
  color: var(--saffron-light);
  text-decoration: none;
  margin: 0 0.5rem;
  font-weight: 600;
}

footer .foot-links a:hover { color: #ffe7a1; text-decoration: underline; }
footer .foot-note { font-size: 0.85rem; opacity: 0.82; }

/* ------------------------- Responsive ------------------------- */
@media (max-width: 900px) {
  .brand { margin-right: 0; width: 100%; text-align: center; }
  .nav-links { justify-content: center; }
  .nav { justify-content: center; }
}

@media (max-width: 640px) {
  .hero { padding: 3.2rem 1.2rem 2.8rem; }
  .hero h1 { font-size: 1.85rem; }
  .hero p { font-size: 1rem; }
  .hero-symbol { font-size: 2.4rem; }
  p { text-align: left; }
  h2 { font-size: 1.35rem; }
  .cards { grid-template-columns: 1fr; }
  section.intro,
  section.history,
  section.info { padding: 1.8rem 1.1rem; }
  .info-row { grid-template-columns: 1fr; }
  .info-label { padding-bottom: 0.4rem; }
  .nav-links a { padding: 0.4rem 0.7rem; font-size: 0.95rem; }
}