/* ============================================
   MyPersonalBook - Children's Book Generator
   Magical Pastel Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --purple: #b8a9e8;
  --purple-dark: #9b87d4;
  --purple-light: #e8e0f7;
  --pink: #f2b8d1;
  --pink-dark: #e899b8;
  --pink-light: #fce4ef;
  --blue: #a8d4f0;
  --blue-light: #d6ecf8;
  --yellow: #fce4a8;
  --yellow-light: #fef4d6;
  --green: #b8e8c8;
  --green-light: #daf5e4;
  --white: #fffcfe;
  --text: #4a3f6b;
  --text-light: #7b6fa0;
  --text-muted: #a099b8;
  --bg: #faf7ff;
  --card-bg: #ffffff;
  --shadow: 0 4px 20px rgba(154, 135, 212, 0.15);
  --shadow-hover: 0 8px 30px rgba(154, 135, 212, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.3s ease;
  --font-main: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* --- New Design Palette (v2) --- */
  --dp-yellow: #FFF8E7;
  --dp-mint: #E8FAF0;
  --dp-lavender: #F0E8FF;
  --dp-orange: #FF6B4A;
  --dp-orange-hover: #FF5533;
  --dp-orange-light: #FFF0EC;
  --dp-purple: #7C5CFC;
  --dp-purple-light: #B8A5FF;
  --dp-pink: #FF6B9D;
  --dp-pink-light: #FFD6E5;
  --dp-teal: #4ECDC4;
  --dp-teal-light: #D1F5F0;
  --dp-blue: #45B7D1;
  --dp-text: #2D2B55;
  --dp-text-light: #6B6899;
  --dp-card-shadow: 0 4px 24px rgba(124, 92, 252, 0.10);
  --dp-card-shadow-hover: 0 12px 40px rgba(124, 92, 252, 0.20);
  --dp-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dp-radius: 20px;
  --dp-radius-lg: 28px;
  --coral: #FF8A7A;
  --coral-dark: #E8715F;
  --coral-light: #FFB5AA;
  --dark: #2D2A3E;
  --gray-50: #F8F7FC;
  --gray-100: #EEEDF5;
  --gray-200: #D8D6E3;
  --gray-600: #6B6880;
  --accent-rose: #C06070;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--dp-text);
  background: var(--dp-yellow);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.navbar .logo span {
  font-family: 'Baloo 2', 'Nunito', cursive;
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s var(--dp-bounce);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Wave Dividers --- */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  position: relative;
  overflow: hidden;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}
.wave-divider.flip svg {
  transform: scaleY(-1);
}

/* --- Section Background Colors --- */
.section-yellow { background: var(--dp-yellow); }
.section-mint { background: var(--dp-mint); }
.section-lavender { background: var(--dp-lavender); }
.section-white { background: #fff; }

a {
  color: var(--purple-dark);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--pink-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Navigation --- */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(124, 92, 252, 0.08);
  border-bottom: 3px solid transparent;
  background-image: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
                    linear-gradient(90deg, var(--dp-purple), var(--dp-pink), var(--dp-orange));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .logo span {
  font-family: 'Baloo 2', cursive;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--dp-purple), var(--dp-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar .logo .logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar .logo .logo-icon {
  font-size: 1.8rem;
}

.navbar .nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.navbar .nav-links a {
  font-family: 'Nunito', sans-serif;
  color: var(--dp-text);
  font-weight: 700;
  padding: 0.5rem 0;
  position: relative;
  border-radius: 12px;
  transition: all 0.3s var(--dp-bounce);
}

.navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--dp-purple), var(--dp-pink));
  transition: var(--transition);
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: var(--dp-purple);
}

.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after {
  width: 100%;
}

.navbar .nav-links .btn-nav {
  background: var(--dp-orange);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255, 107, 74, 0.3);
  transition: all 0.3s var(--dp-bounce);
}

.navbar .nav-links .btn-nav:hover {
  background: var(--dp-orange-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 24px rgba(255, 107, 74, 0.4);
  color: white;
}

.navbar .nav-links .btn-nav::after {
  display: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dp-text);
  cursor: pointer;
}

/* --- Hero Section (split two-column, coral accent) --- */
.hero {
  background: linear-gradient(135deg, #FAF7FF 0%, #FFF5F3 50%, #F0EDFF 100%);
  padding: 0;
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.hero::before {
  display: none;
}

.hero .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 2rem 3rem;
}

.hero .decorations {
  display: none;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--coral);
}

.hero .subtitle {
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta .btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--coral);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(255, 138, 122, 0.3);
}

.hero-cta .btn-hero-primary:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 138, 122, 0.45);
  color: white;
}

.hero-cta .btn-hero-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.hero-cta .btn-hero-primary:hover::after {
  left: 120%;
}

.hero-cta .btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--dark);
  padding: 1rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
}

.hero-cta .btn-hero-secondary:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual .hero-image-wrapper {
  width: 100%;
  max-width: 520px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(45, 42, 62, 0.15);
  position: relative;
}

.hero-visual .hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-visual .hero-float-badge {
  position: absolute;
  background: white;
  border-radius: 16px;
  padding: 0.8rem 1.2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark);
  animation: floatBadge 3s ease-in-out infinite;
}

.hero-visual .hero-float-badge.top-left {
  top: -10px;
  left: -20px;
  animation-delay: 0s;
}

.hero-visual .hero-float-badge.bottom-right {
  bottom: -10px;
  right: -20px;
  animation-delay: 1.5s;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--dp-bounce);
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
}

.btn-primary {
  background: var(--dp-orange);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 74, 0.25);
}

.btn-primary:hover {
  background: var(--dp-orange-hover);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 28px rgba(255, 107, 74, 0.35);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--dp-purple);
  border: 2px solid var(--dp-purple);
}

.btn-secondary:hover {
  background: var(--dp-purple);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}

.btn-success {
  background: linear-gradient(135deg, var(--green), #8dd4a8);
  color: white;
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

/* --- Section Styles --- */
.section {
  padding: 5rem 2rem;
  position: relative;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section .container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
}

.section-subtitle {
  text-align: center;
  font-family: 'Nunito', sans-serif;
  color: var(--dp-text-light);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Product Category Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.product-card {
  background: #fff;
  border-radius: var(--dp-radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--dp-card-shadow);
  transition: transform 0.4s var(--dp-bounce), box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--dp-card-shadow-hover);
}

.product-thumb {
  border-radius: 0;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.05);
}

.product-card h3,
.product-card p,
.product-price,
.product-card .btn,
.product-card-actions {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Baloo 2', cursive;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.9rem;
  border-radius: 50px;
  color: #fff;
  z-index: 3;
}

.badge-custom { background: var(--dp-purple); }
.badge-edu { background: var(--dp-teal); }
.badge-orthodox { background: var(--dp-pink); }

.product-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dp-text);
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.product-card p {
  font-family: 'Nunito', sans-serif;
  color: var(--dp-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.product-price {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dp-orange);
  margin: 0.75rem 0 0.5rem;
}

.product-card .btn {
  margin: 0 1.5rem 1.5rem;
  padding: 0.7rem 1.2rem;
}

/* Book type badge for order cards */
.book-type-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.book-type-badge.type-custom {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.book-type-badge.type-educational {
  background: var(--green-light);
  color: #2d8a4e;
}

.book-type-badge.type-orthodox {
  background: var(--yellow-light);
  color: #b8860b;
}

/* --- Showcase Grid --- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.showcase-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.showcase-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.showcase-card-body {
  padding: 1rem;
}

.showcase-card-body h4 {
  font-size: 1rem;
  color: var(--dp-text);
  margin-bottom: 0.25rem;
}

.showcase-card-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.showcase-card-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--dp-text-light);
  margin-bottom: 0.35rem;
}

.showcase-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-dark);
}

.showcase-card-link:hover {
  color: var(--pink-dark);
}

/* --- Story Reader Overlay --- */
.story-reader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 35, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.story-reader {
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  max-height: 95vh;
}

.reader-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.reader-close:hover {
  background: rgba(255,255,255,0.3);
}

.reader-content {
  width: 100%;
  text-align: center;
}

.reader-content img {
  max-width: 100%;
  max-height: 65vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  object-fit: contain;
}

.reader-text {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 1rem;
  padding: 0 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.reader-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.reader-prev,
.reader-next {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.reader-prev:hover,
.reader-next:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

.reader-prev:disabled,
.reader-next:disabled {
  opacity: 0.3;
  cursor: default;
}

.reader-page-num {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 70px;
  text-align: center;
}

.reader-cta {
  margin-top: 1.5rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.reader-cta p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* --- Features Grid (horizontal cards with colored left borders) --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: #fff;
  border-radius: var(--dp-radius);
  padding: 1.8rem;
  box-shadow: var(--dp-card-shadow);
  transition: transform 0.4s var(--dp-bounce), box-shadow 0.4s ease;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.feature-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 0 4px 4px 0;
}

.feature-card:nth-child(1)::before { background: var(--dp-purple); }
.feature-card:nth-child(2)::before { background: var(--dp-pink); }
.feature-card:nth-child(3)::before { background: var(--dp-teal); }
.feature-card:nth-child(4)::before { background: var(--dp-orange); }
.feature-card:nth-child(5)::before { background: var(--dp-blue); }
.feature-card:nth-child(6)::before { background: var(--dp-purple-light); }

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--dp-card-shadow-hover);
}

.feature-card .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card .icon-img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card .icon-img img {
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.feature-card-text {
  flex: 1;
}

.feature-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dp-text);
  margin-bottom: 0.3rem;
}

.feature-card p {
  font-family: 'Nunito', sans-serif;
  color: var(--dp-text-light);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

/* --- How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--dp-orange);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  box-shadow: 0 4px 20px rgba(255, 107, 74, 0.3);
  position: relative;
  z-index: 2;
  transition: transform 0.3s var(--dp-bounce);
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
}

.step-card p {
  color: var(--dp-text-light);
  font-size: 0.9rem;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: none; /* Hidden — replaced by testimonial carousel */
}

.testimonial-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.testimonial-card .stars {
  color: #fbbf24;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonial-card p {
  color: var(--dp-text-light);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--purple-dark);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--dp-purple) 0%, var(--dp-pink) 50%, var(--dp-orange) 100%);
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-section > * {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-section p {
  font-family: 'Nunito', sans-serif;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.cta-section .btn {
  background: #fff;
  color: var(--dp-purple);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 1rem 2.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.cta-section .btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.2);
  color: var(--dp-orange);
}

/* --- Footer --- */
.footer {
  background: linear-gradient(135deg, #2D2B55 0%, #4A3070 50%, #6B3A6E 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.footer .container {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: 'Nunito', sans-serif;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer .copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   CREATE PAGE - Book Form
   ============================================ */

.form-page {
  min-height: 100vh;
  background: var(--dp-yellow);
}

.form-container {
  max-width: 750px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* Legacy form-header (kept for backwards compat, prefer .page-hero) */
.form-header {
  text-align: center;
  margin-bottom: 3rem;
  border-radius: var(--dp-radius);
  overflow: hidden;
  position: relative;
  padding: 3rem 2.5rem;
  background: linear-gradient(135deg, #FAF7FF 0%, #FFF5F3 50%, #F0EDFF 100%);
}

.form-header::before {
  display: none;
}

.form-header h1 {
  position: relative;
  font-size: 2.2rem;
  color: var(--dark);
  -webkit-text-fill-color: var(--dark);
  text-shadow: none;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.form-header p {
  position: relative;
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: none;
}

/* Progress bar */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--purple-light);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.progress-step .step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}

.progress-step.active .step-dot {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
}

.progress-step.done .step-dot {
  background: var(--green);
  color: white;
}

.progress-step .step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-step.active .step-label,
.progress-step.done .step-label {
  color: var(--dp-text);
}

/* Form steps - scrollable layout (all visible) */
.form-step {
  display: block;
  opacity: 1;
  transition: opacity 0.4s ease;
  padding: 2.5rem 0;
  border-bottom: 2px solid var(--purple-light);
  text-align: center;
}

.form-step:last-child {
  border-bottom: none;
}

.form-step.active {
  opacity: 1;
}

.form-step.done {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
  text-align: center;
}

.form-step .step-description {
  color: var(--dp-text-light);
  margin-bottom: 2rem;
  text-align: center;
}

.form-step .step-cta {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--purple-dark);
}

/* Form field label */
.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--dp-text);
  text-align: center;
}

/* Text input */
.input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--purple-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-main);
  color: var(--dp-text);
  background: white;
  transition: var(--transition);
}

.input-field:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(184, 169, 232, 0.2);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* Button selector group (for Gen, Tema, Stil, etc.) */
.btn-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

/* Style grid: 4 per row square buttons */
.btn-selector.style-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.btn-option {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--purple-light);
  border-radius: 50px;
  background: white;
  color: var(--dp-text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

/* Square style buttons */
.btn-selector.style-grid .btn-option {
  border-radius: var(--radius);
  padding: 1.2rem 0.75rem;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1.3;
  text-align: center;
}

.btn-option:hover {
  border-color: var(--purple);
  background: var(--purple-light);
}

.btn-option.selected {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(184, 169, 232, 0.3);
}

/* Age group selector - square group buttons */
.age-group-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.age-group-btn {
  border: 2px solid var(--purple-light);
  border-radius: var(--radius);
  background: white;
  color: var(--dp-text);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  padding: 1.5rem 1rem;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.age-group-btn .age-group-range {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.age-group-btn .age-group-label {
  font-size: 0.85rem;
  color: var(--dp-text-light);
  margin-top: 0.25rem;
}

.age-group-btn:hover {
  border-color: var(--purple);
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.age-group-btn.selected {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(184, 169, 232, 0.3);
  transform: translateY(-2px);
}

.age-group-btn.selected .age-group-label {
  color: rgba(255, 255, 255, 0.85);
}

/* Step 2 header image */
.step2-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step2-header-img {
  width: 100%;
  max-width: 750px;
  height: auto;
  border-radius: var(--radius);
}

/* Image-based button selector (Tema & Morala) */
.img-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* 4 per row grid */
.img-selector.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

/* 3 per row grid */
.img-selector.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

/* 2 per row grid (gender selector) */
.img-selector.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.img-selector.grid-2 .img-option {
  max-width: none;
  flex: none;
}

.img-option {
  background: none;
  border: 3px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  max-width: 200px;
  flex: 1 1 140px;
}

.img-selector.grid-4 .img-option {
  max-width: none;
  flex: none;
}

.img-option img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.img-option:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.img-option.selected {
  border-color: var(--purple-dark);
  box-shadow: 0 0 0 3px var(--purple), var(--shadow-hover);
  transform: translateY(-3px);
}

.img-option.selected::after {
  content: '\2713';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Photo upload */
.upload-zone {
  border: 3px dashed var(--purple-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(232, 224, 247, 0.2);
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.upload-zone:hover {
  border-color: var(--purple);
  background: rgba(232, 224, 247, 0.4);
}

.upload-zone.has-file {
  border-color: var(--green);
  background: var(--green-light);
}

.upload-zone .upload-icon {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.upload-zone p {
  color: var(--dp-text-light);
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

.upload-zone .file-name {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--purple-dark);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Photo preview */
.photo-preview {
  max-width: 200px;
  margin: 1rem auto 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: none;
}

.photo-preview img {
  width: 100%;
  display: block;
}

/* Form navigation */
.form-nav {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  gap: 1rem;
}

.form-nav .btn {
  min-width: 160px;
}

/* Submission summary */
.summary-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--purple-light);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row .label {
  color: var(--dp-text-light);
  font-weight: 500;
}

.summary-row .value {
  font-weight: 600;
  color: var(--dp-text);
}

/* ============================================
   MY BOOKS / DASHBOARD PAGE
   ============================================ */

.dashboard-page {
  min-height: 100vh;
  background: var(--bg);
}

.dashboard-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* Auth section (login/register) */
.auth-section {
  max-width: 450px;
  margin: 0 auto;
  text-align: center;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
}

.auth-card .auth-subtitle {
  color: var(--dp-text-light);
  margin-bottom: 2rem;
}

/* Social login buttons */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: 50px;
  border: 2px solid #e8e4f0;
  background: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  color: var(--dp-text);
}

.btn-social:hover {
  background: var(--purple-light);
  border-color: var(--purple);
}

.btn-social .social-icon {
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

.btn-social.google { border-color: #e8e4f0; }
.btn-social.facebook { border-color: #e8e4f0; }
.btn-social.twitter { border-color: #e8e4f0; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--purple-light);
}

/* Email login form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.email-form .input-field {
  text-align: left;
}

.auth-toggle {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--dp-text-light);
}

.auth-toggle a {
  font-weight: 600;
}

/* Dashboard (logged-in view) */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  color: var(--dp-text);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--dp-text-light);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Order cards */
.orders-grid {
  display: grid;
  gap: 1.5rem;
}

.order-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  transition: var(--transition);
}

.order-card:hover {
  box-shadow: var(--shadow-hover);
}

.order-thumb {
  width: 80px;
  height: 100px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--purple-light), var(--pink-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.order-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.order-details .order-meta {
  color: var(--dp-text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.order-details .order-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.order-status.ready {
  background: var(--green-light);
  color: #2d8a4e;
}

.order-status.processing {
  background: var(--yellow-light);
  color: #b8860b;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.order-actions .btn-small {
  white-space: nowrap;
}

.expiry-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.cooldown-note {
  font-size: 0.75rem;
  color: var(--pink-dark);
  text-align: right;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--dp-text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--dp-text-light);
  margin-bottom: 2rem;
}

/* ============================================
   SUCCESS PAGE
   ============================================ */

.success-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.success-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.success-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 550px;
  width: 100%;
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.success-card h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dp-text);
}

.success-card p {
  color: var(--dp-text-light);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.success-card .order-number {
  background: var(--purple-light);
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  color: var(--purple-dark);
  margin: 1.5rem 0;
  font-size: 1.1rem;
}

/* Generation progress bar */
.generation-progress {
  width: 100%;
  height: 8px;
  background: var(--purple-light);
  border-radius: 4px;
  margin-top: 1rem;
  overflow: hidden;
}

.generation-bar {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 4px;
  transition: width 2s ease;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ============================================
   AUTH OVERLAY (create.html popup)
   ============================================ */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 63, 107, 0.5);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 1rem;
}

.auth-overlay.active {
  display: flex;
}

.auth-overlay .auth-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-hover);
  max-width: 420px;
  width: 100%;
  animation: fadeIn 0.3s ease;
}

.auth-overlay .auth-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.auth-overlay .auth-close:hover {
  color: var(--dp-text);
}

.auth-overlay h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
  text-align: center;
}

.auth-overlay .auth-subtitle {
  color: var(--dp-text-light);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
}

.auth-overlay .social-buttons {
  margin-bottom: 1rem;
}

.auth-overlay .auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-overlay .auth-divider::before,
.auth-overlay .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--purple-light);
}

.auth-overlay .email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-overlay .auth-toggle {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--dp-text-light);
  text-align: center;
}

.auth-overlay .auth-toggle a {
  font-weight: 600;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 247, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 1.5rem;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--purple-light);
  border-top: 4px solid var(--purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-overlay p {
  color: var(--dp-text);
  font-size: 1.2rem;
  font-weight: 500;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 10000;
  max-width: 350px;
  border-left: 4px solid var(--green);
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  border-left-color: var(--pink-dark);
}

.toast .toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast .toast-message {
  font-size: 0.9rem;
  color: var(--dp-text-light);
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -4px 24px rgba(124, 92, 252, 0.12);
  border-top: 3px solid transparent;
  background-image: linear-gradient(rgba(255,255,255,0.97), rgba(255,255,255,0.97)),
                    linear-gradient(90deg, var(--dp-purple), var(--dp-pink), var(--dp-orange));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  padding: 1.5rem 2rem;
  z-index: 10001;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-content p {
  flex: 1;
  min-width: 250px;
  font-size: 0.9rem;
  color: var(--dp-text-light);
  line-height: 1.6;
}

.cookie-content a {
  font-weight: 600;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ============================================
   LEGAL PAGES (Privacy, Terms)
   ============================================ */

.legal-page {
  min-height: 100vh;
  background: var(--bg);
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.legal-container h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
}

.legal-container .legal-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal-container h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--purple-dark);
}

.legal-container h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dp-text);
}

.legal-container p,
.legal-container li {
  color: var(--dp-text-light);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.legal-container ul,
.legal-container ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-container a {
  text-decoration: underline;
}

/* ============================================
   EDUCATIONAL FORM - Subject Cards
   ============================================ */

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 550px;
  margin: 0 auto 1.5rem;
}

.subject-card {
  border: 3px solid var(--purple-light);
  border-radius: var(--radius);
  background: white;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.subject-card:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.subject-card.selected {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(184, 169, 232, 0.3);
}

.subject-card .subject-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.subject-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.subject-card p {
  font-size: 0.8rem;
  opacity: 0.8;
}

.subject-card.selected h4,
.subject-card.selected p {
  color: white;
}

/* ============================================
   ORTHODOX CATALOG
   ============================================ */

.orthodox-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.moral-group {
  margin-bottom: 3rem;
}

.moral-group h3 {
  font-size: 1.3rem;
  color: var(--purple-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--purple-light);
}

.stories-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.story-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.story-card-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--yellow-light), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

.story-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-card-body h4 {
  font-size: 1.05rem;
  color: var(--dp-text);
  margin-bottom: 0.25rem;
}

.story-card-body .bible-ref {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.story-card-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ============================================
   PAGE HERO (sub-pages — consistent with index hero)
   ============================================ */

.page-hero {
  background: linear-gradient(135deg, #FAF7FF 0%, #FFF5F3 50%, #F0EDFF 100%);
  padding: 0;
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 340px;
}

.page-hero .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3.5rem 2rem 2.5rem;
}

.page-hero-text {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.page-hero h1 .accent {
  color: var(--coral);
}

.page-hero p {
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gray-600);
  max-width: 480px;
}

.page-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero-visual .page-hero-img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(45, 42, 62, 0.12);
}

.page-hero-visual .page-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Wave divider after page hero */
.page-hero + .wave-divider {
  margin-top: -1px;
}

/* ============================================
   TRUST BAR (homepage)
   ============================================ */

.trust-bar {
  background: white;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  padding: 1.2rem 2rem;
}

.trust-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
}

.trust-item .trust-icon {
  font-size: 1.2rem;
}

.trust-separator {
  width: 4px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 50%;
}

/* ============================================
   HOW IT WORKS (homepage — mint bg, orange steps, dashed connectors)
   ============================================ */

.how-it-works {
  padding: 5rem 2rem;
  text-align: center;
}

.steps-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 1.5rem;
}

.step:hover .step-number {
  transform: scale(1.15);
}

.step-connector {
  position: absolute;
  top: 32px;
  left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 0;
  border-top: 3px dashed var(--dp-purple-light);
  z-index: 1;
}

.step:last-child .step-connector {
  display: none;
}

.step h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dp-text);
  margin-bottom: 0.4rem;
}

.step p {
  font-family: 'Nunito', sans-serif;
  color: var(--dp-text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 220px;
}

/* ============================================
   TESTIMONIAL CAROUSEL (homepage)
   ============================================ */

.testimonial-carousel {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  min-height: 180px;
}

.testimonial-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.testimonial-slide.active {
  opacity: 1;
}

.testimonial-slide .stars {
  color: var(--accent-rose);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
}

.testimonial-slide blockquote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--dp-text);
  line-height: 1.55;
  margin: 0 0 1.2rem;
  padding: 0;
  border: none;
}

.testimonial-slide .author {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--dp-text-light);
  letter-spacing: 0.03em;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.testimonial-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-200);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.testimonial-dot.active {
  background: var(--dp-purple);
}

/* ============================================
   STICKY MOBILE CTA (homepage)
   ============================================ */

.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: white;
  padding: 0.8rem 1.2rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  border-top: 1px solid var(--gray-100);
}

.sticky-mobile-cta a {
  display: block;
  background: var(--dp-orange);
  color: white;
  text-align: center;
  padding: 0.9rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sticky-mobile-cta a:hover {
  background: var(--dp-orange-hover);
  color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Homepage-specific responsive */
@media (max-width: 900px) {
  .product-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0 1.5rem;
    scrollbar-width: none;
    gap: 1.5rem;
  }

  .product-grid::-webkit-scrollbar {
    display: none;
  }

  .product-card {
    flex: 0 0 85vw;
    max-width: 360px;
    scroll-snap-align: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .steps-container {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .step-connector {
    display: none;
  }

  .step {
    flex-direction: column;
    padding: 0;
  }

  .step::after {
    content: '';
    width: 0;
    height: 30px;
    border-left: 3px dashed var(--dp-purple-light);
    position: absolute;
    bottom: -28px;
    left: 50%;
  }

  .step:last-child::after {
    display: none;
  }

  .section,
  section.section,
  .how-it-works,
  .showcase-section {
    padding: 3.5rem 1.2rem;
  }
}

@media (max-width: 768px) {
  /* Page hero responsive */
  .page-hero .container {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.5rem 1.5rem;
    text-align: center;
  }

  .page-hero p {
    max-width: 100%;
    margin: 0 auto;
  }

  .page-hero-visual {
    order: -1;
    margin-bottom: 0.5rem;
  }

  .page-hero-visual .page-hero-img {
    max-width: 280px;
    margin: 0 auto;
  }

  /* Hero responsive */
  .hero .container {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    margin-bottom: 1rem;
  }

  .hero-visual .hero-image-wrapper {
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-visual .hero-float-badge {
    display: none;
  }

  /* Trust bar responsive */
  .trust-bar .container {
    gap: 1rem;
  }

  .trust-separator {
    display: none;
  }

  .trust-item {
    font-size: 0.8rem;
  }

  /* Show sticky mobile CTA */
  .sticky-mobile-cta {
    display: block;
  }

  .testimonial-slide blockquote {
    font-size: 1.1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem;
  }

  .hero h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 0.95rem;
  }

  .product-card {
    flex: 0 0 90vw;
  }
}

/* General responsive */
@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    box-shadow: var(--shadow);
  }

  .navbar .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 4rem 1.5rem 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .reader-content img {
    max-height: 55vh;
  }

  .reader-text {
    font-size: 0.95rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 2rem 1rem 4rem;
  }

  .progress-bar {
    gap: 0.25rem;
  }

  .progress-step .step-label {
    font-size: 0.7rem;
  }

  .btn-selector {
    gap: 0.5rem;
  }

  .btn-option {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .img-option {
    max-width: 150px;
    flex: 1 1 120px;
  }

  .img-selector.grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .img-selector.grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-selector.style-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .age-group-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .stories-row {
    grid-template-columns: 1fr;
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .order-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .order-thumb {
    margin: 0 auto;
  }

  .order-actions {
    align-items: center;
  }

  .form-nav {
    flex-direction: column;
  }

  .form-nav .btn {
    width: 100%;
  }

  .success-card {
    padding: 3rem 1.5rem;
  }

  .dashboard-header {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .reader-prev,
  .reader-next {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .reader-content img {
    max-height: 50vh;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .age-group-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .age-group-btn {
    padding: 1rem 0.75rem;
    min-height: 75px;
  }

  .section {
    padding: 3rem 1rem;
  }

  .bible-story-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   BIBLE STORY PICKER (Orthodox Custom Form)
   ============================================ */

.bible-story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto 1.5rem;
}

.bible-story-card {
  border: 3px solid var(--purple-light);
  border-radius: var(--radius);
  background: white;
  padding: 1.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.bible-story-card:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.bible-story-card.selected {
  background: linear-gradient(135deg, var(--yellow), var(--purple-light));
  border-color: var(--purple-dark);
  box-shadow: 0 4px 12px rgba(184, 169, 232, 0.3);
}

.bible-story-card .bible-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.bible-story-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--dp-text);
}

.bible-story-card .bible-ref {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.bible-story-card .moral-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: var(--purple-light);
  color: var(--purple-dark);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-top: 0.4rem;
}

.bible-story-card.selected h4 {
  color: var(--dp-text);
}

.custom-topic-card {
  grid-column: 1 / -1;
  border-style: dashed;
  border-color: var(--text-muted);
  padding: 1.5rem;
}

.custom-topic-card.selected {
  border-style: solid;
  border-color: var(--purple-dark);
  background: linear-gradient(135deg, var(--yellow-light), var(--purple-light));
}

.custom-topic-card .bible-icon {
  font-size: 1.8rem;
}

.custom-topic-input {
  display: none;
  margin-top: 0.75rem;
}

.custom-topic-card.selected .custom-topic-input {
  display: block;
}

.custom-topic-input textarea {
  width: 100%;
  border: 2px solid var(--purple-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--dp-text);
  resize: vertical;
  min-height: 60px;
  max-height: 120px;
}

.custom-topic-input textarea:focus {
  outline: none;
  border-color: var(--purple);
}

.orthodox-cta-banner {
  background: linear-gradient(135deg, var(--yellow-light), var(--purple-light));
  border: 2px solid var(--purple-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.orthodox-cta-banner h3 {
  font-size: 1.15rem;
  color: var(--dp-text);
  margin-bottom: 0.5rem;
}

.orthodox-cta-banner p {
  font-size: 0.9rem;
  color: var(--dp-text-light);
  margin-bottom: 1rem;
}

.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.product-card-actions .btn {
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .bible-story-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
