/* ============================================================
   ANTARWASNA.IN — COMPLETE STYLESHEET
   Inspired by antarvasna3.com — Cream, Dark Red, Clean Cards
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@300;400;500;600;700&family=Tiro+Devanagari+Hindi&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #c0392b;
  --red-dark:   #8B0000;
  --red-hover:  #a93226;
  --red-light:  #fdecea;
  --red-border: rgba(192,57,43,0.22);
  --cream:      #f8f4dc;
  --cream-2:    #f3eecb;
  --cream-dark: #ede7c3;
  --parchment:  #fffaf0;
  --brown:      #6a2c0f;
  --brown-mid:  #8b3c17;
  --brown-soft: #9c3a14;
  --ink:        #1a1a1a;
  --ink-soft:   #333;
  --ink-muted:  #555;
  --ink-light:  #777;
  --surface:    #ffffff;
  --border:     #e0d8b0;
  --border-soft:#eeead0;
  --bg:         #f5f0e0;
  --font:       'Noto Sans Devanagari', Arial, sans-serif;
  --font-serif: 'Tiro Devanagari Hindi', Georgia, serif;
  --shadow-sm:  0 2px 6px rgba(0,0,0,0.07);
  --shadow:     0 3px 12px rgba(0,0,0,0.10);
  --shadow-lg:  0 6px 24px rgba(0,0,0,0.12);
  --radius:     4px;
  --radius-md:  6px;
  --trans:      0.2s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--cream-dark); color: var(--brown); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 99px; }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-hover); text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ===========================
   LAYOUT
=========================== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Main two-column wrapper */
.main-wrapper {
  display: flex;
  gap: 28px;
  margin-top: 24px;
  align-items: flex-start;
}

.content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
}

/* ===========================
   HEADER
=========================== */
header {
  background: var(--surface);
  border-bottom: 3px solid var(--red);
  padding: 14px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

header h1 {
  font-family: var(--font);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  color: var(--red-dark);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

header .tagline {
  font-size: 13px;
  color: var(--ink-muted);
  font-style: italic;
}

/* Search bar in header */
.header-search {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.header-search input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-family: var(--font);
  font-size: 13px;
  width: 200px;
  color: var(--ink);
  background: transparent;
}

.header-search button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--trans);
}

.header-search button:hover { background: var(--red-hover); }

/* ===========================
   NAV
=========================== */
nav {
  background: var(--red-dark);
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.20);
}

nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

nav a {
  display: inline-block;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  text-decoration: none;
  transition: background var(--trans), color var(--trans);
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.01em;
}

nav a:hover,
nav a.active {
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

nav a:first-child { border-left: none; }

/* ===========================
   STORY LIST / CARDS
=========================== */
.category-title {
  font-size: 22px;
  color: var(--brown);
  font-weight: 700;
  margin: 4px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cream-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}

.story-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.story-card {
  background: var(--cream);
  border-left: 5px solid var(--brown-soft);
  border-bottom: 1px solid var(--border);
  padding: 20px 22px;
  transition: background var(--trans), box-shadow var(--trans);
  position: relative;
}

.story-card:first-child { border-top: 1px solid var(--border); }

.story-card:hover {
  background: var(--parchment);
  box-shadow: var(--shadow);
  z-index: 1;
}

.story-title {
  margin: 0 0 7px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.story-title a {
  color: var(--brown-mid);
  text-decoration: none;
}

.story-title a:hover {
  color: var(--red);
  text-decoration: underline;
}

.story-meta {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-tag {
  background: var(--cream-dark);
  color: var(--brown-mid);
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.story-excerpt {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 12px;
}

.story-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-light);
  flex-wrap: wrap;
}

.story-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--trans);
  white-space: nowrap;
}

.read-more:hover {
  background: var(--red-hover);
  color: #fff;
  text-decoration: none;
}

/* ===========================
   SEO TAG STRIP
=========================== */
.seo-tags {
  margin: 4px 0 18px;
  padding: 10px 14px;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brown-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.seo-tags span {
  font-size: 12px;
  background: var(--cream-dark);
  padding: 4px 10px;
  border-radius: 99px;
  color: var(--brown-mid);
  font-weight: 600;
}

/* ===========================
   SEO CARDS (bottom of index)
=========================== */
.seo-card {
  background: var(--cream);
  border-left: 5px solid var(--brown-soft);
  border-bottom: 1px solid var(--border);
  padding: 20px 22px;
  margin-top: 0;
}

.seo-card .story-title { font-size: 17px; }
.seo-card .story-excerpt { font-size: 14px; line-height: 1.75; margin-bottom: 10px; }
.seo-card .story-excerpt:last-child { margin-bottom: 0; }

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--trans);
}

.pagination a:hover,
.pagination a.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  text-decoration: none;
}

/* ===========================
   SIDEBAR
=========================== */
.widget {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.widget-cream {
  background: var(--cream);
  border-left: 4px solid var(--brown-soft);
}

.widget h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--surface);
  background: var(--brown-mid);
  padding: 10px 14px;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.widget-cream h3 {
  background: var(--brown-soft);
}

.widget-body {
  padding: 14px;
}

/* Search form */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.search-form input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color var(--trans);
}

.search-form input:focus { border-color: var(--red); }

.search-form button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 9px 0;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--trans);
}

.search-form button:hover { background: var(--red-hover); }

/* Sidebar lists */
.sidebar-list {
  list-style: none;
  padding: 10px 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-list li {
  border-bottom: 1px solid var(--border-soft);
  padding: 7px 0;
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list a {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.4;
  transition: color var(--trans);
}

.sidebar-list a::before {
  content: '›';
  color: var(--red);
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-list a:hover {
  color: var(--brown-mid);
  text-decoration: none;
}

/* ===========================
   STORY PAGE
=========================== */

/* Reading progress */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  width: 0%;
  z-index: 9998;
  transition: width 0.1s linear;
}

/* Story wrapper — no sidebar on story page */
.story-page-wrapper {
  max-width: 820px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 12.5px;
  color: var(--ink-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.breadcrumb a { color: var(--brown-mid); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: #ccc; }

/* Main story box */
.story-page {
  background: var(--cream);
  border-left: 6px solid var(--brown-soft);
  padding: 32px 38px;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
}

.story-heading {
  font-size: clamp(20px, 3.5vw, 30px);
  color: var(--brown);
  margin-bottom: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.story-divider {
  border: none;
  border-top: 1.5px solid var(--cream-dark);
  margin: 14px 0 22px;
}

.story-content {
  font-family: var(--font-serif);
  font-size: clamp(15.5px, 2vw, 17.5px);
  line-height: 2.0;
  color: #1f1f1f;
  word-break: break-word;
}

/* Footer bar inside story */
.story-footer-bar {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1.5px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.back-link {
  font-size: 13px;
  color: var(--brown-mid);
  font-weight: 600;
}

.back-link:hover { color: var(--red); text-decoration: underline; }

.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.share-label {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: opacity var(--trans);
}

.share-btn:hover { opacity: 0.85; text-decoration: none; }
.share-wa  { background: #25d366; color: #fff; }
.share-copy { background: var(--cream-dark); color: var(--brown-mid); }

/* Copy toast */
.copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  padding: 9px 20px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9900;
}

.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================
   RECENT POSTS
=========================== */
.recent-posts {
  margin-top: 24px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 5px solid var(--brown-soft);
  padding: 22px 24px;
}

.recent-title {
  font-size: 17px;
  color: var(--brown);
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--cream-dark);
}

.recent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.recent-card {
  display: block;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brown-soft);
  padding: 15px 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--trans), border-color var(--trans);
}

.recent-card:hover {
  box-shadow: var(--shadow);
  border-top-color: var(--red);
  text-decoration: none;
  color: inherit;
}

.recent-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brown-mid);
  margin-bottom: 6px;
  line-height: 1.4;
}

.recent-card:hover h4 { color: var(--red); }

.recent-card p {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}

.card-read {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
}

/* ===========================
   MAIN LAYOUT (search page)
=========================== */
.main-layout {
  display: flex;
  gap: 28px;
  margin-top: 24px;
  align-items: flex-start;
}

.main-layout .content { flex: 1; min-width: 0; }
.main-layout .sidebar { width: 280px; flex-shrink: 0; }

/* ===========================
   FOOTER
=========================== */
footer {
  background: var(--red-dark);
  color: rgba(255,255,255,0.75);
  margin-top: 50px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 16px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
}

.footer-col h4 {
  color: rgba(255,255,255,0.90);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--trans);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
}

/* ===========================
   AGE GATE
=========================== */
#ageOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

#ageOverlay.show { display: flex; }

#agePopup {
  max-width: 400px;
  width: 90%;
  background: var(--surface);
  padding: 32px 28px;
  text-align: center;
  border-radius: var(--radius-md);
  border-top: 4px solid var(--red);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

#agePopup h2 {
  color: var(--red-dark);
  font-size: 20px;
  margin-bottom: 12px;
}

#agePopup p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  line-height: 1.6;
}

.age-btn {
  padding: 10px 24px;
  margin: 5px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--trans);
}
.age-btn:hover { opacity: 0.88; }
.age-yes { background: #27ae60; color: #fff; }
.age-no  { background: var(--red); color: #fff; }

/* ===========================
   UTILITIES
=========================== */
.meta-dot {
  width: 3px;
  height: 3px;
  background: #bbb;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .sidebar { width: 240px; }
  .main-layout .sidebar { width: 240px; }
}

@media (max-width: 768px) {
  /* Header */
  header .container { flex-direction: column; align-items: flex-start; gap: 10px; }
  .header-search { width: 100%; }
  .header-search input { flex: 1; width: auto; }

  /* Nav */
  nav .container { overflow-x: auto; flex-wrap: nowrap; }
  nav a { padding: 9px 11px; font-size: 12px; }

  /* Layout */
  .main-wrapper,
  .main-layout {
    flex-direction: column;
  }
  .sidebar,
  .main-layout .sidebar { width: 100%; order: -1; }

  /* Story */
  .story-page { padding: 22px 18px; }
  .story-page-wrapper { margin-top: 16px; }
  .story-heading { font-size: 20px; }

  /* Recent */
  .recent-posts { padding: 18px 16px; }
  .recent-grid { grid-template-columns: 1fr; }

  /* Story footer bar */
  .story-footer-bar { flex-direction: column; align-items: flex-start; }
  .share-buttons { width: 100%; }
  .share-btn { flex: 1; justify-content: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .story-card { padding: 16px 14px; border-left-width: 4px; }
  .story-title { font-size: 16px; }
  .read-more { margin-left: 0; width: 100%; justify-content: center; margin-top: 6px; }
  .story-footer { flex-wrap: wrap; }
  .story-page { padding: 18px 14px; border-left-width: 4px; }
  .story-heading { font-size: 18px; }
  .story-content { font-size: 15.5px; }
  .recent-card { padding: 12px 13px; }
  .pagination a { min-width: 32px; height: 32px; font-size: 13px; }
}