/* ============================================================
   SANTAI KIDS — style.css
   Fonts: Fredoka One (display) + Nunito (body)
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --sky:    #87CEEB;
  --yellow: #FFD93D;
  --pink:   #FFB6C1;
  --mint:   #A8E6CF;
  --white:  #FFFFFF;
  --dark:   #333333;
  --gray:   #666666;
  --light:  #F7FBFF;
  --border: #E8F4FD;

  --bg:      var(--white);
  --bg-alt:  #EFF9FF;
  --text:    var(--dark);
  --text-2:  var(--gray);
  --header-bg: rgba(255,255,255,0.96);
  --card-bg:   var(--white);
  --shadow:  0 4px 20px rgba(135,206,235,0.25);
  --shadow-hover: 0 12px 40px rgba(135,206,235,0.4);

  --radius:  18px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  --ff-display: 'Fredoka One', cursive;
  --ff-body:    'Nunito', sans-serif;

  --transition: 0.3s ease;
  --header-h: 72px;
}

/* DARK MODE */
body.dark {
  --bg:         #1a1f2e;
  --bg-alt:     #222840;
  --text:       #f0f4ff;
  --text-2:     #a0aac0;
  --header-bg:  rgba(26,31,46,0.97);
  --card-bg:    #252d42;
  --border:     #2e3a55;
  --shadow:     0 4px 20px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.5);
  --light:      #1e2438;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--sky); border-radius: 4px; }

/* ---------- LOADING SCREEN ---------- */
#loading-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, var(--sky) 0%, var(--mint) 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }
.loader-book {
  text-align: center;
  animation: loaderPop 0.6s ease;
}
.loader-book span { font-size: 5rem; display: block; animation: bookBounce 0.8s ease infinite alternate; }
.loader-book p { color: var(--white); font-size: 1.1rem; font-weight: 700; margin-top: 12px; font-family: var(--ff-body); }

@keyframes loaderPop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bookBounce { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-14px) rotate(5deg); } }

/* ---------- BACK TO TOP ---------- */
#back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--yellow);
  color: var(--dark);
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: all var(--transition);
  opacity: 0; transform: translateY(20px);
  pointer-events: none;
  z-index: 200;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
#back-to-top:hover { background: var(--sky); transform: translateY(-3px); }

/* ---------- FLOATING BADGES ---------- */
#floating-badges {
  position: fixed; top: 90px; right: 18px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 190;
}
.badge-btn {
  background: var(--white);
  border: 2px solid var(--sky);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.badge-btn:hover { background: var(--sky); color: var(--white); transform: scale(1.05); }
.badge {
  background: var(--pink);
  color: var(--dark);
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}

/* ---------- TOAST ---------- */
#toast {
  position: fixed; bottom: 84px; right: 24px;
  background: var(--mint);
  color: var(--dark);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-hover);
  z-index: 500;
  transform: translateY(30px); opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
  max-width: 300px;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ---------- CONTAINER ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sky) 0%, #5DB8E6 100%);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(135,206,235,0.45);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(135,206,235,0.5); filter: brightness(1.05); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2.5px solid rgba(255,255,255,0.8);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-yellow { background: linear-gradient(135deg, var(--yellow), #F5C800); color: var(--dark); box-shadow: 0 6px 20px rgba(255,217,61,0.35); }
.btn-yellow:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(255,217,61,0.45); }

/* ---------- SECTION HEADER ---------- */
.section-header { text-align: center; margin-bottom: 52px; }

/* Back button inside detail page */
.book-detail-top { display:flex; justify-content:flex-start; margin-bottom: 12px; }
#back-button { padding: 8px 12px; border-radius: 10px; background: transparent; border: 1px solid rgba(255,255,255,0.06); color: var(--text); font-weight:700; }
#back-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.section-header h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text);
  margin-bottom: 12px;
}
.section-header p { color: var(--text-2); font-size: 1.05rem; }

/* ---------- WAVE DIVIDERS ---------- */
.wave-top, .wave-bottom { line-height: 0; overflow: hidden; }
.wave-top svg, .wave-bottom svg { display: block; width: 100%; }

/* ---------- FADE-IN ANIMATION ---------- */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition), background var(--transition);
}
#site-header.scrolled { box-shadow: 0 4px 24px rgba(135,206,235,0.2); }
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
}
.logo {
  font-family: var(--ff-display);
  font-size: 1.45rem;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { background: linear-gradient(135deg, var(--sky), var(--mint)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
}
.nav-links a {
  padding: 7px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--border); }
.nav-links a.active { color: var(--sky); background: rgba(135,206,235,0.15); }

.nav-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.search-wrap { position: relative; }
.search-wrap input {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 8px 40px 8px 16px;
  font-size: 0.88rem;
  width: 180px;
  color: var(--text);
  transition: all var(--transition);
}
.search-wrap input:focus { outline: none; border-color: var(--sky); width: 220px; }
#search-btn {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; font-size: 1rem; padding: 0;
}
#search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 200;
  max-height: 280px; overflow-y: auto;
  display: none;
}
#search-results.open { display: block; }
.search-result-item {
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--bg-alt); }

#lang-switcher {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 7px 12px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition);
}
#lang-switcher:focus { outline: none; border-color: var(--sky); }

#dark-toggle {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1rem;
  transition: all var(--transition);
}
#dark-toggle:hover { background: var(--yellow); border-color: var(--yellow); transform: rotate(20deg); }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  padding-top: var(--header-h);
  background: linear-gradient(145deg, #C9EEFF 0%, #A8E6CF 40%, #FFD93D22 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-content {
  padding: 80px 40px 120px 80px;
  position: relative; z-index: 2;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.55);
  color: #2a7da8;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  border: 1.5px solid rgba(135,206,235,0.4);
}
.hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-sub { font-size: 1.1rem; color: #2d5a73; margin-bottom: 34px; max-width: 460px; font-weight: 600; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Floating decorations */
.floating-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.deco-book {
  position: absolute;
  font-size: 2rem;
  animation: floatAround 6s ease-in-out infinite;
  opacity: 0.7;
}
.d1 { top: 12%; left: 6%;   animation-delay: 0s;    font-size: 2.4rem; }
.d2 { top: 20%; right: 52%; animation-delay: 1s;    font-size: 1.6rem; }
.d3 { top: 70%; left: 4%;   animation-delay: 2s;    font-size: 1.8rem; }
.d4 { top: 80%; left: 42%;  animation-delay: 3s;    font-size: 1.5rem; }
.d5 { top: 8%;  right: 5%;  animation-delay: 0.5s;  font-size: 2rem; }
.d6 { top: 55%; right: 4%;  animation-delay: 1.5s;  font-size: 1.4rem; }
.d7 { top: 40%; left: 2%;   animation-delay: 2.5s;  font-size: 1.2rem; }
.d8 { top: 90%; right: 8%;  animation-delay: 3.5s;  font-size: 1.6rem; }

@keyframes floatAround {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-18px) rotate(5deg); }
}

/* Hero illustration */
.hero-illustration {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 60px 120px 20px;
  position: relative; z-index: 2;
}
.illo-scene {
  position: relative;
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: 0 20px 60px rgba(135,206,235,0.35);
  animation: illoFloat 4s ease-in-out infinite;
  border: 3px solid rgba(255,255,255,0.6);
}
.illo-child { font-size: 5rem; line-height: 1; }
.illo-books { display: flex; gap: 4px; font-size: 2.2rem; margin-top: 8px; }
.illo-stars {
  position: absolute; top: -16px; right: -8px;
  font-size: 1.6rem; display: flex; gap: 4px;
  animation: sparkle 2s ease-in-out infinite alternate;
}
@keyframes illoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes sparkle   { 0% { opacity: 0.6; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1.1); } }

.hero .wave-bottom { position: absolute; bottom: 0; left: 0; right: 0; }

/* ============================================================
   STATS
   ============================================================ */
.stats-section { padding: 72px 0; background: var(--bg); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-card {
  text-align: center;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 20px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--sky), var(--mint));
}
.stat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.stat-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.stat-num {
  font-family: var(--ff-display);
  font-size: 2.6rem;
  color: var(--sky);
  line-height: 1;
}
.stat-suffix { font-family: var(--ff-display); font-size: 2rem; color: var(--sky); }
.stat-card p { color: var(--text-2); font-weight: 700; font-size: 0.95rem; margin-top: 6px; }

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-section {
  background: var(--bg-alt);
  padding: 0 0 0;
  position: relative;
}
.categories-section .container { padding-top: 60px; padding-bottom: 80px; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cat-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.cat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(135,206,235,0.08));
  transition: opacity var(--transition);
}
.cat-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-hover); border-color: var(--sky); }
.cat-icon { font-size: 2.8rem; margin-bottom: 14px; display: block; transition: transform 0.4s ease; }
.cat-icon img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; display: block; }
.cat-card:hover .cat-icon { transform: scale(1.2) rotate(8deg); }
.cat-card h3 { font-family: var(--ff-display); font-size: 1.1rem; margin-bottom: 6px; color: var(--text); }
.cat-card p { font-size: 0.88rem; color: var(--text-2); }

/* ============================================================
   BOOKS / BEST SELLERS
   ============================================================ */
.books-section { padding: 80px 0; background: var(--bg); }
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.book-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); border-color: var(--sky); }
.book-cover {
  aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--bg-alt), var(--border));
  position: relative; overflow: hidden;
  transition: transform var(--transition);
}
.book-cover img {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  transform: translateY(0) scale(1.03);
  transition: transform 900ms cubic-bezier(.2,.9,.2,1);
  will-change: transform;
  z-index: 0;
}
.book-cover-placeholder {
  position: absolute;
  font-size: 4rem;
  z-index: 1;
  pointer-events: none;
}

.book-card:hover .book-cover img {
  transform: translateY(18%) scale(1.03);
}
.book-card:hover .book-cover { transform: scale(1.04); }
.book-cover-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
}
.book-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.book-category {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--sky);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.book-title {
  font-family: var(--ff-display);
  font-size: 1rem;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--text);
}
.book-author { font-size: 0.82rem; color: var(--text-2); margin-bottom: 10px; }
.book-stars { font-size: 0.85rem; margin-bottom: 12px; }
.book-stars span { color: var(--text-2); font-size: 0.8rem; }
.book-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.book-price { font-family: var(--ff-display); font-size: 1.2rem; color: var(--sky); }
.book-actions { display: flex; gap: 6px; }
.btn-buy {
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  border: 2px solid;
  border-color: var(--sky);
  background: transparent;
  color: var(--sky);
}
.btn-buy:hover { background: var(--sky); color: var(--white); transform: scale(1.15); }

.book-detail {
  padding: 60px 0;
}
.book-detail-card {
  background: var(--white);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.08);
  padding: 36px;
  display: grid;
  gap: 24px;
}
.book-detail-cover {
  position: relative;
  width: 100%;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(16, 24, 56, 0.14);
  background: radial-gradient(circle at top, rgba(255,255,255,0.25), transparent 55%), linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.15));
}
.book-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  transition: transform 0.8s ease;
}
.book-detail-cover:hover img { transform: scale(1.04) translateY(-4%); }
.book-detail-header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.book-detail-emoji {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  border-radius: 22px;
  background: var(--light);
}
.book-detail-meta {
  display: grid;
  gap: 10px;
}
.book-detail-meta h1 { margin: 0; font-size: clamp(2rem, 2.5vw, 2.5rem); }
.book-detail-meta p { margin: 0; color: var(--text-2); }
.book-detail-section { display: grid; gap: 18px; }
.book-detail-section h2 { margin: 0 0 10px; font-size: 1.05rem; color: var(--text); }
.book-detail-section p { line-height: 1.8; color: var(--text-2); }
/* Preserve newlines in description/example text */
#book-detail-desc,
#book-detail-example {
  white-space: pre-line;
}
.book-detail-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.book-detail-actions .btn { min-width: 150px; }

/* ============================================================
   WHY US
   ============================================================ */
.why-section {
  background: var(--light);
  position: relative;
}
.why-section .container { padding-top: 80px; padding-bottom: 80px; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.why-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
  animation: iconPulse 3s ease-in-out infinite;
}
.why-card:nth-child(2) .why-icon { animation-delay: 0.5s; }
.why-card:nth-child(3) .why-icon { animation-delay: 1s; }
.why-card:nth-child(4) .why-icon { animation-delay: 1.5s; }
@keyframes iconPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.why-card h3 { font-family: var(--ff-display); font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.why-card p { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews-section { padding: 80px 0; background: var(--bg); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute; top: 14px; right: 20px;
  font-family: var(--ff-display);
  font-size: 5rem;
  color: var(--sky);
  opacity: 0.15;
  line-height: 1;
}
.review-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.review-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.review-avatar { font-size: 2.4rem; background: var(--bg-alt); width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 2px solid var(--border); }
.review-meta strong { font-weight: 800; font-size: 0.95rem; display: block; }
.review-meta small { color: var(--text-2); font-size: 0.8rem; }
.review-stars { margin-bottom: 10px; font-size: 0.9rem; }
.review-text { font-size: 0.92rem; color: var(--text-2); line-height: 1.7; }

/* ============================================================
   READING CLUB
   ============================================================ */
.club-section {
  background: linear-gradient(135deg, var(--sky) 0%, #5CBDE3 50%, var(--mint) 100%);
  position: relative;
  padding: 0;
}
.club-section .container { padding-top: 80px; padding-bottom: 80px; }
.club-inner { text-align: center; max-width: 580px; margin: 0 auto; }
.club-deco { font-size: 2rem; letter-spacing: 6px; margin-bottom: 16px; display: block; }
.club-inner h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.25;
}
.club-inner > p { color: rgba(255,255,255,0.9); font-size: 1rem; margin-bottom: 30px; font-weight: 600; }
.club-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.club-form input {
  flex: 1; min-width: 220px;
  padding: 13px 22px;
  border-radius: 50px;
  border: none;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.95);
  color: var(--dark);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.club-form input:focus { outline: 3px solid var(--yellow); }
.club-note { color: rgba(255,255,255,0.75); font-size: 0.85rem; margin-top: 14px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { padding: 90px 0; background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: center; }
.about-illo { text-align: center; }
.illo-big {
  font-size: 9rem;
  animation: illoFloat 5s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 20px 30px rgba(135,206,235,0.3));
}
.illo-sub-row { display: flex; justify-content: center; gap: 10px; font-size: 3rem; margin-top: 12px; }
.illo-sub-row span:nth-child(1) { animation: bookBounce 2.5s ease-in-out infinite;              }
.illo-sub-row span:nth-child(2) { animation: bookBounce 2.5s ease-in-out infinite 0.4s;         }
.illo-sub-row span:nth-child(3) { animation: bookBounce 2.5s ease-in-out infinite 0.8s;         }
.illo-sub-row span:nth-child(4) { animation: bookBounce 2.5s ease-in-out infinite 1.2s;         }
.about-eyebrow {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--sky);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.about-text h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 22px;
  line-height: 1.25;
}
.about-text p { color: var(--text-2); line-height: 1.75; margin-bottom: 16px; }
.about-text .btn { margin-top: 10px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  background: var(--bg-alt);
  position: relative;
  padding-bottom: 80px;
}
.contact-section .container { padding-top: 60px; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }

.contact-form { background: var(--card-bg); padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid var(--border); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--sky); }
.form-group textarea { resize: vertical; min-height: 120px; }
.err { display: block; color: #e05555; font-size: 0.8rem; font-weight: 700; margin-top: 4px; min-height: 18px; }
.form-success { margin-top: 16px; color: #2d8a5e; font-weight: 700; font-size: 0.95rem; }

.contact-info { display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.info-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; align-items: flex-start; gap: 16px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.info-card:hover { transform: translateX(4px); border-color: var(--sky); }
.info-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.info-card strong { display: block; font-weight: 800; margin-bottom: 4px; font-size: 0.9rem; }
.info-card p { font-size: 0.88rem; color: var(--text-2); line-height: 1.6; }
.info-card a { color: var(--sky); font-weight: 700; }
.info-card a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 0;
}
body.dark #site-footer { background: #111520; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
#site-footer .logo span { background: linear-gradient(135deg, var(--sky), var(--mint)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin: 14px 0 20px; line-height: 1.7; }
.social-links { display: flex; gap: 10px; }
.social {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.social:hover { background: var(--sky); transform: translateY(-3px); }

.footer-col h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li a { font-size: 0.88rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-col li a:hover { color: var(--sky); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.45); }
.footer-love { color: rgba(255,255,255,0.4) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid   { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .books-grid      { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid    { grid-template-columns: repeat(2, 1fr); }
  .about-grid      { grid-template-columns: 1fr; }
  .about-illo      { order: -1; }
  .contact-grid    { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-content { padding: 80px 32px 40px; text-align: center; }
  .hero-sub { margin: 0 auto 34px; }
  .hero-btns { justify-content: center; }
  .hero-illustration { padding: 0 40px 80px; }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--header-bg);
    flex-direction: column;
    padding: 24px;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.35s ease;
    backdrop-filter: blur(12px);
    z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; text-align: center; padding: 12px; }
  .hamburger { display: flex; }
  .search-wrap input { width: 130px; }
  .search-wrap input:focus { width: 160px; }
}

@media (max-width: 640px) {
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: 1fr; }
  .books-grid      { grid-template-columns: 1fr; }
  .reviews-grid    { grid-template-columns: 1fr; }
  .why-grid        { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr; }
  .club-form       { flex-direction: column; }
  .club-form input { min-width: unset; }
  .footer-bottom   { flex-direction: column; text-align: center; }
  .search-wrap     { display: none; }
  #floating-badges { top: auto; bottom: 80px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
