:root {
  --primary: #8B1A1A;
  --primary-light: #A52A2A;
  --accent: #D4A017;
  --bg: #FFF9F0;
  --bg-card: #FFFFFF;
  --text: #2D2D2D;
  --text-light: #666;
  --border: #E8DDD0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --max-width: 1200px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.site-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.site-logo h1 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.site-logo h1 a { color: white; }

/* Navigation */
nav { display: flex; align-items: center; }

nav a {
  color: rgba(255,255,255,0.9);
  padding: 1rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  color: white;
  background: rgba(255,255,255,0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #5C1010 100%);
  color: white;
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero .btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  color: #1a1a1a;
}

/* Main content */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Section headings */
.section-title {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.card-body { padding: 1.25rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--primary); }
.card-body p { font-size: 0.95rem; color: var(--text-light); }

/* Board members */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.board-card {
  background: var(--bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

.board-card .role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.board-card .name {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

/* Artists */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.artist-card {
  background: var(--bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.artist-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.artist-card .info {
  padding: 1.25rem;
  text-align: center;
}

.artist-card .info h3 { color: var(--primary); margin-bottom: 0.25rem; }
.artist-card .info p { color: var(--text-light); font-size: 0.9rem; }

/* Thirukkural chapter grid */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.chapter-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}

.chapter-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.chapter-link .num {
  background: var(--primary);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.chapter-link:hover .num {
  background: var(--accent);
  color: #1a1a1a;
}

.chapter-link .title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Chapter detail page */
.chapter-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.chapter-header {
  text-align: center;
  margin-bottom: 2rem;
}

.chapter-header h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.chapter-header .chapter-num {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.audio-player {
  background: linear-gradient(135deg, var(--primary), #5C1010);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.audio-player p {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.audio-player audio {
  width: 100%;
  max-width: 500px;
}

.couplet {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: var(--shadow);
}

.couplet .number {
  position: absolute;
  top: -10px;
  left: 1rem;
  background: var(--accent);
  color: #1a1a1a;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.couplet .tamil-text {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text);
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  gap: 1rem;
}

.chapter-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.chapter-nav a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* News articles */
.news-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.news-article h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.news-article p { margin-bottom: 0.75rem; color: var(--text-light); }

.news-article .media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.news-article .media-links a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--primary);
  color: white;
  border-radius: 5px;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.news-article .media-links a:hover { background: var(--primary-light); }

/* Social links */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.social-links a:hover {
  background: var(--primary);
  color: white;
}

/* Homepage media feed */
.feed-section {
  margin-bottom: 3rem;
  text-align: center;
}

.feed-section .section-title {
  margin-bottom: 1.5rem;
}

.media-center {
  text-align: center;
  margin-bottom: 2rem;
}

.media-center img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.media-center.narrow img {
  max-width: 420px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: white;
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  transition: transform 0.2s;
}

.btn-accent:hover {
  transform: translateY(-2px);
  color: #1a1a1a;
}

/* Flyer display — portrait images centered, fill container width */
.flyer-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.flyer-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.flyer-row img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.flyer-single {
  text-align: center;
  margin-bottom: 1.5rem;
}

.flyer-single img {
  width: 60%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Photo grids — landscape/square images in uniform cards */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Winner cards — square images in even 4-col grid */
.winner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.winner-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Scrollable gallery */
.image-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

.image-scroll img {
  height: 50vh;
  min-height: 300px;
  width: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  flex-shrink: 0;
}

.divider {
  border: none;
  border-top: 3px solid var(--accent);
  margin: 3rem auto;
  width: 20%;
  max-width: 200px;
}

.about-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  text-align: left;
}

.about-box p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-light);
}

.stream-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #5C1010 100%);
  color: white;
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.stream-banner h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stream-banner p {
  opacity: 0.85;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .flyer-row { grid-template-columns: 1fr; }
  .flyer-row.cols-3 { grid-template-columns: 1fr; }
  .flyer-single img { width: 100%; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .winner-grid { grid-template-columns: repeat(2, 1fr); }
  .image-scroll img { height: 280px; min-height: 200px; }
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.site-footer p { font-size: 0.9rem; }
.site-footer a { color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }

  nav.open { display: flex; }

  nav a {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .hero h2 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .chapter-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .board-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

  .chapter-header h2 { font-size: 1.4rem; }

  .chapter-nav {
    flex-direction: column;
  }
}
