/*
Theme Name: ePratapgarh
Theme URI: https://epratapgarh.com
Author: ePratapgarh
Description: A lightweight, self-updating news theme for ePratapgarh — Pratapgarh (Uttar Pradesh) and around. Pulls Hindi-language headlines from RSS feeds across Uttar Pradesh/Pratapgarh, National & World, Business, Sports & Entertainment and Tech, refreshes automatically via WP-Cron, and drops anything older than 7 days. Single scrolling page with a light/dark toggle.
Version: 1.0
Requires at least: 5.8
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: e-pratapgarh
*/

:root {
  --brand-red: #B3181D;
  --brand-red-dark: #8A1216;
  --saffron: #FF9933;
  --green: #128807;

  --bg: #fbf7f2;
  --bg-alt: #f3ece2;
  --surface: #ffffff;
  --ink: #201615;
  --muted: #6e625c;
  --border: #ece1d4;
  --header-bg: rgba(140, 20, 26, 0.94);
  --shadow: 0 1px 2px rgba(30, 15, 10, 0.05), 0 6px 20px rgba(30, 15, 10, 0.06);
  --radius: 14px;
}

html[data-theme="dark"] {
  --bg: #120f0e;
  --bg-alt: #181312;
  --surface: #1e1716;
  --ink: #efe8e5;
  --muted: #ab9d97;
  --border: #2c2220;
  --header-bg: rgba(40, 10, 12, 0.9);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

section[id] { scroll-margin-top: 76px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 3px solid var(--saffron);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.tri-bar {
  display: inline-block;
  width: 9px;
  height: 24px;
  background: linear-gradient(180deg, var(--saffron) 0 33%, #fff 33% 66%, var(--green) 66% 100%);
  border-radius: 2px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
  color: #eecfc9;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.main-nav a.active { background: var(--saffron); color: var(--brand-red-dark); }

.theme-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: background 0.15s ease;
}

.theme-toggle:hover { background: rgba(255, 255, 255, 0.2); }

.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: inline; }

/* Hero */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(1100px 420px at 15% -10%, rgba(179, 24, 29, 0.14), transparent 60%),
    radial-gradient(1100px 420px at 85% -10%, rgba(255, 153, 51, 0.16), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.pill-nav { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.pill:hover { border-color: var(--saffron); transform: translateY(-1px); }

/* Sections */
.section { padding: 44px 0; }
.section.alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.3rem;
  margin: 0 0 20px;
  border-left: 5px solid var(--brand-red);
  padding-left: 12px;
  letter-spacing: -0.01em;
}

.section-head .section-title { margin-bottom: 0; }

.back-to-top {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.back-to-top:hover { color: var(--brand-red); }

.empty { color: var(--muted); font-style: italic; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(30, 15, 10, 0.07), 0 14px 28px rgba(30, 15, 10, 0.09);
}

.card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-source {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-red);
}

.card-title { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.02rem; line-height: 1.4; }
.card-title:hover { color: var(--brand-red); }

.card-summary { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.card-meta { margin: auto 0 0; font-size: 0.78rem; color: var(--muted); }

/* Footer */
.site-footer {
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

.site-footer .updated { margin-top: 6px; font-weight: 600; }
.site-footer a.admin-refresh { color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding: 40px 0 32px; }
  .main-nav { display: none; }
}
