/* =============================================
   SarkariYojana.in - Main Stylesheet
   ============================================= */

:root {
  --saffron: #E8651A;
  --saffron-light: #FF8C42;
  --green: #0A7C3E;
  --green-light: #12A452;
  --navy: #0D1B3E;
  --navy-light: #1a2a5e;
  --cream: #FFFDF8;
  --gold: #F5A623;
  --white: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

a { color: var(--saffron); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ==================== HEADER ==================== */
.site-header {
  background: var(--navy);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--saffron);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.site-header .container {
  display: flex; align-items: center; gap: 20px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  color: white; font-weight: 800; font-size: 20px;
  white-space: nowrap; flex-shrink: 0;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 24px; }
.logo-text { color: white; }

.main-nav {
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
  margin-left: auto;
}
.main-nav a {
  color: rgba(255,255,255,0.85); padding: 6px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  transition: all 0.2s; text-decoration: none;
}
.main-nav a:hover { background: rgba(255,255,255,0.15); color: white; }

.nav-toggle {
  display: none; background: none; border: none;
  color: white; font-size: 22px; cursor: pointer; padding: 4px;
}

/* ==================== HERO ==================== */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 50%, #1a3a20 100%);
  padding: 60px 0;
  text-align: center;
}

.hero.hero-small { padding: 30px 0; }

.hero-text { margin-bottom: 36px; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15); color: white;
  padding: 6px 18px; border-radius: 50px; font-size: 13px;
  margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.25);
}

.hero h1 {
  font-size: clamp(26px, 4.5vw, 50px);
  font-weight: 800; color: white; line-height: 1.2;
  margin-bottom: 14px;
}

.hindi-text {
  font-family: 'Tiro Devanagari Hindi', serif;
  color: var(--gold); display: block;
  font-size: 0.6em; font-weight: 400;
  margin-bottom: 6px;
}

.hero p { color: rgba(255,255,255,0.75); font-size: 17px; max-width: 540px; margin: 0 auto; }

/* ==================== SEARCH ==================== */
.search-box-wrap { max-width: 700px; margin: 0 auto; }

.search-form { margin-bottom: 16px; }

.search-row {
  display: flex; background: white; border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border: 2px solid transparent;
  transition: border-color 0.3s;
}
.search-row:focus-within { border-color: var(--saffron); }

.search-input {
  flex: 1; padding: 18px 22px; font-size: 16px;
  font-family: 'Outfit', sans-serif; border: none; outline: none;
  color: var(--text); background: transparent;
}
.search-input::placeholder { color: #aaa; }

.search-btn {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-light));
  color: white; border: none; padding: 18px 32px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: 'Outfit', sans-serif; transition: opacity 0.2s;
  white-space: nowrap;
}
.search-btn:hover { opacity: 0.9; }

.quick-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.chip {
  background: rgba(255,255,255,0.15); color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 16px; border-radius: 50px; font-size: 13px;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.chip:hover { background: var(--saffron); border-color: var(--saffron); text-decoration: none; }

/* ==================== ADSENSE ==================== */
.adsense-wrap { max-width: 1200px; margin: 16px auto; padding: 0 20px; text-align: center; }

/* ==================== STATS BAR ==================== */
.stats-bar {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  margin: 24px 0;
}
.stat { text-align: center; }
.stat .num { display: block; font-size: 26px; font-weight: 800; color: var(--saffron); }
.stat .lbl { font-size: 13px; color: var(--muted); }

/* ==================== SECTIONS ==================== */
.section { margin-bottom: 40px; }
.section-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; color: var(--navy); }

.main-wrap { padding-top: 16px; padding-bottom: 40px; }

/* ==================== CATEGORIES GRID ==================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.cat-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 14px;
  text-align: center; transition: all 0.2s;
  text-decoration: none; color: var(--text); display: block;
}
.cat-card:hover {
  border-color: var(--saffron);
  box-shadow: 0 6px 24px rgba(232,101,26,0.15);
  transform: translateY(-3px); text-decoration: none;
}
.cat-card .cat-icon { font-size: 30px; margin-bottom: 8px; }
.cat-card .cat-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cat-card .cat-count { font-size: 12px; color: var(--muted); }

/* ==================== SCHEME CARDS ==================== */
.schemes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.scheme-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s; position: relative; overflow: hidden;
}

.scheme-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--saffron), var(--green));
}

.scheme-card:hover {
  border-color: var(--saffron);
  box-shadow: 0 8px 30px rgba(232,101,26,0.12);
  transform: translateY(-2px);
}

.card-inner { padding: 20px 20px 20px 24px; }

.card-top { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

.cat-pill {
  background: #fff3e0; color: var(--saffron);
  font-size: 11px; padding: 4px 12px; border-radius: 20px;
  font-weight: 600; border: 1px solid #ffe0b2;
}

.featured-pill {
  background: #fef3c7; color: #92400e;
  font-size: 11px; padding: 4px 12px; border-radius: 20px;
  font-weight: 600; border: 1px solid #fde68a;
}

.status-pill.active { background: #f0fdf4; color: var(--green); font-size: 11px; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.status-pill.inactive { background: #fef2f2; color: #dc2626; font-size: 11px; padding: 4px 12px; border-radius: 20px; font-weight: 600; }

.scheme-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; line-height: 1.4; }
.scheme-title a { color: var(--text); text-decoration: none; }
.scheme-title a:hover { color: var(--saffron); }

.scheme-hi-name { font-size: 13px; color: var(--muted); font-family: 'Tiro Devanagari Hindi', serif; margin-bottom: 10px; }

.scheme-desc { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 14px; }

.card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.benefit-badge {
  background: #f0fdf4; color: var(--green);
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  font-weight: 600; border: 1px solid #bbf7d0;
}

.ministry-badge {
  background: #f8fafc; color: #475569;
  font-size: 11px; padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--border); max-width: 200px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card-footer {
  display: flex; gap: 10px; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--border);
}

.btn-detail {
  background: var(--navy); color: white;
  padding: 8px 18px; border-radius: 8px; font-size: 13px;
  font-weight: 600; text-decoration: none; transition: all 0.2s;
}
.btn-detail:hover { background: var(--navy-light); text-decoration: none; color: white; }

.btn-apply {
  background: var(--green); color: white;
  padding: 8px 18px; border-radius: 8px; font-size: 13px;
  font-weight: 600; text-decoration: none; transition: all 0.2s;
}
.btn-apply:hover { background: var(--green-light); text-decoration: none; color: white; }

/* ==================== RESULTS ==================== */
.results-section { margin-bottom: 40px; }
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.results-header h2 { font-size: 20px; font-weight: 700; }
.count-badge {
  background: var(--saffron); color: white;
  padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
}

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.page-btn {
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--text); background: white;
  transition: all 0.2s;
}
.page-btn:hover, .page-btn.active { background: var(--saffron); color: white; border-color: var(--saffron); text-decoration: none; }

/* ==================== SEO CONTENT ==================== */
.seo-content {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
  margin-bottom: 40px;
}
.seo-content h2 { font-size: 20px; margin-bottom: 12px; color: var(--navy); }
.seo-content p { color: #555; margin-bottom: 20px; line-height: 1.8; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.seo-grid h3 { font-size: 15px; margin-bottom: 10px; }
.seo-grid ul { list-style: none; }
.seo-grid ul li { margin-bottom: 6px; font-size: 14px; }

.center-link { text-align: center; margin-top: 24px; }
.btn-outline {
  display: inline-block; border: 2px solid var(--saffron); color: var(--saffron);
  padding: 12px 28px; border-radius: 10px; font-weight: 700;
  text-decoration: none; transition: all 0.2s;
}
.btn-outline:hover { background: var(--saffron); color: white; text-decoration: none; }

/* ==================== DETAIL PAGE ==================== */
.breadcrumb {
  background: white; border-bottom: 1px solid var(--border);
  padding: 10px 0; font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--saffron); }

.detail-wrap {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 28px; padding-top: 28px; padding-bottom: 40px;
  align-items: start;
}

.detail-header { margin-bottom: 24px; }
.detail-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; color: var(--navy); }
.detail-header .hi-name { font-family: 'Tiro Devanagari Hindi', serif; font-size: 20px; font-weight: 400; color: var(--muted); margin-bottom: 12px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.scheme-short-desc { font-size: 17px; color: #444; line-height: 1.7; margin-bottom: 20px; }

.btn-apply-big {
  display: inline-block; background: var(--green); color: white;
  padding: 14px 32px; border-radius: 12px; font-size: 16px;
  font-weight: 700; text-decoration: none; transition: all 0.2s;
}
.btn-apply-big:hover { background: var(--green-light); text-decoration: none; color: white; }

.quick-info-box {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 24px;
}
.qi-item { padding: 12px; border-radius: 8px; background: #f9fafb; }
.qi-item.highlight { background: #f0fdf4; }
.qi-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.qi-val { font-size: 15px; font-weight: 700; color: var(--text); }

.tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); margin-bottom: 20px;
}
.tab {
  background: none; border: none; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--muted); font-family: 'Outfit', sans-serif;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all 0.2s;
}
.tab:hover { color: var(--saffron); }
.tab.active { color: var(--saffron); border-bottom-color: var(--saffron); }

.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content h3 { font-size: 18px; margin-bottom: 16px; color: var(--navy); }

.content-box { padding: 20px; border-radius: var(--radius); line-height: 1.8; font-size: 15px; }
.content-box.green { background: #f0fdf4; border: 1px solid #bbf7d0; }
.content-box.orange { background: #fff7ed; border: 1px solid #fed7aa; }
.content-box.blue { background: #eff6ff; border: 1px solid #bfdbfe; }
.content-box.purple { background: #faf5ff; border: 1px solid #e9d5ff; }

/* Sidebar */
.detail-sidebar position: sticky; top: 80px; }
.sidebar-box {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.sidebar-box h4 { font-size: 15px; margin-bottom: 14px; color: var(--navy); }
.sidebar-cat-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text); text-decoration: none;
}
.sidebar-cat-link:hover { color: var(--saffron); text-decoration: none; }
.sidebar-cat-link span {
  background: var(--border); padding: 2px 8px; border-radius: 20px; font-size: 12px;
}
.useful-links { list-style: none; }
.useful-links li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.75);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px; margin-bottom: 30px;
}
.footer-logo { color: white; font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.footer-grid p { font-size: 14px; line-height: 1.7; }
.disclaimer { font-size: 12px; margin-top: 10px; opacity: 0.7; }
.footer-grid h4 { color: white; margin-bottom: 12px; font-size: 15px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a { color: rgba(255,255,255,0.7); font-size: 14px; text-decoration: none; }
.footer-grid a:hover { color: var(--saffron); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }
.footer-bottom a { color: var(--saffron); }

/* ==================== ADMIN ==================== */
.admin-body { background: #f1f5f9; }
.admin-header {
  background: var(--navy); color: white; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-wrap { display: flex; min-height: calc(100vh - 54px); }
.admin-sidebar {
  width: 240px; background: white; border-right: 1px solid var(--border);
  padding: 20px 0; flex-shrink: 0;
}
.admin-sidebar a {
  display: block; padding: 12px 24px; color: var(--text); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: #fff3e0; color: var(--saffron); border-right: 3px solid var(--saffron); }
.admin-content { flex: 1; padding: 30px; }
.admin-title { font-size: 24px; font-weight: 800; margin-bottom: 24px; color: var(--navy); }

.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.admin-table th { background: var(--navy); color: white; padding: 12px 16px; text-align: left; font-size: 13px; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.admin-table tr:hover td { background: #f9fafb; }

.btn-sm { padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; display: inline-block; cursor: pointer; border: none; font-family: inherit; }
.btn-primary { background: var(--saffron); color: white; }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: #dc2626; color: white; }
.btn-secondary { background: #6b7280; color: white; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; outline: none;
  transition: border-color 0.2s; background: white;
}
.form-control:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(232,101,26,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-card { background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--card-shadow); }

.alert { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.dash-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--card-shadow); border-left: 4px solid var(--saffron); }
.dash-card .num { font-size: 32px; font-weight: 800; color: var(--saffron); }
.dash-card .lbl { font-size: 14px; color: var(--muted); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 12px 0; }
  .main-nav.open { display: flex; }
  .site-header .container { position: relative; flex-wrap: wrap; }
  .nav-toggle { display: block; margin-left: auto; }

  .search-btn { padding: 18px 20px; font-size: 14px; }

  .schemes-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  .detail-wrap { grid-template-columns: 1fr; }
  .detail-sidebar { display: none; }

  .quick-info-box { grid-template-columns: 1fr 1fr; }

  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 10px 0; }

  .stats-bar { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 36px 0; }
  .search-row { flex-direction: column; border-radius: 12px; }
  .search-input { border-radius: 12px 12px 0 0; }
  .search-btn { border-radius: 0 0 12px 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .tabs { gap: 2px; }
  .tab { padding: 8px 12px; font-size: 12px; }
}
