/*
Theme Name: Sarkari Yojana Pro
Theme URI: https://example.com/sarkari-yojana-pro
Author: v0
Author URI: https://v0.app
Description: SEO-optimized WordPress theme for Sarkari Yojana (Government Schemes) websites. Fast, mobile-first, with auto-generated thumbnails, schema markup, breadcrumbs, and state-wise scheme listings. Perfect for Google ranking.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
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: sarkari-yojana
Tags: blog, news, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */
:root {
  --sy-primary: #e65100;        /* Saffron orange - India theme */
  --sy-primary-dark: #bf360c;
  --sy-secondary: #1b5e20;      /* Deep green */
  --sy-bg: #ffffff;
  --sy-bg-soft: #faf7f2;
  --sy-text: #1f2937;
  --sy-text-muted: #6b7280;
  --sy-border: #e5e7eb;
  --sy-radius: 8px;
  --sy-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --sy-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sy-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--sy-text);
  background: var(--sy-bg-soft);
}
img { max-width: 100%; height: auto; }
a { color: var(--sy-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--sy-text); margin: 0 0 0.6em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* ==========================================================================
   Layout
   ========================================================================== */
.sy-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}
.sy-main-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0;
}
@media (min-width: 900px) {
  .sy-main-wrap { flex-direction: row; align-items: flex-start; }
  .sy-content { flex: 1 1 70%; min-width: 0; }
  .sy-sidebar { flex: 0 0 300px; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.sy-topbar {
  background: var(--sy-secondary);
  color: #ffffff;
  font-size: 0.8rem;
  padding: 6px 0;
}
.sy-topbar .sy-container { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sy-header {
  background: var(--sy-primary);
  color: #ffffff;
  padding: 18px 0;
}
.sy-header .sy-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sy-site-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.sy-site-title a { color: #ffffff; text-decoration: none; }
.sy-site-desc { margin: 2px 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); }
.sy-search-form { display: flex; gap: 0; }
.sy-search-form input[type="search"] {
  border: none; padding: 10px 14px; border-radius: var(--sy-radius) 0 0 var(--sy-radius);
  font-size: 0.9rem; min-width: 200px; outline: none;
}
.sy-search-form button {
  background: var(--sy-primary-dark); color: #ffffff; border: none;
  padding: 10px 16px; border-radius: 0 var(--sy-radius) var(--sy-radius) 0; cursor: pointer; font-weight: 600;
}

/* Navigation */
.sy-nav { background: #ffffff; border-bottom: 2px solid var(--sy-primary); box-shadow: var(--sy-shadow); }
.sy-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.sy-nav li a {
  display: block; padding: 12px 16px; color: var(--sy-text); font-weight: 600; font-size: 0.9rem;
}
.sy-nav li a:hover { background: var(--sy-bg-soft); color: var(--sy-primary); text-decoration: none; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.sy-breadcrumb { font-size: 0.82rem; color: var(--sy-text-muted); padding: 12px 0 0; }
.sy-breadcrumb a { color: var(--sy-text-muted); }
.sy-breadcrumb a:hover { color: var(--sy-primary); }

/* ==========================================================================
   Post Cards (Archive / Home)
   ========================================================================== */
.sy-post-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .sy-post-grid { grid-template-columns: repeat(2, 1fr); } }
.sy-card {
  background: #ffffff; border: 1px solid var(--sy-border); border-radius: var(--sy-radius);
  overflow: hidden; box-shadow: var(--sy-shadow); display: flex; flex-direction: column;
}
.sy-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sy-card h2 { font-size: 1.05rem; margin: 0; }
.sy-card h2 a { color: var(--sy-text); }
.sy-card h2 a:hover { color: var(--sy-primary); }
.sy-card-meta { font-size: 0.78rem; color: var(--sy-text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.sy-card-excerpt { font-size: 0.88rem; color: var(--sy-text-muted); margin: 0; }
.sy-read-more { font-size: 0.85rem; font-weight: 600; margin-top: auto; }

/* ==========================================================================
   Auto Thumbnail (CSS-generated when no featured image)
   ========================================================================== */
.sy-auto-thumb {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: center;
  padding: 20px; color: #ffffff; position: relative; overflow: hidden;
}
.sy-auto-thumb::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 140px; height: 140px;
  border: 3px solid rgba(255, 255, 255, 0.18); border-radius: 50%;
}
.sy-auto-thumb::before {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 70px; height: 70px;
  border: 3px solid rgba(255, 255, 255, 0.12); border-radius: 50%;
}
.sy-auto-thumb .sy-thumb-cat {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  background: rgba(255, 255, 255, 0.2); align-self: flex-start; padding: 3px 10px; border-radius: 99px; margin-bottom: 10px;
}
.sy-auto-thumb .sy-thumb-title { font-size: 1.05rem; font-weight: 800; line-height: 1.35; text-wrap: balance; }
.sy-auto-thumb .sy-thumb-site { position: absolute; left: 20px; bottom: 12px; font-size: 0.68rem; opacity: 0.75; font-weight: 600; }

/* Category color themes for auto thumbnails */
.sy-thumb-agriculture { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.sy-thumb-health      { background: linear-gradient(135deg, #c62828, #8e0000); }
.sy-thumb-education   { background: linear-gradient(135deg, #1565c0, #0d47a1); }
.sy-thumb-women       { background: linear-gradient(135deg, #ad1457, #78002e); }
.sy-thumb-housing     { background: linear-gradient(135deg, #ef6c00, #bf360c); }
.sy-thumb-employment  { background: linear-gradient(135deg, #4527a0, #26126b); }
.sy-thumb-pension     { background: linear-gradient(135deg, #00695c, #003d33); }
.sy-thumb-finance     { background: linear-gradient(135deg, #f9a825, #c17900); }
.sy-thumb-default     { background: linear-gradient(135deg, #e65100, #bf360c); }

/* ==========================================================================
   Single Post
   ========================================================================== */
.sy-single {
  background: #ffffff; border: 1px solid var(--sy-border); border-radius: var(--sy-radius);
  padding: 24px; box-shadow: var(--sy-shadow);
}
.sy-single h1.entry-title { font-size: 1.65rem; margin-bottom: 8px; text-wrap: balance; }
.sy-entry-meta { font-size: 0.82rem; color: var(--sy-text-muted); margin-bottom: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.sy-entry-content { font-size: 1rem; }
.sy-entry-content h2 {
  font-size: 1.3rem; margin-top: 1.6em; padding: 8px 14px; background: var(--sy-bg-soft);
  border-left: 4px solid var(--sy-primary); border-radius: 0 var(--sy-radius) var(--sy-radius) 0;
}
.sy-entry-content h3 { font-size: 1.12rem; margin-top: 1.4em; color: var(--sy-primary-dark); }
.sy-entry-content table {
  width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.92rem;
}
.sy-entry-content table th {
  background: var(--sy-primary); color: #ffffff; text-align: left; padding: 10px 12px;
}
.sy-entry-content table td { padding: 10px 12px; border: 1px solid var(--sy-border); }
.sy-entry-content table tr:nth-child(even) { background: var(--sy-bg-soft); }
.sy-entry-content ul, .sy-entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.sy-entry-content li { margin-bottom: 6px; }
.sy-entry-content blockquote {
  margin: 1em 0; padding: 12px 18px; background: #fff8f0; border-left: 4px solid var(--sy-primary);
  border-radius: 0 var(--sy-radius) var(--sy-radius) 0; color: var(--sy-primary-dark); font-weight: 500;
}
.sy-btn-apply {
  display: inline-block; background: var(--sy-secondary); color: #ffffff !important; font-weight: 700;
  padding: 12px 26px; border-radius: var(--sy-radius); text-decoration: none !important; margin: 8px 0;
}
.sy-btn-apply:hover { background: #144a18; }

/* FAQ styling */
.sy-entry-content details {
  border: 1px solid var(--sy-border); border-radius: var(--sy-radius); margin-bottom: 10px; background: #ffffff;
}
.sy-entry-content summary { padding: 12px 16px; font-weight: 600; cursor: pointer; }
.sy-entry-content details p { padding: 0 16px 12px; margin: 0; color: var(--sy-text-muted); }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sy-widget {
  background: #ffffff; border: 1px solid var(--sy-border); border-radius: var(--sy-radius);
  padding: 16px; margin-bottom: 20px; box-shadow: var(--sy-shadow);
}
.sy-widget-title {
  font-size: 1rem; font-weight: 700; margin: -16px -16px 12px; padding: 12px 16px;
  background: var(--sy-primary); color: #ffffff; border-radius: var(--sy-radius) var(--sy-radius) 0 0;
}
.sy-widget ul { list-style: none; margin: 0; padding: 0; }
.sy-widget li { padding: 8px 0; border-bottom: 1px dashed var(--sy-border); font-size: 0.9rem; }
.sy-widget li:last-child { border-bottom: none; }
.sy-widget li a { color: var(--sy-text); }
.sy-widget li a:hover { color: var(--sy-primary); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.sy-pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.sy-pagination .page-numbers {
  padding: 8px 14px; background: #ffffff; border: 1px solid var(--sy-border);
  border-radius: var(--sy-radius); color: var(--sy-text); font-size: 0.9rem; font-weight: 600;
}
.sy-pagination .page-numbers.current { background: var(--sy-primary); color: #ffffff; border-color: var(--sy-primary); }
.sy-pagination a.page-numbers:hover { border-color: var(--sy-primary); color: var(--sy-primary); text-decoration: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.sy-footer { background: #212121; color: #bdbdbd; margin-top: 32px; font-size: 0.88rem; }
.sy-footer-widgets {
  display: grid; grid-template-columns: 1fr; gap: 24px; padding: 32px 0;
}
@media (min-width: 768px) { .sy-footer-widgets { grid-template-columns: repeat(3, 1fr); } }
.sy-footer h4 { color: #ffffff; font-size: 1rem; margin-bottom: 12px; }
.sy-footer ul { list-style: none; margin: 0; padding: 0; }
.sy-footer li { margin-bottom: 8px; }
.sy-footer a { color: #bdbdbd; }
.sy-footer a:hover { color: #ffffff; }
.sy-footer-bottom { border-top: 1px solid #383838; padding: 14px 0; text-align: center; font-size: 0.8rem; }

/* ==========================================================================
   Utility & Misc
   ========================================================================== */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sy-notice {
  background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--sy-radius);
  padding: 12px 16px; font-size: 0.9rem; margin-bottom: 16px;
}
.sy-tag-cloud a {
  display: inline-block; background: var(--sy-bg-soft); border: 1px solid var(--sy-border);
  padding: 4px 12px; border-radius: 99px; font-size: 0.8rem !important; margin: 0 6px 6px 0; color: var(--sy-text);
}
.sy-updated-badge {
  display: inline-block; background: #e8f5e9; color: var(--sy-secondary); font-size: 0.75rem;
  font-weight: 700; padding: 2px 10px; border-radius: 99px;
}
