/*
Theme Name: Scheme Alert
Theme URI: https://schemealert.com
Author: Amit
Description: Professional WordPress theme for Scheme Alert — a central government schemes information site. Built with dedicated "at a glance" scheme info boxes (last date, department, benefit amount), ad-ready widget areas, and full Hindi/English (Devanagari) typography support.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schemealert
*/

/* ============================================
   TOKENS
   ============================================ */
:root{
  --navy:#16324a;
  --navy-dark:#0d2233;
  --saffron:#d98e2d;
  --saffron-dark:#b8741e;
  --green:#2f7a5f;
  --paper:#f7f5f0;
  --card:#ffffff;
  --ink:#1c2530;
  --ink-dim:#5b6672;
  --line:#e6e2d8;
  --line-strong:#d6d0c2;
  --shadow: 0 1px 3px rgba(22,50,74,.06), 0 1px 2px rgba(22,50,74,.04);
  --radius:10px;
}

/* ============================================
   BASE
   ============================================ */
*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Hind', 'Noto Sans Devanagari', sans-serif;
  font-size:16px;
  line-height:1.7;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--navy); text-decoration:none; }
a:hover{ color:var(--saffron-dark); }
h1,h2,h3,h4{
  font-family:'Baloo 2', 'Hind', sans-serif;
  color:var(--navy-dark);
  line-height:1.3;
  margin:0 0 .5em;
}
h1{ font-size:2.1rem; font-weight:700; }
h2{ font-size:1.5rem; font-weight:700; }
h3{ font-size:1.15rem; font-weight:600; }
p{ margin:0 0 1.1em; }
ul{ padding-left:1.2em; }
.container{ max-width:1160px; margin:0 auto; padding:0 20px; }
.visually-hidden{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ============================================
   HEADER
   ============================================ */
.site-header{ background:var(--navy); color:#fff; }
.site-header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; gap:16px; flex-wrap:wrap;
}
.site-branding{ display:flex; align-items:center; gap:10px; }
.site-branding .logo-badge{
  width:38px; height:38px; border-radius:8px; background:var(--saffron);
  display:flex; align-items:center; justify-content:center;
  font-family:'Baloo 2', sans-serif; font-weight:800; color:var(--navy-dark); font-size:18px;
  flex-shrink:0;
}
.site-title{ font-family:'Baloo 2', sans-serif; font-size:1.35rem; font-weight:700; color:#fff; margin:0; }
.site-title a{ color:#fff; }
.site-description{ font-size:.78rem; color:#c7d3dc; margin:0; }

.primary-nav{ display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.primary-nav ul{ list-style:none; display:flex; gap:20px; margin:0; padding:0; flex-wrap:wrap; }
.primary-nav a{ color:#e7edf1; font-weight:500; font-size:.95rem; }
.primary-nav a:hover{ color:var(--saffron); }

.header-search{ display:flex; align-items:center; }
.header-search input[type=search]{
  border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.08);
  color:#fff; padding:8px 12px; border-radius:20px; font-size:.85rem; width:180px;
}
.header-search input::placeholder{ color:#b7c4cd; }
.header-search button{
  background:var(--saffron); border:none; color:var(--navy-dark); font-weight:700;
  padding:8px 14px; border-radius:20px; margin-left:6px; cursor:pointer; font-size:.85rem;
}

.menu-toggle{ display:none; background:none; border:1px solid rgba(255,255,255,.3); color:#fff; padding:7px 10px; border-radius:6px; }

@media (max-width:820px){
  .primary-nav{ display:none; width:100%; order:3; }
  .primary-nav.is-open{ display:flex; flex-direction:column; gap:0; padding-top:10px; border-top:1px solid rgba(255,255,255,.15); }
  .primary-nav ul{ flex-direction:column; gap:0; width:100%; }
  .primary-nav li{ padding:10px 0; border-bottom:1px solid rgba(255,255,255,.08); }
  .menu-toggle{ display:block; }
  .header-search{ order:2; }
}

/* ============================================
   HERO / SEARCH BAND (homepage)
   ============================================ */
.hero{
  background:linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color:#fff; padding:44px 20px 60px; text-align:center;
}
.hero h1{ color:#fff; font-size:2rem; margin-bottom:.35em; }
.hero p.tagline{ color:#cdd9e0; max-width:560px; margin:0 auto 24px; font-size:1.02rem; }
.hero-search{
  max-width:560px; margin:0 auto; display:flex; background:#fff; border-radius:30px;
  overflow:hidden; box-shadow:0 10px 30px rgba(0,0,0,.18);
}
.hero-search input{ flex:1; border:none; padding:14px 20px; font-size:.95rem; font-family:inherit; }
.hero-search input:focus{ outline:none; }
.hero-search button{
  border:none; background:var(--saffron); color:var(--navy-dark); font-weight:700;
  padding:0 26px; cursor:pointer; font-size:.95rem;
}
.hero-chips{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:20px; }
.hero-chips a{
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.25); color:#fff;
  padding:6px 14px; border-radius:20px; font-size:.83rem;
}
.hero-chips a:hover{ background:var(--saffron); color:var(--navy-dark); border-color:var(--saffron); }

/* ============================================
   LAYOUT: content + sidebar
   ============================================ */
.page-wrap{ display:grid; grid-template-columns:2.15fr 1fr; gap:34px; padding:38px 20px 60px; max-width:1160px; margin:0 auto; }
.page-wrap > main, .page-wrap > aside{ min-width:0; }
@media (max-width:880px){ .page-wrap{ grid-template-columns:1fr; } }

.section-heading{
  display:flex; align-items:baseline; justify-content:space-between; margin-bottom:18px;
  border-bottom:2px solid var(--line); padding-bottom:10px;
}
.section-heading h2{ margin:0; }
.section-heading .view-all{ font-size:.85rem; font-weight:600; color:var(--green); }

/* ============================================
   SCHEME CARD ("certificate stub" signature element)
   ============================================ */
.scheme-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:18px; margin-bottom:40px; }
@media (max-width:640px){ .scheme-grid{ grid-template-columns:1fr; } }

.scheme-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); display:flex; overflow:hidden; position:relative;
}
.scheme-card .stub{
  width:64px; flex-shrink:0; background:var(--navy); color:#fff; display:flex;
  align-items:center; justify-content:center; writing-mode:vertical-rl;
  font-family:'Baloo 2', sans-serif; font-size:.72rem; letter-spacing:.06em;
  text-transform:uppercase; padding:10px 0; position:relative; overflow:hidden;
  text-overflow:ellipsis;
}
.scheme-card .stub.cat-green{ background:var(--green); }
.scheme-card .stub.cat-saffron{ background:var(--saffron-dark); }
/* perforation notch between stub and body, like a ticket tear-line */
.scheme-card .stub::after{
  content:""; position:absolute; right:-6px; top:0; bottom:0; width:12px;
  background-image:radial-gradient(circle, var(--paper) 3.5px, transparent 3.6px);
  background-size:12px 14px; background-repeat:repeat-y; background-position:center;
}
.scheme-card .body{ padding:16px 18px 16px 22px; flex:1; }
.scheme-card .body h3{ margin-bottom:6px; font-size:1.05rem; }
.scheme-card .body h3 a{ color:var(--navy-dark); }
.scheme-card .excerpt{ font-size:.88rem; color:var(--ink-dim); margin-bottom:10px; }
.scheme-meta{ display:flex; flex-wrap:wrap; gap:8px; font-size:.75rem; }
.scheme-meta span{
  background:var(--paper); border:1px solid var(--line); border-radius:20px;
  padding:3px 10px; color:var(--ink-dim); font-weight:500;
}
.scheme-meta span.last-date{ color:var(--saffron-dark); border-color:rgba(217,142,45,.4); background:rgba(217,142,45,.08); }

/* ============================================
   POST LIST (latest updates)
   ============================================ */
.post-list{ list-style:none; margin:0 0 40px; padding:0; }
.post-list li{
  display:flex; gap:14px; padding:16px 0; border-bottom:1px solid var(--line);
}
.post-list .thumb{ width:96px; height:72px; border-radius:8px; overflow:hidden; flex-shrink:0; background:var(--line); }
.post-list .thumb img{ width:100%; height:100%; object-fit:cover; }
.post-list h3{ font-size:1rem; margin-bottom:4px; }
.post-list .meta{ font-size:.78rem; color:var(--ink-dim); }

/* ============================================
   SINGLE ARTICLE
   ============================================ */
.article-header{ margin-bottom:18px; }
.article-header .eyebrow{
  display:inline-block; background:var(--navy); color:#fff; font-size:.72rem;
  font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:4px 10px;
  border-radius:4px; margin-bottom:10px;
}
.article-header h1{ font-size:1.7rem; }
.article-meta{ font-size:.85rem; color:var(--ink-dim); }

.scheme-infobox{
  background:var(--card); border:1px solid var(--line-strong); border-radius:var(--radius);
  box-shadow:var(--shadow); margin:22px 0 28px; overflow:hidden;
}
.scheme-infobox .infobox-head{
  background:var(--navy); color:#fff; padding:10px 18px; font-family:'Baloo 2', sans-serif;
  font-weight:600; font-size:.95rem;
}
.scheme-infobox .infobox-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:0;
}
@media (max-width:640px){ .scheme-infobox .infobox-grid{ grid-template-columns:1fr; } }
.scheme-infobox .infobox-item{
  padding:14px 18px; border-right:1px dashed var(--line); border-bottom:1px dashed var(--line);
}
.scheme-infobox .infobox-item:last-child{ border-right:none; }
.scheme-infobox .infobox-item .k{ font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-dim); margin-bottom:3px; }
.scheme-infobox .infobox-item .v{ font-weight:600; color:var(--navy-dark); font-size:.98rem; }

.article-thumb{ margin:18px 0 6px; }
.article-thumb img{ border-radius:10px; box-shadow:var(--shadow); }
.article-body{ font-size:1.02rem; }
.article-body h2{ margin-top:1.6em; }
.article-body img{ border-radius:8px; margin:1em 0; }

.ad-slot{
  background:var(--card); border:1px dashed var(--line-strong); border-radius:8px;
  padding:14px; text-align:center; color:var(--ink-dim); font-size:.75rem;
  margin:26px 0; text-transform:uppercase; letter-spacing:.05em;
}

/* ============================================
   SIDEBAR
   ============================================ */
.widget{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:18px; margin-bottom:20px;
}
.widget-title{
  font-family:'Baloo 2', sans-serif; font-size:1rem; font-weight:700; color:var(--navy-dark);
  margin:0 0 12px; padding-bottom:8px; border-bottom:2px solid var(--paper);
}
.widget ul{ list-style:none; margin:0; padding:0; }
.widget li{ padding:8px 0; border-bottom:1px solid var(--line); font-size:.9rem; }
.widget li:last-child{ border-bottom:none; }
.widget li a{ color:var(--ink); }
.widget li a:hover{ color:var(--saffron-dark); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer{ background:var(--navy-dark); color:#c7d3dc; margin-top:20px; }
.footer-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:30px;
  max-width:1160px; margin:0 auto; padding:44px 20px;
}
@media (max-width:720px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-grid h4{ color:#fff; font-family:'Baloo 2', sans-serif; font-size:.95rem; margin-bottom:12px; }
.footer-grid ul{ list-style:none; margin:0; padding:0; }
.footer-grid li{ padding:5px 0; }
.footer-grid a{ color:#adbdc7; font-size:.88rem; }
.footer-widget{ margin-bottom:14px; font-size:.88rem; color:#adbdc7; }
.footer-widget ul{ list-style:none; margin:0; padding:0; }
.footer-widget li{ padding:4px 0; }
.ad-slot-wrap{ margin:26px 0; }
.footer-grid a:hover{ color:var(--saffron); }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08); text-align:center; padding:16px 20px;
  font-size:.8rem; color:#8798a3;
}

/* ============================================
   MISC PAGES
   ============================================ */
.page-title-band{ background:var(--card); border-bottom:1px solid var(--line); padding:26px 20px; }
.page-title-band h1{ margin:0; }
.pagination{ display:flex; gap:8px; margin:20px 0; }
.pagination a, .pagination span{
  padding:6px 12px; border:1px solid var(--line-strong); border-radius:6px; font-size:.85rem; color:var(--ink);
}
.pagination .current{ background:var(--navy); color:#fff; border-color:var(--navy); }

.searchform{ display:flex; gap:8px; margin-bottom:16px; }
.searchform input[type=search]{
  flex:1; padding:9px 12px; border:1px solid var(--line-strong); border-radius:6px; font-family:inherit;
}
.searchform button{
  background:var(--navy); color:#fff; border:none; padding:9px 16px; border-radius:6px; cursor:pointer;
}

.error-404{ text-align:center; padding:60px 20px; }
.error-404 .code{ font-family:'Baloo 2', sans-serif; font-size:4rem; color:var(--saffron); font-weight:800; }
