/*
Theme Name: Madhippumigu Magalir Thittam
Theme URI: https://example.com/madhippumigu-magalir-thittam
Author: Madhippumigu Magalir Thittam Editorial
Author URI: https://example.com
Description: Independent informational WordPress theme for the Kalaignar Magalir Urimai Thittam (Madhippumigu Magalir Thogai) scheme. Deep magenta / maroon / gold branding, custom page templates for Eligibility, How to Apply, Payment Status, Updates, FAQ, Documents, Scheme Details and Contact.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mmthittam
Tags: one-column, custom-menu, featured-images, threaded-comments, translation-ready, blog, education, government
*/

/* ============================================================
   Design tokens
============================================================ */
:root {
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --background: #fbf7f8;
  --foreground: #22131f;
  --card: #ffffff;
  --card-foreground: #22131f;

  --primary: #5b1240;
  --primary-foreground: #fdf6f2;

  --secondary: #f2e0e8;
  --secondary-foreground: #5b1240;

  --muted: #f6ecf1;
  --muted-foreground: #6b4a5c;

  --accent: #c81e5b;
  --accent-foreground: #ffffff;

  --destructive: #b32323;
  --destructive-foreground: #ffffff;

  --border: #ecd7e0;
  --input: #ecd7e0;
  --ring: #5b1240;

  --gold: #d3a447;
  --gold-foreground: #3a2a10;

  --surface: #fbf1f5;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gradient-primary: linear-gradient(135deg, #4a0f37 0%, #6b1548 55%, #c81e5b 100%);
}

/* ============================================================
   Reset + base
============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
p { margin: 0 0 0.75em; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
table { border-collapse: collapse; width: 100%; }

/* ============================================================
   Layout helpers
============================================================ */
.container-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* ============================================================
   Header
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--primary);
  color: var(--primary-foreground);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.disclaimer-bar {
  background: rgba(0,0,0,0.15);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.disclaimer-bar .container-page {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 6px;
  padding-bottom: 6px;
}
.disclaimer-bar .badge-info {
  background: var(--gold);
  color: var(--gold-foreground);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 8px;
  font-size: 10px;
}
.disclaimer-bar .official-link {
  background: rgba(255,255,255,0.12);
  color: inherit;
  padding: 2px 10px;
  border-radius: 3px;
}
.disclaimer-bar .official-link:hover { background: rgba(255,255,255,0.22); text-decoration: none; }

.site-header .main {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-branding { display: flex; align-items: center; gap: 0.75rem; color: inherit; }
.site-branding:hover { text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--gold);
  color: var(--gold-foreground);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border: 2px solid rgba(255,255,255,0.25);
}
.brand-text .brand-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.brand-text .brand-sub { font-size: 12px; opacity: 0.8; }

.main-navigation ul {
  display: flex; flex-wrap: wrap; gap: 4px;
  list-style: none; padding: 0; margin: 0;
  font-size: 14px;
}
.main-navigation a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  color: inherit;
  font-weight: 500;
  transition: background 0.15s;
}
.main-navigation a:hover { background: rgba(255,255,255,0.10); text-decoration: none; }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: rgba(255,255,255,0.15);
  color: var(--gold);
}

.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.10);
  border: 0; color: inherit;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
}

/* ============================================================
   Hero + sections
============================================================ */
.gradient-primary {
  background-image: var(--gradient-primary);
  color: var(--primary-foreground);
}
.page-hero { color: var(--primary-foreground); }
.page-hero .container-page { padding-top: 56px; padding-bottom: 56px; }
.page-hero .eyebrow {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold);
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 12px;
  max-width: 780px;
}
.page-hero .hero-desc {
  margin-top: 16px;
  max-width: 640px;
  opacity: 0.9;
}

/* Home hero */
.home-hero .container-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-top: 64px;
  padding-bottom: 80px;
}
@media (min-width: 900px) {
  .home-hero .container-page { grid-template-columns: 3fr 2fr; }
}
.home-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
}
.home-hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.home-hero .kicker .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--gold); display: inline-block; }
.home-hero .lead { font-size: 17px; opacity: 0.9; max-width: 620px; margin-top: 18px; }
.home-hero .sub { font-size: 14px; opacity: 0.75; max-width: 620px; margin-top: 14px; }
.home-hero .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.snapshot-card {
  border-radius: 20px;
  padding: 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
}
.snapshot-card .label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 12px;
}
.snapshot-card dl { margin: 0; }
.snapshot-card .row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.10);
  font-size: 14px;
}
.snapshot-card .row:last-child { border-bottom: 0; }
.snapshot-card dt { opacity: 0.8; }
.snapshot-card dd { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.snapshot-card dd small { font-size: 12px; font-weight: 400; opacity: 0.7; }

/* ============================================================
   Buttons
============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: filter 0.15s, background 0.15s, opacity 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-gold {
  background: var(--gold);
  color: var(--gold-foreground);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-outline-light {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  color: inherit;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}
.btn-secondary:hover { background: #ead1dc; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   Note strip
============================================================ */
.note-strip {
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
}
.note-strip .container-page {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding-top: 10px; padding-bottom: 10px;
  font-size: 14px;
}
.note-strip .tag {
  background: var(--destructive);
  color: var(--destructive-foreground);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 11px; padding: 2px 8px; border-radius: 3px;
  margin-right: 8px;
}
.note-strip .link { color: var(--primary); font-weight: 500; }

/* ============================================================
   Prose / page content
============================================================ */
.prose-section { padding: 56px 0; }
.prose {
  max-width: 780px; margin: 0 auto;
  color: var(--foreground);
  font-size: 15px; line-height: 1.7;
}
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-size: 1.9rem; }
.prose h3 { font-size: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose a { color: var(--primary); text-decoration: underline; }

/* ============================================================
   Cards + grids
============================================================ */
.section { padding: 64px 0; }
.section-title { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.section-title .meta { font-size: 14px; color: var(--muted-foreground); }

.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 18, 64, 0.4);
  box-shadow: 0 6px 24px rgba(91,18,64,0.08);
}
.card .kicker {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary);
}
.card h3 { font-size: 1.25rem; margin-top: 8px; }
.card p { margin-top: 8px; font-size: 14px; color: var(--muted-foreground); }
.card .arrow { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--primary); }
.card.gold-border { border-color: rgba(211,164,71,0.5); }

.surface-section { background: var(--surface); }

.big-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--primary);
  margin-top: 12px;
}
.big-number.accent { color: var(--accent); }

.pill {
  display: inline-block;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(211,164,71,0.2);
  color: var(--gold-foreground);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  margin-left: 10px;
}

/* Numbered steps */
.step {
  display: flex; gap: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
}
.step .num {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.step h3 { font-size: 1.15rem; }
.step p { font-size: 14px; color: var(--muted-foreground); margin-top: 4px; }
.step-list { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }

/* Callouts */
.callout {
  border-left: 4px solid var(--destructive);
  background: rgba(179,35,35,0.08);
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 14px;
}
.callout.info {
  border-left-color: var(--accent);
  background: var(--secondary);
  color: var(--secondary-foreground);
}

/* Updates list */
.updates-list {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  list-style: none; padding: 0; margin: 0;
}
.updates-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.updates-list li:last-child { border-bottom: 0; }
.updates-list .date {
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 4px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500;
}

.update-article {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
}
.update-article + .update-article { margin-top: 16px; }
.update-article .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px;
}
.update-article .tag {
  background: rgba(91,18,64,0.10);
  color: var(--primary);
  padding: 2px 8px; border-radius: 6px; font-weight: 600;
}
.update-article .date { color: var(--muted-foreground); }
.update-article h3 { font-size: 1.15rem; margin-top: 8px; }
.update-article p { font-size: 14px; color: var(--muted-foreground); margin-top: 8px; }

/* FAQ accordion */
.faq {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
.faq details { padding: 20px; border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .toggle {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--secondary); color: var(--primary);
  display: grid; place-items: center;
  transition: transform 0.2s;
  font-weight: 700;
}
.faq details[open] summary .toggle { transform: rotate(45deg); }
.faq p { margin-top: 12px; font-size: 14px; color: var(--muted-foreground); }

/* Table */
.data-table {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.data-table table { font-size: 14px; }
.data-table thead { background: var(--secondary); text-align: left; }
.data-table th, .data-table td { padding: 16px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody { background: var(--card); }
.data-table td:first-child { font-weight: 600; }

/* Compare cards */
.compare {
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .card { padding: 28px; border-radius: 18px; }

/* Eligibility band */
.band-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.band-primary .container-page {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  padding-top: 64px; padding-bottom: 64px;
}
@media (min-width: 900px) {
  .band-primary .container-page { grid-template-columns: 2fr 3fr; }
}
.band-primary h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.band-primary ul {
  display: grid; gap: 12px; list-style: none; padding: 0; margin: 0;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .band-primary ul { grid-template-columns: 1fr 1fr; }
}
.band-primary li {
  display: flex; gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 14px;
}
.band-primary .num {
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--gold); color: var(--gold-foreground);
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}

/* CTA card */
.cta-card {
  border-radius: 24px;
  padding: 48px 40px;
  background-image: var(--gradient-primary);
  color: var(--primary-foreground);
}
.cta-card .grid-cta {
  display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center;
}
@media (min-width: 800px) {
  .cta-card .grid-cta { grid-template-columns: 2fr 1fr; }
}
.cta-card h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-card p { opacity: 0.9; margin-top: 12px; }
.cta-card .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 799px) { .cta-card .actions { justify-content: flex-start; } }

/* Forms */
.form-card {
  display: grid; gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.form-field { display: grid; gap: 6px; }
.form-field label { font-size: 14px; font-weight: 500; }
.form-field input, .form-field textarea {
  width: 100%;
  border: 1px solid var(--input);
  background: var(--background);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit; font-size: 14px;
  color: inherit;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(91,18,64,0.2);
  border-color: var(--primary);
}

/* ============================================================
   Footer
============================================================ */
.site-footer {
  margin-top: 96px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-top: 1px solid var(--border);
}
.site-footer .top {
  display: grid; gap: 40px; grid-template-columns: 1fr;
  padding: 56px 0;
}
@media (min-width: 800px) { .site-footer .top { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0 0 12px;
  font-weight: 700;
}
.site-footer .brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.site-footer .about { margin-top: 12px; font-size: 14px; opacity: 0.85; max-width: 460px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { color: inherit; opacity: 0.85; }
.site-footer ul a:hover { opacity: 1; }
.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
}
.site-footer .bottom .container-page {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-top: 16px; padding-bottom: 16px;
  font-size: 12px; opacity: 0.75;
}

/* ============================================================
   Single post / archive fallback
============================================================ */
.entry {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}
.entry + .entry { margin-top: 20px; }
.entry-title { font-size: 1.75rem; }
.entry-meta { font-size: 13px; color: var(--muted-foreground); margin: 8px 0 16px; }

.pagination { display: flex; gap: 8px; margin-top: 24px; justify-content: center; }
.pagination a, .pagination span {
  padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 14px;
}
.pagination .current { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ============================================================
   Mobile navigation
============================================================ */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation { flex-basis: 100%; display: none; }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0; }
  .main-navigation a { display: block; padding: 10px 12px; }
}

/* WP alignments */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption { max-width: 100%; }
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px; width: 1px; overflow: hidden;
}
