/* =============================================================
   Dehu Santawani — Main Stylesheet (app.css)
   PHP frontend replacement for the Angular app
   ============================================================= */

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg:         #f3f4f6;
  --card:       #ffffff;
  --text:       #111827;
  --muted:      #6b7280;
  --brand:      #c0392b;
  --brand-dark: #962d22;
  --border:     #e5e7eb;
  --shadow:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
}

/* ─── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto,
               'Noto Sans Devanagari', 'Noto Sans', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ─── Utility ────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn:hover { background: #f9fafb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.secondary { background: #f3f4f6; border-color: var(--border); }
.btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.danger:hover { background: #b91c1c; }

/* ─── Forms ──────────────────────────────────────────────────── */
input, select, textarea {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff; color: var(--text); outline: none;
  font-family: inherit; font-size: 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.10);
}
textarea { resize: vertical; min-height: 80px; }
label { display: block; color: var(--muted); margin-bottom: 6px; font-size: 13px; font-weight: 500; }

/* ─── Alert ──────────────────────────────────────────────────── */
.alert-error {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  font-size: 13px;
}

/* ─── Ad contact strip ───────────────────────────────────────── */
.ad-contact-strip { background: #c0392b; color: #fff; }
.ad-contact-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 6px; padding-bottom: 6px; font-size: 12.5px;
  flex-wrap: wrap; gap: 6px;
}
.ad-contact-text { font-weight: 500; }
.ad-contact-links { display: flex; align-items: center; gap: 10px; }
.ad-contact-link { color: #fff; text-decoration: none; font-weight: 600; opacity: .92; transition: opacity 120ms; }
.ad-contact-link:hover { opacity: 1; text-decoration: underline; }
.ad-contact-sep { opacity: .5; }

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar { background: #111827; color: #9ca3af; }
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 7px; padding-bottom: 7px; font-size: 12px;
}
.topbar-lang {
  background: transparent; border: 1px solid #374151; color: #d1d5db;
  border-radius: 4px; padding: 2px 10px; font-size: 12px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.topbar-lang:hover { background: #374151; color: #fff; }

/* ─── Site header ────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--brand);
  display: flex; align-items: center; justify-content: center;
  padding: 10px 20px; position: relative;
}
.header-brand { display: block; line-height: 0; }
.header-logo { height: 120px; max-width: 90vw; object-fit: contain; display: block; }
.header-admin { position: absolute; right: 20px; }
.admin-btn {
  background: var(--brand); color: #fff;
  padding: 7px 14px; border-radius: 5px;
  font-size: 13px; font-weight: 600;
  transition: background 120ms;
}
.admin-btn:hover { background: var(--brand-dark); }

/* ─── Category nav ───────────────────────────────────────────── */
.cat-nav {
  background: var(--brand);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.cat-nav-inner { display: flex; overflow-x: auto; scrollbar-width: none; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-link {
  color: rgba(255,255,255,.88);
  padding: 11px 16px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.15);
  transition: background 120ms;
}
.cat-link:hover { background: rgba(0,0,0,.22); color: #fff; }

/* ─── Site main ──────────────────────────────────────────────── */
.site-main { padding: 20px 0 48px; min-height: 60vh; }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer { background: #1f2937; color: #d1d5db; padding: 40px 0 0; }
.footer-body { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.footer-brand { }
.footer-logo { height: 60px; object-fit: contain; display: block; margin-bottom: 12px; filter: brightness(1.2); }
.footer-desc { color: #9ca3af; font-size: 13px; line-height: 1.6; margin: 0; }
.footer-links-col { }
.footer-sec-title { font-weight: 700; font-size: 13px; color: #f9fafb; margin-bottom: 14px; letter-spacing: .06em; text-transform: uppercase; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.footer-links a { color: #9ca3af; font-size: 13px; transition: color 120ms; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #374151; margin-top: 32px; padding: 16px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #6b7280; flex-wrap: wrap; gap: 8px; }
.footer-admin-link { color: #6b7280; transition: color 120ms; }
.footer-admin-link:hover { color: #fff; }
@media (max-width: 640px) {
  .footer-body { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Breaking Ticker ────────────────────────────────────────── */
.ticker-wrap {
  background: #111827; color: #fff;
  display: flex; align-items: center;
  overflow: hidden; height: 36px;
}
.ticker-label {
  flex-shrink: 0;
  background: var(--brand); padding: 0 14px;
  font-size: 12px; font-weight: 700;
  height: 100%; display: flex; align-items: center;
  white-space: nowrap;
}
.ticker-viewport { flex: 1; overflow: hidden; }
.ticker-track {
  display: flex; align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { color: rgba(255,255,255,.9); font-size: 13px; padding: 0 16px; transition: color 120ms; }
.ticker-item:hover { color: #fca5a5; }
.ticker-sep { color: rgba(255,255,255,.35); font-size: 10px; }

/* ─── Hero Carousel ──────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  border-radius: 12px; margin-top: 16px;
  height: 420px; background: #1f2937;
}
.hero-slide { display: none; position: absolute; inset: 0; }
.hero-slide.active { display: block; }
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
}
.hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 28px; }
.hero-tags { display: flex; gap: 8px; margin-bottom: 8px; }
.pill-br {
  background: var(--brand); color: #fff;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.pill-cat {
  background: rgba(255,255,255,.2); color: #fff;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.hero-title { color: #fff; font-size: 26px; font-weight: 800; line-height: 1.2; margin: 0 0 8px; }
.hero-summary { color: rgba(255,255,255,.8); font-size: 14px; margin: 0 0 12px; line-height: 1.5; }
.hero-dots { display: flex; gap: 6px; }
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: none;
  cursor: pointer; padding: 0; transition: background 200ms;
}
.hero-dot.active { background: #fff; }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.4); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; font-size: 16px; transition: background 200ms;
  display: flex; align-items: center; justify-content: center;
}
.hero-nav:hover { background: rgba(0,0,0,.7); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }

/* ─── Ad Banner ──────────────────────────────────────────────── */
.ad-banner {
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 10px 16px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ad-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--brand); background: rgba(192,57,43,.07);
  padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
}
.ad-banner-link { display: flex; align-items: center; gap: 10px; color: inherit; }
.ad-banner-text { font-size: 13px; }
.ad-banner-img { height: 40px; object-fit: contain; border-radius: 4px; }

/* ─── Search bar ─────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 8px; margin: 16px 0;
}
.search-input { flex: 1; max-width: 400px; }

/* ─── Page layout ────────────────────────────────────────────── */
.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 8px;
}
@media (min-width: 900px) {
  .page-layout { grid-template-columns: 1fr 320px; }
}

/* ─── Section header ─────────────────────────────────────────── */
.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sec-title { margin: 0; font-size: 18px; font-weight: 700; }

/* ─── Article grid ───────────────────────────────────────────── */
.article-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.art-card { overflow: hidden; transition: box-shadow 150ms, transform 150ms; cursor: pointer; }
.art-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); transform: translateY(-2px); }
.art-img { height: 180px; overflow: hidden; background: #f3f4f6; }
.art-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms; }
.art-card:hover .art-img img { transform: scale(1.04); }
.art-body { padding: 14px; }
.art-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pill-br-sm {
  background: var(--brand); color: #fff;
  padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
}
.cat-pill {
  background: rgba(79,70,229,.08); color: #4338ca;
  padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 600;
}
.art-title { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); }
.art-summary { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.art-by { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 28px; }
.page-btn { padding: 6px 14px; }
.page-info { font-size: 13px; color: var(--muted); }

/* ─── Empty state ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 15px; }

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sb-section { overflow: hidden; }
.sb-cat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.sb-cat-name { font-size: 14px; font-weight: 700; color: var(--brand); }
.sb-see-all { font-size: 12px; color: var(--muted); }
.sb-see-all:hover { color: var(--brand); }
.sb-articles { padding: 8px 0; }
.sb-art {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 14px; transition: background 120ms;
}
.sb-art:hover { background: #f9fafb; }
.sb-img { flex-shrink: 0; width: 60px; height: 45px; border-radius: 6px; overflow: hidden; background: #f3f4f6; }
.sb-img img { width: 100%; height: 100%; object-fit: cover; }
.sb-art-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); }
.sb-ad { overflow: hidden; }
.sb-ad-tag { font-size: 10px; color: var(--brand); font-weight: 700; letter-spacing: .06em; padding: 8px 12px 0; }
.sb-ad-body { padding: 8px 12px 14px; }
.sb-ad-title { font-size: 14px; font-weight: 700; }
.sb-ad-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sb-ad-contact { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ─── Full-banner overlay ────────────────────────────────────── */
.fullbanner-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.fullbanner-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.6); cursor: pointer;
}
.fullbanner-box {
  position: relative; background: #fff; border-radius: 16px;
  max-width: 560px; width: 94%; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.fullbanner-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,.5); color: #fff; border: none;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.fullbanner-inner { display: block; color: inherit; }
.fullbanner-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.fullbanner-body { padding: 20px; }
.fullbanner-label { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .06em; margin-bottom: 6px; }
.fullbanner-title { font-size: 20px; font-weight: 800; }
.fullbanner-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.fullbanner-contacts { display: flex; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ─── Sticky ad bar ──────────────────────────────────────────── */
.sticky-ad-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #1f2937; color: #fff;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; box-shadow: 0 -2px 12px rgba(0,0,0,.25);
}
.sticky-ad-label { font-size: 10px; font-weight: 700; color: #fca5a5; flex-shrink: 0; }
.sticky-ad-content { display: flex; align-items: center; gap: 10px; flex: 1; overflow: hidden; color: #fff; }
.sticky-ad-img { height: 36px; border-radius: 4px; object-fit: cover; }
.sticky-ad-text { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-ad-close {
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: 18px; cursor: pointer; flex-shrink: 0;
  padding: 0 4px; transition: color 120ms;
}
.sticky-ad-close:hover { color: #fff; }

/* ─── Article page ───────────────────────────────────────────── */
.back-link { display: inline-block; margin: 14px 0; font-size: 13px; }
.article-wrap { margin-top: 14px; padding: 20px 24px; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: rgba(79,70,229,.10); border: 1px solid rgba(79,70,229,.18); }
.pill.ghost { background: rgba(15,23,42,.03); border: 1px solid var(--border); }
.article-h { margin: 12px 0 0; font-size: 28px; line-height: 1.18; }
.article-summary { color: var(--muted); line-height: 1.6; margin-top: 10px; }
.heroImg { margin-top: 16px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #eef2ff; position: relative; }
.heroImg img { width: 100%; height: 340px; object-fit: cover; display: block; }
.car-prev, .car-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.4); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background 200ms;
}
.car-prev { left: 8px; } .car-next { right: 8px; }
.car-prev:hover, .car-next:hover { background: rgba(0,0,0,.7); }
.car-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.car-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0; transition: background 200ms; }
.car-dot.active { background: #fff; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tag-pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: #f3f4f6; color: var(--muted); transition: border-color 120ms; }
.tag-pill:hover { border-color: var(--brand); color: var(--brand); }
.article-content { margin-top: 20px; line-height: 1.85; font-size: 15px; white-space: pre-wrap; }
.lang-row { margin-top: 18px; }
