/* TVK Homepage — stable layout (sections never overlap) */
:root {
  --hp: #1e3a5f;
  --hp-dark: #0f2744;
  --ha: #e11d48;
  --hg: #c9a227;
  --bg: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(15, 39, 68, 0.08);
  --nav-h: 68px;
  --max: 1100px;
  --gap: 1.25rem;
  --section-pad: 3.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.home-page {
  margin: 0;
  padding: 0;
  font-family: Inter, "Noto Sans Tamil", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Stack everything in normal document flow */
body.home-page > * {
  position: relative;
  float: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== NAV (fixed, reserved space via ticker margin) ===== */
.home-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: #0f2744;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.home-nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.home-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  flex-shrink: 0;
}
.home-brand img {
  height: 40px;
  width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  object-fit: contain;
}
.home-brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ha), #be123c);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 0.9rem;
  flex-shrink: 0;
}
.home-brand-text strong { display: block; font-size: 0.88rem; line-height: 1.2; }
.home-brand-text span { font-size: 0.62rem; opacity: 0.75; }
.home-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  justify-content: flex-end;
}
.home-nav-links a {
  color: rgba(255,255,255,0.92);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}
.home-nav-links a:hover { background: rgba(255,255,255,0.12); }
.home-nav-links .btn-nav {
  background: var(--ha);
  color: #fff !important;
  font-weight: 700;
  margin-left: 0.2rem;
}

/* ===== TICKER ===== */
.home-ticker {
  margin-top: var(--nav-h);
  background: linear-gradient(90deg, var(--ha), #be123c);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.48rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}
.home-ticker-track {
  display: inline-flex;
  gap: 3rem;
  animation: ticker 30s linear infinite;
  will-change: transform;
}
.home-ticker-track span { padding: 0 0.5rem; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== HERO PHOTO (own block, fixed aspect) ===== */
.hero-photo-wrap {
  display: block;
  width: 100%;
  background: var(--hp-dark);
  line-height: 0;
  overflow: hidden;
}
.hero-photo-wrap img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center center;
}
.hero-photo-wrap .photo-fallback {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #0f2744, #1e3a5f 55%, #1e40af 85%, #e11d48);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.12);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
}

/* ===== HERO CONTENT (below photo, own block) ===== */
.hero-content-band {
  display: block;
  background: linear-gradient(180deg, var(--hp-dark), var(--hp));
  color: #fff;
  padding: 2.5rem 1.25rem 2.75rem;
  border-top: 3px solid var(--ha);
}
.hero-content-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.75rem;
  align-items: start;
}
.hero-badge {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(201,162,39,0.2);
  color: #fde68a;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(201,162,39,0.35);
  margin-bottom: 0.75rem;
}
.hero-content-band h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
}
.hero-content-band .lead {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  opacity: 0.9;
  max-width: 34rem;
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
}
.btn-hero-primary {
  background: var(--ha);
  color: #fff;
  box-shadow: 0 6px 18px rgba(225,29,72,0.3);
}
.btn-hero-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
}
.hero-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 1.2rem;
}
.hero-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.hero-card form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hero-card input {
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  border: none;
  font-size: 0.9rem;
  font-family: inherit;
}
.hero-card button {
  padding: 0.65rem;
  border-radius: 9px;
  border: none;
  background: #fff;
  color: var(--hp);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ===== STATS (normal flow, NO negative margin) ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  max-width: var(--max);
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}
.stat-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}
.stat-box .num {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--hp);
  line-height: 1.2;
}
.stat-box .lbl {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ===== SECTIONS — isolated blocks ===== */
.home-section {
  display: block;
  width: 100%;
  padding: var(--section-pad) 1.25rem;
  margin: 0;
  clear: both;
  background: var(--bg);
}
.home-section.section-alt {
  background: #fff;
}
.home-section-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.section-title {
  text-align: center;
  margin: 0 0 1.75rem;
}
.section-title h2 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 800;
  color: var(--hp-dark);
}
.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.section-title .bar {
  width: 40px;
  height: 3px;
  border-radius: 3px;
  margin: 0.65rem auto 0;
  background: linear-gradient(90deg, var(--ha), var(--hg));
}

/* Mission / Vision */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.mv-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--ha);
}
.home-section.section-alt .mv-card { background: var(--bg); }
.mv-card.vision { border-left-color: var(--hg); }
.mv-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  color: var(--hp-dark);
}
.mv-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.about-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.about-grid .placeholder-img {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--hp), var(--ha));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.25rem;
  font-weight: 800;
}
.about-content h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--hp-dark);
}
.about-content p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.step-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.35rem 1.1rem;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.home-section.section-alt .step-card { background: var(--bg); }
.step-num {
  width: 44px; height: 44px;
  border-radius: 12px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(135deg, var(--hp), var(--ha));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  color: var(--hp-dark);
}
.step-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}
.cat-chip {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.7rem 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hp);
}
.home-section.section-alt .cat-chip { background: var(--bg); }

/* Announcements */
.announce-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.announce-item {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--ha);
}
.home-section.section-alt .announce-item { background: var(--bg); }
.announce-item h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  color: var(--hp-dark);
}
.announce-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.7rem;
}
.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  background: #cbd5e1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.5rem 0.7rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Leaders */
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
}
.leader-card {
  background: #fff;
  border-radius: var(--radius);
  text-align: center;
  padding: 1.1rem 0.75rem;
  border: 1px solid #e2e8f0;
}
.home-section.section-alt .leader-card { background: var(--bg); }
.leader-card img,
.leader-card .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.6rem;
  border: 3px solid #fee2e2;
}
.leader-card .avatar {
  background: linear-gradient(135deg, var(--hp), var(--ha));
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leader-card h4 {
  margin: 0 0 0.15rem;
  font-size: 0.86rem;
}
.leader-card p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* FAQ */
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.home-section.section-alt .faq-item { background: var(--bg); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hp-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.faq-q .icon { color: var(--ha); font-size: 1.1rem; flex-shrink: 0; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 1rem 0.9rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.faq-item.open .faq-a { display: block; }

/* Helpline */
.helpline-strip {
  display: block;
  background: linear-gradient(120deg, var(--hp-dark), var(--hp), #1e40af);
  color: #fff;
  padding: 1.85rem 1.25rem;
  text-align: center;
}
.helpline-strip h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}
.helpline-strip .phone {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.35rem 0;
}
.helpline-strip .socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.helpline-strip .socials a {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.contact-card .ico { font-size: 1.35rem; margin-bottom: 0.35rem; }
.contact-card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
}
.contact-card p,
.contact-card a {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Banners */
.banner-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.banner-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 150px;
  background: var(--hp);
}
.banner-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.banner-item .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff;
}
.banner-item .cap strong {
  display: block;
  font-size: 0.88rem;
}

/* Footer */
.home-footer {
  display: block;
  background: var(--hp-dark);
  color: rgba(255,255,255,0.8);
  padding: 2rem 1.25rem 1.25rem;
  text-align: center;
}
.home-footer a {
  color: #fff;
  margin: 0 0.45rem;
  font-size: 0.86rem;
}
.home-footer .copy {
  margin-top: 0.9rem;
  font-size: 0.74rem;
  opacity: 0.65;
}

/* Mobile bottom bar — only small screens */
.mobile-cta { display: none; }

/* ===== RESPONSIVE (does not affect desktop base) ===== */
@media (max-width: 900px) {
  .hero-content-inner,
  .about-grid,
  .mv-grid {
    grid-template-columns: 1fr;
  }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .steps-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-photo-wrap img { height: 220px; }
  .home-nav-links .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .hero-photo-wrap img { height: 180px; }
  .home-section { padding: 2.25rem 1rem; }
  .stats-row {
    margin-top: 1.15rem;
    padding: 0 1rem;
  }
  .mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 900;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 0.5rem 0.65rem;
    gap: 0.4rem;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }
  .mobile-cta a {
    flex: 1;
    text-align: center;
    padding: 0.55rem;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 700;
  }
  .mobile-cta .m1 { background: var(--ha); color: #fff; }
  .mobile-cta .m2 { background: var(--hp); color: #fff; }
  .mobile-cta .m3 { background: #f1f5f9; color: var(--hp); }
  body.home-page { padding-bottom: 64px; }
  .home-footer { padding-bottom: 1.25rem; }
}
