:root {
  --green-900: #0a2f1d;
  --green-800: #116338;
  --green-700: #1a6b3c;
  --green-100: #eaf7ef;
  --whatsapp: #25d366;
  --gold: #1a6b3c;
  --gold-soft: #eef9f1;
  --ink: #111813;
  --muted: #617267;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3faf5;
  --line: #dbe8df;
  --danger: #a63a2b;
  --radius: 8px;
  --shadow-sm: 0 8px 22px rgba(8, 45, 28, 0.06);
  --shadow-md: 0 18px 42px rgba(8, 45, 28, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Poppins", "Noto Sans Malayalam", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

a {
  color: var(--green-700);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-900);
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: inherit;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: 2.22rem;
}

h2 {
  font-size: 1.74rem;
}

h3 {
  font-size: 1.08rem;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  color: var(--green-900);
  background: var(--gold);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(8, 45, 28, 0.05);
  backdrop-filter: blur(14px);
}

.site-header::before,
.kasavu-band {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--green-700), var(--whatsapp));
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(210px, 320px) 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.72rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img,
.footer-brand img {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(26, 107, 60, 0.08);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.05;
}

.brand span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.header-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input,
.select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd9d1;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  padding: 0.76rem 0.9rem;
  font: inherit;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--green-700);
}

textarea {
  min-height: 136px;
  resize: vertical;
}

.button,
.join-button,
.ghost-button,
.search-button,
.menu-toggle,
.watermark-button,
.hero-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: 0;
  padding: 0.74rem 1rem;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button,
.search-button {
  color: #fff;
  background: var(--green-700);
  box-shadow: 0 10px 20px rgba(26, 107, 60, 0.14);
}

.search-button {
  width: 52px;
  flex: 0 0 auto;
  padding-inline: 0;
}

.join-button {
  color: #052612;
  background: var(--whatsapp);
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.18);
}

.ghost-button,
.hero-card-link {
  color: var(--green-800);
  background: #fff;
  border: 1px solid var(--line);
}

.button:hover,
.join-button:hover,
.ghost-button:hover,
.search-button:hover,
.hero-card-link:hover,
.watermark-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--green-900);
  background: var(--green-100);
}

.menu-toggle {
  display: none;
  width: 46px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.menu-toggle span {
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff, #f4fbf6);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background:
    linear-gradient(90deg, transparent 0 30%, rgba(26, 107, 60, 0.06) 30% 30.4%, transparent 30.4% 100%),
    repeating-linear-gradient(90deg, transparent 0 86px, rgba(26, 107, 60, 0.05) 86px 87px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 2rem;
  align-items: center;
  padding: 4.6rem 0 4.2rem;
}

.eyebrow {
  margin: 0 0 0.72rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--green-700);
}

.lead {
  max-width: 800px;
  margin-top: 1rem;
  color: #3d5045;
  font-size: 1.04rem;
}

.page-lead {
  max-width: 850px;
  margin-top: 1rem;
  color: var(--muted);
}

.hero-search {
  width: min(720px, 100%);
  margin-top: 1.5rem;
  padding: 0.42rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.hero-search .input {
  border-color: transparent;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.15rem;
}

.category-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.36rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-800);
  background: var(--surface-2);
  font-size: 0.83rem;
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 720px;
  margin-top: 1.4rem;
}

.stat {
  min-height: 92px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 45, 28, 0.05);
}

.stat strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 0.24rem;
  color: var(--green-800);
  font-weight: 700;
}

.hero-brand-card {
  justify-self: end;
  width: min(100%, 340px);
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.hero-brand-card img {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

.hero-brand-card h2 {
  font-size: 1.18rem;
  text-align: center;
}

.hero-brand-card p {
  margin-top: 0.7rem;
  color: var(--muted);
  text-align: center;
}

.hero-card-link {
  width: 100%;
  margin-top: 1rem;
  background: var(--green-100);
  border-color: rgba(26, 107, 60, 0.2);
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: #f8fcf9;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.45rem;
}

.section-heading p {
  max-width: 680px;
  margin-top: 0.55rem;
  color: var(--muted);
}

.steps-grid,
.benefits-grid,
.info-grid,
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step,
.benefit,
.info-panel,
.contact-panel,
.rule-card {
  position: relative;
  min-height: 100%;
  padding: 1.24rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step::before,
.benefit::before,
.info-panel::before,
.contact-panel::before,
.rule-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--green-700), var(--whatsapp));
}

.step-number,
.benefit-mark,
.rule-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 42px;
  min-height: 34px;
  margin-bottom: 0.85rem;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  color: var(--green-900);
  background: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.directory-tools {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  gap: 1rem;
  align-items: end;
  justify-content: end;
  margin: 1.35rem 0 1.5rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-tab {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.filter-tab:hover {
  border-color: var(--green-700);
}

.filter-tab[aria-pressed="true"] {
  border-color: var(--green-700);
  color: #fff;
  background: var(--green-700);
}

.sort-wrap {
  min-width: 220px;
}

.sort-wrap label,
.field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-weight: 800;
}

.district-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.group-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(234, 247, 239, 0.8), transparent 120px),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.group-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green-700), var(--whatsapp));
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.35rem;
}

.district-name {
  margin-bottom: 0.18rem;
}

.malayalam {
  font-family: "Noto Sans Malayalam", "Poppins", sans-serif;
}

.district-ml {
  display: block;
  color: var(--green-700);
  font-weight: 800;
}

.status-badge {
  align-self: flex-start;
  flex: 0 0 auto;
  max-width: 126px;
  min-height: 32px;
  padding: 0.36rem 0.52rem;
  border-radius: 999px;
  color: var(--green-900);
  background: var(--green-100);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.group-card p {
  margin-top: 0.78rem;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  color: #30463a;
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-meta {
  display: grid;
  gap: 0.36rem;
  margin-top: 0.95rem;
  color: var(--green-800);
  font-size: 0.84rem;
  font-weight: 800;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.24rem 0.48rem;
  border-radius: 6px;
  color: var(--green-900);
  background: var(--green-100);
}

.card-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
}

.district-link {
  box-shadow: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed #bfcdbf;
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.empty-state p {
  max-width: 540px;
  margin: 0.6rem auto 1rem;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 20px rgba(8, 45, 28, 0.05);
}

.faq-list summary {
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.faq-list p {
  margin-top: 0.7rem;
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 3.6rem 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff, #f4fbf6);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green-700), var(--whatsapp));
}

.breadcrumbs {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--green-700);
  font-weight: 800;
}

.content-stack {
  display: grid;
  gap: 1rem;
}

.content-stack p,
.content-stack li {
  color: var(--muted);
}

.content-stack ul {
  margin: 0;
  padding-left: 1.2rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-status {
  min-height: 1.5rem;
  color: var(--green-700);
  font-weight: 800;
}

.form-status.error {
  color: var(--danger);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.site-footer {
  color: #33433a;
  background: #ffffff;
  border-top: 4px solid var(--green-700);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 2rem;
  padding: 3rem 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 42px;
  height: 42px;
}

.site-footer h2,
.site-footer h3 {
  color: var(--ink);
}

.site-footer p,
.site-footer li {
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links a {
  color: var(--green-700);
  font-weight: 800;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 0;
}

.watermark-button {
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  color: var(--green-800);
  background: var(--green-100);
  border: 1px solid rgba(26, 107, 60, 0.16);
  font-size: 0.82rem;
}

.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  max-width: 920px;
  margin-inline: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.cookie-banner p {
  color: var(--muted);
}

.reveal {
  animation: riseIn 420ms ease both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
