/*
Theme Name: Indian Folk Tales
Theme URI: https://indianfolktales.com
Author: Indian Folk Tales Team
Author URI: https://indianfolktales.com
Description: A warm, kid-friendly WordPress theme for the world's largest free collection of Indian folk tales, Panchatantra stories, and moral stories. Features vibrant colors, playful design, and AdSense-optimized layouts.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.9
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: indianfolktales
Tags: children, stories, folk-tales, education, custom-colors, featured-images
*/

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --orange-500: #FF8C42;
  --orange-600: #E67A30;
  --orange-700: #CC6A22;
  --orange-50: #FFF4EB;
  --orange-100: #FFE8D4;
  --teal-600: #1A6B5A;
  --teal-700: #145A4B;
  --teal-50: #EEFAF6;
  --purple-500: #7C3AED;
  --purple-50: #F3EEFF;
  --green-500: #16A34A;
  --pink-500: #EC4899;
  --yellow-400: #FACC15;
  --yellow-300: #FDE047;
  --red-500: #EF4444;
  --blue-500: #3B82F6;
  --sky-400: #38BDF8;
  --cream: #FFFAF5;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --container: 1240px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 12px rgba(255,140,66,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 16px 40px rgba(255,140,66,0.18), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-fun: 0 8px 24px rgba(255,140,66,0.15);
}

body {
  font-family: 'Nunito Sans', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--orange-600); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===== ANNOUNCEMENT BAR ===== */
.announce-bar {
  background: linear-gradient(90deg, var(--teal-600), #2D9B83, var(--teal-600));
  color: white;
  text-align: center;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.announce-bar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-50%); } 100% { transform: translateX(50%); } }
.announce-bar a { color: var(--yellow-300); text-decoration: underline; margin-left: 10px; }

/* ===== HEADER ===== */
.header {
  background: var(--white);
  border-bottom: 2px solid var(--orange-100);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(255,140,66,0.12); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--orange-500), #F97316);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255,140,66,0.35);
  transition: transform 0.3s;
}
.logo:hover .logo-mark { transform: rotate(-5deg) scale(1.05); }
.logo-wordmark {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
}
.logo-wordmark small {
  display: block;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange-500);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ===== NAVIGATION ===== */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-dropdown > .nav-trigger {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-600);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  display: flex; align-items: center; gap: 4px;
  border: none; background: none; cursor: pointer;
  font-family: inherit;
}
.main-nav > a:hover, .nav-dropdown:hover > .nav-trigger, .nav-dropdown.open > .nav-trigger {
  color: var(--orange-600);
  background: var(--orange-50);
}
.main-nav > a.active, .current-menu-item > a {
  background: var(--orange-500);
  color: white;
}

.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 12px;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  border: 2px solid var(--orange-100);
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
}
.dropdown-menu a:hover {
  background: var(--orange-50);
  color: var(--orange-600);
  transform: translateX(4px);
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.search-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-600);
}
.search-toggle:hover { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-500); }

.mobile-menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: none; background: none;
  cursor: pointer;
  color: var(--gray-700);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #FF8C42 0%, #F97316 30%, #EA580C 60%, #DC2626 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(250,204,21,0.15) 0%, transparent 60%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite reverse;
}
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px,-30px); } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-content { color: white; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
  border: 1px solid rgba(255,255,255,0.3);
}
.hero h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}
.hero h1 .highlight {
  position: relative;
  display: inline-block;
  color: var(--yellow-300);
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px; left: -4px; right: -4px;
  height: 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  z-index: -1;
}
.hero-desc {
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.92;
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-metrics {
  display: flex; gap: 36px;
  margin-bottom: 36px;
}
.hero-metric { text-align: left; }
.hero-metric-value {
  font-family: 'Baloo 2', cursive;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  display: block;
}
.hero-metric-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.75;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(.175,.885,.32,1.275);
}
.btn-white {
  background: white;
  color: var(--orange-600);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.btn-white:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 2px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.6); transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: white;
  box-shadow: 0 4px 14px rgba(255,140,66,0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(255,140,66,0.45); }
.btn-orange { background: var(--orange-500); color: white; box-shadow: 0 4px 14px rgba(255,140,66,0.35); }
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,140,66,0.45); }
.btn-light {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  color: white;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s;
}
.btn-light:hover { background: rgba(255,255,255,0.25); }

/* ===== HERO VISUAL ===== */
.hero-visual { position: relative; }
.hero-card-stack { position: relative; height: 420px; }
.hero-preview-card {
  position: absolute;
  background: white;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 340px;
  transition: transform 0.4s cubic-bezier(.175,.885,.32,1.275);
}
.hero-preview-card:nth-child(1) { top: 0; left: 20px; z-index: 3; }
.hero-preview-card:nth-child(2) { top: 30px; left: 50px; z-index: 2; opacity: 0.7; transform: scale(0.95); }
.hero-preview-card:nth-child(3) { top: 55px; left: 75px; z-index: 1; opacity: 0.4; transform: scale(0.9); }
.hpc-img {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  position: relative;
}
.hpc-img img { width: 100%; height: 100%; object-fit: cover; }
.hpc-img.bg-teal { background: linear-gradient(135deg, #4ECDC4, #44A08D); }
.hpc-img.bg-purple { background: linear-gradient(135deg, #A78BFA, #7C3AED); }
.hpc-img.bg-pink { background: linear-gradient(135deg, #F9A8D4, #EC4899); }
.hpc-body { padding: 20px; }
.hpc-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-600);
  background: var(--orange-50);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.hpc-title {
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.hpc-excerpt { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

/* SOTD Float badge */
.sotd-float {
  position: absolute;
  bottom: 30px; left: 0;
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 5;
  animation: floatUp 3s ease-in-out infinite;
}
@keyframes floatUp { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.sotd-float-icon {
  width: 42px; height: 42px;
  background: var(--purple-50);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.sotd-float-text .sotd-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--purple-500);
  font-weight: 700;
}
.sotd-float-text .sotd-name {
  font-family: 'Baloo 2', cursive;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

/* ===== WAVE DIVIDER ===== */
.hero-wave { display: block; margin-top: -2px; }

/* ===== SECTIONS ===== */
.section { padding: 64px 0; }
.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-head h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 36px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.section-head p {
  font-size: 17px;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}
.section-head .line {
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--orange-500), var(--yellow-400));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ===== REGION CARDS ===== */
.regions-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.region-card {
  flex: 0 0 auto;
  width: 150px;
  background: var(--white);
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}
.region-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-fun);
  border-color: var(--orange-500);
}
.region-card.featured {
  border-color: var(--orange-100);
  background: linear-gradient(135deg, var(--orange-50), var(--white));
}
.region-card.featured .rc-name { color: var(--orange-600); }
.rc-flag { font-size: 36px; display: block; margin-bottom: 10px; }
.rc-name { font-family: 'Baloo 2', cursive; font-size: 16px; font-weight: 700; color: var(--gray-800); }
.rc-count { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ===== STORY CARDS ===== */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.story-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(.175,.885,.32,1.275);
  box-shadow: var(--shadow-card);
  border: 2px solid transparent;
}
.story-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--orange-200, #FFD4A8);
}
.sc-img {
  height: 190px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.sc-img .sc-emoji {
  font-size: 72px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  transition: transform 0.4s;
}
.story-card:hover .sc-emoji { transform: scale(1.15) rotate(-5deg); }

/* Card gradient backgrounds - vibrant kid-friendly colors */
.story-card:nth-child(8n+1) .sc-img { background: linear-gradient(135deg, #4ECDC4, #2BAD9F); }
.story-card:nth-child(8n+2) .sc-img { background: linear-gradient(135deg, #A78BFA, #7C3AED); }
.story-card:nth-child(8n+3) .sc-img { background: linear-gradient(135deg, #F9A8D4, #EC4899); }
.story-card:nth-child(8n+4) .sc-img { background: linear-gradient(135deg, #FCA5A5, #EF4444); }
.story-card:nth-child(8n+5) .sc-img { background: linear-gradient(135deg, #93C5FD, #3B82F6); }
.story-card:nth-child(8n+6) .sc-img { background: linear-gradient(135deg, #FDE68A, #F59E0B); }
.story-card:nth-child(8n+7) .sc-img { background: linear-gradient(135deg, #6EE7B7, #10B981); }
.story-card:nth-child(8n+8) .sc-img { background: linear-gradient(135deg, #C4B5FD, #8B5CF6); }

.sc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.story-card:hover .sc-img img { transform: scale(1.05); }

/* When an image is present, hide the gradient background */
.sc-img:has(img) {
  background: none !important;
  background-image: none !important;
}
.sc-img img {
  position: relative;
  z-index: 1;
}

.sc-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sc-age-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.sc-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.sc-body h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.3;
}
.sc-body p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 2px dashed var(--gray-100);
}
.sc-meta { display: flex; gap: 12px; }
.sc-meta span {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 600;
}
.sc-read {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-500);
  display: flex; align-items: center; gap: 4px;
  transition: all 0.2s;
  text-decoration: none;
}
.story-card:hover .sc-read { gap: 8px; color: var(--orange-600); }

/* ===== AD SLOTS ===== */
.ad-slot {
  margin: 24px auto;
  max-width: 100%;
}
.ad-slot--sidebar { margin: 0 0 24px; }
.ad-slot--after-content { margin: 40px 0 0; }

/* ===== STORY OF THE DAY ===== */
.sotd-section {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.sotd-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(124,58,237,0.3) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(99,102,241,0.2) 0%, transparent 40%);
}
.sotd-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.sotd-content { color: white; }
.sotd-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sotd-content h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}
.sotd-content .sotd-excerpt {
  font-size: 17px;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 24px;
  max-width: 540px;
}
.sotd-moral {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 28px;
  border-left: 4px solid rgba(255,255,255,0.3);
}
.sotd-moral-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--yellow-300);
  font-weight: 700;
  margin-bottom: 6px;
}
.sotd-moral-text {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: rgba(255,255,255,0.9);
}
.sotd-art { display: flex; justify-content: center; align-items: center; }
.sotd-art-circle {
  width: 280px; height: 280px;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(99,102,241,0.2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 100px;
  border: 4px solid rgba(255,255,255,0.1);
}

/* ===== THEMES GRID ===== */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.theme-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}
.theme-pill:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-fun);
  border-color: var(--orange-200, #FFD4A8);
}
.tp-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.tp-name { font-family: 'Baloo 2', cursive; font-size: 16px; font-weight: 700; color: var(--gray-800); }
.tp-count { font-size: 12px; color: var(--gray-400); }

/* ===== AGE GROUP CARDS ===== */
.ages-flex {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.age-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}
.age-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-fun); }
.ac-header { margin-bottom: 12px; }
.ac-age {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 800;
  display: block;
}
.ac-sub { font-size: 13px; font-weight: 600; color: var(--gray-500); }
.ac-desc { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 16px; }
.ac-link { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }

/* ===== NEWSLETTER ===== */
.newsletter-section {
  background: linear-gradient(135deg, var(--orange-500), #F97316, #EA580C);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  border-radius: 50%;
}
.nl-inner {
  text-align: center;
  color: white;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.nl-inner h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 10px;
}
.nl-inner p {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 28px;
}
.nl-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.nl-form input[type="email"] {
  flex: 1;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  backdrop-filter: blur(8px);
}
.nl-form input[type="email"]::placeholder { color: rgba(255,255,255,0.6); }
.nl-form input[type="email"]:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }
.nl-form button {
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gray-900);
  color: white;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.nl-form button:hover { background: var(--gray-800); transform: scale(1.03); }
.nl-note { font-size: 12px; opacity: 0.7; margin-top: 14px; }

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: rgba(255,255,255,0.65);
  padding: 60px 0 32px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange-500), var(--yellow-400), var(--pink-500), var(--purple-500), var(--teal-600));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .fb-logo {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 800;
  color: white;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 300px;
}
.footer-col h4 {
  color: white;
  font-family: 'Baloo 2', cursive;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 30px; height: 3px;
  background: var(--orange-500);
  border-radius: 2px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: all 0.2s;
}
.footer-col a:hover { color: var(--orange-500); transform: translateX(4px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: all 0.3s;
}
.social-links a:hover { background: var(--orange-500); color: white; transform: translateY(-3px); }

/* ===== SINGLE STORY PAGE ===== */
.story-single {
  padding: 32px 0 48px;
}
.story-single > .container { max-width: var(--container); }
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.story-content {
  max-width: 100%;
  min-width: 0;
}

/* Story Header */
.story-header { margin-bottom: 32px; }
.story-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.story-collection-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  background: var(--teal-50);
  color: var(--teal-600);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.story-collection-badge:hover { background: var(--teal-600); color: white; }
.story-read-time {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
}
.story-age-tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--purple-50);
  color: var(--purple-500);
  font-weight: 600;
}
.story-title {
  font-family: 'Baloo 2', cursive;
  font-size: 42px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 12px;
}
.story-subtitle {
  font-size: 18px;
  color: var(--gray-500);
  line-height: 1.6;
  max-width: 700px;
}
.story-origin {
  font-size: 14px;
  color: var(--gray-400);
  font-style: italic;
  margin-top: 8px;
}

/* Story Featured Image */
.story-featured-image {
  margin-bottom: 32px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.story-featured-image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-xl);
}

/* Story Body Content */
.story-body {
  font-size: 18px;
  line-height: 1.85;
  color: var(--gray-800);
}
.story-body p { margin-bottom: 1.5em; }
.story-body h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 2em 0 0.8em;
  padding-bottom: 8px;
  border-bottom: 3px dashed var(--orange-100);
}
.story-body h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 1.5em 0 0.6em;
}
.story-body blockquote {
  border-left: 4px solid var(--orange-500);
  padding: 16px 24px;
  margin: 1.5em 0;
  background: var(--orange-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--gray-700);
}
.story-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5em auto;
  display: block;
}

/* Moral Box */
.moral-box {
  background: linear-gradient(135deg, var(--purple-50), #EDE9FE);
  border-radius: var(--radius-2xl);
  padding: 30px 32px;
  margin: 36px 0;
  border-left: 6px solid var(--purple-500);
  position: relative;
  overflow: hidden;
}
.moral-box::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.moral-box .moral-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--purple-500);
  font-weight: 700;
  margin-bottom: 10px;
}
.moral-box .moral-text {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.4;
}

/* Share Bar */
.story-share-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  margin: 28px 0;
  border-top: 2px dashed var(--gray-200);
  border-bottom: 2px dashed var(--gray-200);
}
.share-label { font-size: 14px; font-weight: 700; color: var(--gray-600); }
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: white;
  transition: all 0.2s;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.share-fb { background: #1877F2; }
.share-pin { background: #E60023; }
.share-wa { background: #25D366; }

/* Story Tags */
.story-tags {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 24px 0;
}
.tags-label { font-size: 14px; font-weight: 700; color: var(--gray-600); }
.story-tag {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--gray-200);
  transition: all 0.2s;
}
.story-tag:hover { border-color: var(--orange-500); color: var(--orange-500); background: var(--orange-50); }

/* FAQ Section */
.story-faq {
  margin: 40px 0;
  background: var(--gray-50);
  border-radius: var(--radius-2xl);
  padding: 32px;
  border: 2px solid var(--gray-100);
}
.faq-heading {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--gray-900);
}
.faq-item {
  margin-bottom: 0;
  border-bottom: 1px solid var(--gray-200);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  padding: 16px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--orange-500);
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  padding: 0 0 16px;
  display: none;
}
.faq-item.open .faq-answer { display: block; }

/* Related Stories */
.related-stories { margin-top: 48px; padding-top: 32px; border-top: 2px dashed var(--gray-200); }
.section-head-sm {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.stories-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Sidebar */
.sidebar { position: sticky; top: 90px; }
.sidebar .widget {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--gray-100);
}
.sidebar .widget-title,
.sidebar .widget h3,
.sidebar .widget h4 {
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--orange-100);
}
.widget-list { list-style: none; }
.widget-list li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a {
  text-decoration: none;
  color: var(--gray-600);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  transition: all 0.2s;
}
.widget-list a:hover { color: var(--orange-500); transform: translateX(4px); }
.widget-list a span { color: var(--gray-400); font-size: 12px; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--gray-500); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange-500); }
.breadcrumbs .sep { margin: 0 8px; }

/* ===== ARCHIVE HERO ===== */
.archive-hero {
  background: linear-gradient(135deg, var(--teal-600), #2D9B83, var(--teal-700));
  color: white;
  padding: 48px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.archive-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  border-radius: 50%;
}
.archive-hero .breadcrumbs { justify-content: center; margin-bottom: 16px; }
.archive-hero .breadcrumbs a { color: rgba(255,255,255,0.7); }
.archive-hero .breadcrumbs .sep { color: rgba(255,255,255,0.4); }
.archive-hero .breadcrumbs .current { color: rgba(255,255,255,0.9); }
.archive-title {
  font-family: 'Baloo 2', cursive;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 10px;
}
.archive-desc {
  font-size: 17px;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 12px;
  line-height: 1.6;
}
.archive-count {
  font-size: 14px;
  opacity: 0.7;
  font-weight: 600;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px 0;
  border-bottom: 2px dashed var(--gray-200);
}
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-group label { font-size: 14px; font-weight: 700; color: var(--gray-600); }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--gray-600);
  background: var(--white);
  border: 2px solid var(--gray-200);
  transition: all 0.2s;
}
.filter-pill:hover { border-color: var(--orange-500); color: var(--orange-500); }
.filter-pill.active {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: white;
  border-color: var(--orange-500);
  box-shadow: 0 4px 12px rgba(255,140,66,0.3);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination a.page-numbers,
.pagination span.page-numbers,
.pagination a,
.pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.pagination a.page-numbers,
.pagination a:not(.prev):not(.next) {
  background: var(--white);
  color: var(--gray-600);
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--gray-200);
}
.pagination a.page-numbers:hover,
.pagination a:hover {
  background: var(--orange-50);
  color: var(--orange-600);
  border-color: var(--orange-500);
}
.pagination span.current,
.pagination .current {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: white;
  border: 2px solid var(--orange-500);
  box-shadow: 0 4px 12px rgba(255,140,66,0.3);
}
.pagination .prev,
.pagination .next {
  background: var(--white);
  color: var(--gray-600);
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--gray-200);
  font-weight: 700;
}
.pagination .prev:hover,
.pagination .next:hover {
  background: var(--orange-50);
  color: var(--orange-600);
  border-color: var(--orange-500);
}
.pagination .dots { color: var(--gray-400); border: none; background: none; }

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 80px 24px;
}
.no-results h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 28px;
  color: var(--gray-700);
  margin-bottom: 12px;
}
.no-results p {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 1200;
  background: var(--gray-100);
}
.reading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-500), var(--yellow-400));
  width: 0;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--white);
  z-index: 1100;
  padding: 20px 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.search-overlay.open { transform: translateY(0); }
.search-overlay form { display: flex; align-items: center; gap: 12px; }
.search-overlay input[type="search"] {
  flex: 1;
  padding: 16px 24px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 18px;
  font-family: inherit;
  outline: none;
  background: var(--cream);
}
.search-overlay input[type="search"]:focus { border-color: var(--orange-500); }
.search-close {
  background: none; border: none;
  cursor: pointer; color: var(--gray-500);
  padding: 8px;
}
.search-close:hover { color: var(--gray-800); }

/* ===== CUSTOM LOGO ===== */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 44px; width: auto; }

/* ===== MOBILE NAV ===== */
.main-nav.open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0; right: 0;
  background: var(--white);
  padding: 16px 24px 24px;
  box-shadow: var(--shadow-lg);
  gap: 4px;
  z-index: 999;
  border-bottom: 3px solid var(--orange-500);
  max-height: 80vh;
  overflow-y: auto;
}
.main-nav.open > a,
.main-nav.open .nav-trigger {
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  font-size: 16px;
  border-radius: var(--radius-sm);
}
.main-nav.open > a:hover,
.main-nav.open .nav-trigger:hover {
  background: var(--orange-50);
}
.main-nav.open .nav-dropdown { width: 100%; }
.main-nav.open .nav-dropdown .dropdown-menu {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
  box-shadow: none;
  border: none;
  padding: 4px 0 4px 16px;
  min-width: auto;
  display: none;
  background: var(--cream);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.main-nav.open .nav-dropdown.open .dropdown-menu { display: block; }
.main-nav.open .dropdown-menu a {
  padding: 8px 12px;
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .stories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 40px; }
  .hero { padding: 60px 0 70px; text-align: center; }
  .hero-desc { margin: 0 auto 32px; }
  .hero-metrics { justify-content: center; }
  .hero-ctas { justify-content: center; }
  .sotd-grid { grid-template-columns: 1fr; }
  .sotd-art { display: none; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .ages-flex { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .hero h1 { font-size: 32px; }
  .hero-metrics { gap: 24px; }
  .hero-metric-value { font-size: 30px; }
  .ages-flex { grid-template-columns: 1fr 1fr; }
  .stories-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stories-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .themes-grid { grid-template-columns: 1fr 1fr; }
  .nl-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head h2 { font-size: 28px; }
  .story-title { font-size: 32px; }
  .archive-title { font-size: 32px; }
  .filter-pills { gap: 6px; }
  .filter-pill { padding: 5px 12px; font-size: 12px; }
}
@media (max-width: 500px) {
  .stories-grid { grid-template-columns: 1fr; }
  .stories-grid-3 { grid-template-columns: 1fr; }
  .themes-grid { grid-template-columns: 1fr; }
  .ages-flex { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-metrics { flex-wrap: wrap; gap: 20px; }
  .hero-metric-value { font-size: 26px; }
  .hero h1 { font-size: 28px; }
  .story-title { font-size: 28px; }
}

/* ===== UTILITY ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }