/* ==========================================================================
   Divine Kahaniyan - Authentic Story Platform Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rozha+One&family=Yatra+One&family=Rozha+One&family=Martel:wght@400;600;700;800&family=Mukta:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #914e24;
  --primary-dark: #6e3614;
  --primary-light: #fbeee3;
  --primary-gradient: linear-gradient(135deg, #a45a2a, #783d16);
  --gold: #c59b27;
  --gold-light: #fef8e7;
  --gold-border: #ebd38d;
  --accent: #d97736;
  --bg-main: #fdfaf6;
  --bg-card: #ffffff;
  --bg-subtle: #f7f1e7;
  --text-main: #2d221a;
  --text-muted: #746152;
  --text-light: #9d8a7c;
  --border-color: #ebdccd;
  --border-subtle: #f0e6dc;
  --shadow-sm: 0 2px 8px rgba(110, 54, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(110, 54, 20, 0.08);
  --shadow-lg: 0 16px 40px rgba(110, 54, 20, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-heading: 'Martel', 'Rozha One', Georgia, serif;
  --font-body: 'Mukta', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --story-font-size: 19px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Topbar
   ========================================================================== */

.topbar {
  height: 80px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 253, 249, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 3px 10px rgba(145, 78, 36, 0.2);
}

.brand-fallback {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: bold;
}

.brand-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
}

.brand-text small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 1px;
}

.topbar nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topbar nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.topbar nav a:hover,
.topbar nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 26px;
  color: var(--primary-dark);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 70px 8%;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 50px;
  align-items: center;
  background: radial-gradient(circle at 90% 20%, #fae8d4 0%, transparent 40%),
              linear-gradient(135deg, #fffaf4 0%, #f6ebe0 100%);
  border-bottom: 1px solid var(--border-color);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 46px;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 18px;
  font-weight: 800;
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
  position: relative;
}

.hero-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 28px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-gradient);
  color: #ffffff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(145, 78, 36, 0.28);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(145, 78, 36, 0.35);
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 45px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "“";
  position: absolute;
  top: -15px;
  left: 20px;
  font-size: 110px;
  color: #fae4cf;
  font-family: serif;
  line-height: 1;
  pointer-events: none;
}

.hero-card .motif {
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 12px;
}

.hero-card .quote {
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.6;
  color: var(--primary-dark);
  font-weight: 700;
}

.hero-card .quote-author {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

/* ==========================================================================
   Library & Grid Section
   ========================================================================== */

.section {
  padding: 60px 8%;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-head h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 6px;
}

.count-badge {
  background: var(--bg-subtle);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.search-bar {
  margin-bottom: 22px;
  background: white;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(145, 78, 36, 0.1);
}

.search-bar svg {
  width: 20px;
  height: 20px;
  fill: var(--text-light);
}

.search-bar input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--text-main);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--text-light);
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.chip-btn {
  border: 1px solid var(--border-color);
  background: white;
  border-radius: var(--radius-full);
  padding: 8px 18px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.chip-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(145, 78, 36, 0.25);
}

/* Stories Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 28px;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.story-card-cover {
  height: 170px;
  background: linear-gradient(135deg, #f5e4d3, #edd4be);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.story-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-card:hover .story-card-cover img {
  transform: scale(1.05);
}

.cover-emoji-fallback {
  font-size: 56px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.card-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-read-time {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
}

.story-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.story-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 10px;
}

.story-card-excerpt {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 18px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-top: auto;
}

.story-read-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.story-card:hover .story-read-link {
  gap: 10px;
}

.card-date {
  font-size: 12px;
  color: var(--text-light);
}

/* ==========================================================================
   Story Reader View (Detailed & Authentic)
   ========================================================================== */

#storyView {
  display: none;
  background: var(--bg-main);
  min-height: 80vh;
  padding-bottom: 80px;
}

.story-reader-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 30px 20px 0;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 25px;
  padding: 8px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--text-light);
  font-size: 12px;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Story Header */
.reader-header {
  margin-bottom: 30px;
}

.reader-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.reader-category-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
}

.reader-time {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reader-title {
  font-family: var(--font-heading);
  font-size: 38px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
}

/* Reading Toolbar & Action Controls */
.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 12px;
}

.font-size-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.font-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.action-btn.share-btn {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
}

.action-btn.share-btn:hover {
  box-shadow: 0 4px 12px rgba(145, 78, 36, 0.3);
}

/* Story Cover Image Banner */
.reader-cover-banner {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.reader-cover-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Story Video Player Section */
.reader-video-wrapper {
  margin-bottom: 35px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-header {
  padding: 14px 20px;
  background: linear-gradient(135deg, #2b1f17, #3d291b);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.video-header span {
  font-size: 18px;
}

.video-header strong {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.video-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000000;
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.card-video-badge {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Story Article Content */
.story-article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 45px 50px;
  box-shadow: var(--shadow-sm);
  font-size: var(--story-font-size);
  line-height: 1.95;
  color: #33261d;
}

.story-article p {
  margin-bottom: 22px;
  text-align: justify;
}

.story-article p strong,
.story-article strong {
  font-weight: 700;
  color: var(--primary-dark);
}

.story-article .story-dialogue {
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
  padding: 16px 22px;
  margin: 22px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--primary-dark);
  font-weight: 500;
}

.story-article .story-heading-2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--primary-dark);
  margin: 32px 0 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 6px;
}

.story-article hr {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 35px 0;
}

.story-article img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Enhanced "सीख" (Moral / संदेश) Highlight Box
   ========================================================================== */

.moral-box {
  margin: 45px 0 25px;
  background: linear-gradient(135deg, #fffcf2 0%, #faecd5 100%);
  border: 2px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 34px 38px;
  position: relative;
  box-shadow: 0 10px 30px rgba(197, 155, 39, 0.14);
}

.moral-box::before {
  content: "✦";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.moral-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.moral-icon {
  font-size: 26px;
}

.moral-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: #7b4f0e;
  letter-spacing: 0.5px;
}

.moral-text {
  font-size: 20px;
  line-height: 1.8;
  color: #4f3414;
  font-weight: 600;
  text-align: center;
  font-style: normal;
}

/* Share Story Banner inside Reader */
.share-section-box {
  margin-top: 40px;
  padding: 26px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.share-section-box h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.share-buttons-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-btn-item:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-whatsapp { background: #25D366; }
.btn-facebook { background: #1877F2; }
.btn-twitter { background: #1DA1F2; }
.btn-copy { background: #5a4b41; }

/* Story Navigation (Next / Previous) */
.story-nav-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.nav-story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.nav-story-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.nav-story-card.next {
  text-align: right;
}

.nav-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.nav-story-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Related Stories ("और कहानियाँ पढ़ें") */
.related-section {
  margin-top: 50px;
  border-top: 2px dashed var(--border-color);
  padding-top: 40px;
}

.related-section h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

/* Back to Top button */
.back-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1.5px solid var(--border-color);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.back-btn-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  gap: 10px;
}

/* ==========================================================================
   About Us & Footer
   ========================================================================== */

.about {
  padding: 60px 8%;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 50px;
  align-items: center;
}

.about h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--primary-dark);
  margin-top: 6px;
}

.about p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-muted);
}

footer {
  padding: 30px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #251b14;
  color: #f1e2d4;
  font-size: 14px;
  margin-top: auto;
}

footer strong {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #ffffff;
}

/* ==========================================================================
   Toast Notification & Utilities
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2b1e15;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 18px;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(145, 78, 36, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 50px 6%;
    gap: 30px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero-card {
    display: none;
  }
  .story-article {
    padding: 30px 22px;
  }
  .moral-box {
    padding: 24px 20px;
  }
  .reader-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 5%;
  }
  .menu-toggle {
    display: block;
  }
  .topbar nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px 6%;
    flex-direction: column;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }
  .topbar nav.show {
    display: flex;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .about {
    grid-template-columns: 1fr;
    padding: 50px 6%;
    gap: 25px;
  }
  footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .story-nav-bar {
    grid-template-columns: 1fr;
  }
  .reader-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .font-size-controls,
  .reader-actions {
    justify-content: center;
  }
}