/* ==========================================================================
   ColorBook Spain (colorbook.es) - Master Stylesheet (style.css v1.0)
   Designed for Spain (LTR, es-ES) • Editorial Warm Paper Tone
   Typography: Fredoka (Headings) + Nunito (Body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  /* Brand Color Tokens */
  --sky-blue: #0EA5E9;
  --sky-dark: #0284C7;
  --sky-light: #E0F2FE;
  --sun-yellow: #FACC15;
  --sun-dark: #EAB308;
  --coral-terracotta: #E05A47;
  --coral-dark: #C54432;
  --coral-light: #FEE2E2;
  --leaf-green: #22C55E;
  --leaf-dark: #16A34A;
  --leaf-light: #DCFCE7;
  --lavender: #A855F7;
  --lavender-light: #F3E8FF;

  /* Surfaces & Neutrals */
  --paper-ground: #FFFDF9;
  --paper-surface: #FFFFFF;
  --paper-subtle: #F8FAFC;
  --border-light: #E2E8F0;
  --border-card: #E5E7EB;

  /* Ink & Typography */
  --ink-slate: #0F172A;
  --ink-soft: #1E293B;
  --slate-muted: #64748B;
  --slate-faint: #94A3B8;

  /* Fonts */
  --font-heading: 'Fredoka', cursive, system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;

  /* Layout & Elevations */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.1);
  --shadow-hover: 0 12px 28px rgba(14, 165, 233, 0.18);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background-color: var(--paper-ground);
  line-height: 1.6;
  direction: ltr;
  text-align: left;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-drawer-locked {
  overflow: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Header Component Styles
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(226, 232, 240, 0.8);
}

.header-top-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--sky-blue) 0%, var(--sun-yellow) 40%, var(--coral-terracotta) 80%, var(--leaf-green) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark-wrap {
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(58, 171, 231, 0.28);
}

.logo-link:hover .logo-mark-wrap {
  transform: rotate(-3deg) scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name-row {
  line-height: 1;
}

.logo-brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-color {
  color: var(--sky-blue);
}

.logo-book {
  color: var(--ink-slate);
}

.logo-domain {
  color: var(--coral-terracotta);
  font-size: 1.4rem;
}

.logo-tagline {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-muted);
  margin-top: 3px;
  letter-spacing: -0.01em;
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--sky-blue);
  background-color: var(--sky-light);
}

.nav-link.active {
  color: var(--sky-blue);
  background-color: var(--sky-light);
}

.nav-live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--leaf-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.nav-dropdown-btn:hover,
.nav-dropdown.open .nav-dropdown-btn {
  color: var(--sky-blue);
  background-color: var(--sky-light);
}

.nav-dropdown-chevron {
  transition: transform 0.25s ease;
  display: flex;
  align-items: center;
}

.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 640px;
  max-width: 90vw;
  background-color: var(--paper-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  overflow: hidden;
  z-index: 1050;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background-color: var(--paper-subtle);
  border-bottom: 1px solid var(--border-light);
}

.dropdown-header-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-slate);
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 14px 18px;
}

.dropdown-card-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.dropdown-card-item:hover {
  background-color: var(--sky-light);
  transform: translateX(3px);
}

.dropdown-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--sky-light);
  color: var(--sky-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: var(--transition);
}

.dropdown-card-item:hover .dropdown-card-icon {
  background-color: var(--sky-blue);
  color: #FFFFFF;
}

.dropdown-card-content {
  display: flex;
  flex-direction: column;
}

.dropdown-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-card-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink-slate);
}

.dropdown-card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--slate-muted);
  background-color: var(--border-light);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.dropdown-card-sub {
  font-size: 0.72rem;
  color: var(--slate-muted);
  line-height: 1.3;
}

.dropdown-footer-bar {
  padding: 12px 20px;
  background-color: var(--paper-subtle);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.dropdown-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--sky-dark);
}

.dropdown-footer-link:hover {
  color: var(--sky-blue);
  text-decoration: underline;
}

/* Botón de Acción Limpio (Descargar Gratis) */
.nav-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
  color: #FFFFFF;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 800;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  margin-left: 6px;
}

.nav-btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
  color: #FFFFFF;
}

/* Mobile Toggle & Drawer */
.mobile-toggle-btn {
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--ink-slate);
}

.hamburger-box {
  width: 24px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-inner,
.hamburger-box::before,
.hamburger-box::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--ink-slate);
  border-radius: 2px;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background-color: var(--paper-surface);
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sky-blue);
}

.drawer-close-btn {
  color: var(--slate-muted);
  padding: 6px;
}

.mobile-drawer-links {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1rem;
}

.mobile-link:hover,
.mobile-link.active {
  background-color: var(--sky-light);
  color: var(--sky-blue);
}

.mobile-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 12px 0;
}

.mobile-section-heading {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--slate-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.mobile-subgrid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-subitem {
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
}

.mobile-subitem:hover {
  background-color: var(--sky-light);
  color: var(--sky-blue);
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Footer Component Styles
   ========================================================================== */
.site-footer {
  background-color: var(--paper-surface);
  border-top: 1px solid var(--border-light);
  margin-top: 60px;
}

.footer-top-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--leaf-green) 0%, var(--sky-blue) 40%, var(--lavender) 80%, var(--sun-yellow) 100%);
}

.footer-main {
  padding: 60px 20px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col--brand {
  padding-right: 20px;
}

.footer-logo-link {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 14px;
}

.footer-logo-mark-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-logo-link:hover .footer-logo-mark-wrap {
  transform: rotate(-3deg) scale(1.06);
}

.footer-logo-mark {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(58, 171, 231, 0.25);
  display: block;
}

.footer-brand-desc {
  font-size: 0.92rem;
  color: var(--slate-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--paper-subtle);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-slate);
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-muted);
}

.footer-links-list a:hover {
  color: var(--sky-blue);
  transform: translateX(4px);
}

.footer-contact-box {
  margin-top: 20px;
  padding: 14px 16px;
  background-color: var(--paper-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-muted);
  margin-bottom: 2px;
}

.contact-email-link {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--sky-dark);
  display: block;
  margin-bottom: 4px;
}

.contact-email-link:hover {
  color: var(--sky-blue);
  text-decoration: underline;
}

.contact-hours {
  display: block;
  font-size: 0.74rem;
  color: var(--slate-muted);
}

/* Redes Sociales en Footer */
.footer-social-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.social-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--slate-muted);
}

.social-links-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--paper-subtle);
  border: 1px solid var(--border-light);
  color: var(--slate-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social-btn:hover {
  background-color: var(--sky-blue);
  color: #FFFFFF;
  border-color: var(--sky-blue);
  transform: translateY(-2px);
}

/* Enlace/Botón de Configuración de Cookies */
.cookie-settings-trigger {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-muted);
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.cookie-settings-trigger:hover {
  color: var(--sky-blue);
  text-decoration: underline;
}

/* Tira de Pagos Seguros */
.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--slate-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
}

/* Botón Flotante Volver Arriba */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--sky-blue);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background-color: var(--sky-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

/* ==========================================================================
   Global Button & Badge Styles
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: #FFFFFF;
}

.btn--cta {
  background: linear-gradient(135deg, var(--sun-yellow), var(--sun-dark));
  color: var(--ink-slate);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.45);
}

.btn--cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(250, 204, 21, 0.55);
}

.btn--secondary {
  background-color: var(--paper-surface);
  color: var(--ink-soft);
  border: 1px solid var(--border-card);
}

.btn--secondary:hover {
  background-color: var(--paper-subtle);
  border-color: var(--sky-blue);
  color: var(--sky-blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge--green { background-color: var(--leaf-light); color: var(--leaf-dark); }
.badge--sky { background-color: var(--sky-light); color: var(--sky-dark); }
.badge--coral { background-color: var(--coral-light); color: var(--coral-dark); }
.badge--yellow { background-color: #FEF9C3; color: #854D0E; }
.badge--lavender { background-color: var(--lavender-light); color: #7E22CE; }

/* ==========================================================================
   Section Headings & Pedagogical Content Components
   ========================================================================== */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-blue);
  background-color: var(--sky-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink-slate);
  margin-bottom: 12px;
  line-height: 1.25;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--slate-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Interactive Accordion & FAQ System
   ========================================================================== */
.faq-section {
  padding: 70px 0;
  background-color: var(--paper-ground);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background-color: var(--paper-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.faq-item:hover {
  border-color: var(--sky-blue);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08);
}

.faq-item.open {
  border-color: var(--sky-blue);
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.12);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink-slate);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  gap: 16px;
  transition: color 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.faq-question:hover {
  color: var(--sky-blue);
}

.faq-item.open .faq-question {
  color: var(--sky-dark);
}

.faq-chevron {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--paper-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-muted);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.faq-chevron svg {
  display: block;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  background-color: var(--sky-light);
  color: var(--sky-dark);
  border-color: var(--sky-blue);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 22px;
}

.faq-answer p {
  font-size: 0.96rem;
  color: var(--slate-muted);
  line-height: 1.65;
}

.faq-answer p + p {
  margin-top: 10px;
}

.faq-answer a {
  color: var(--sky-blue);
  text-decoration: underline;
  font-weight: 700;
}

.faq-answer a:hover {
  color: var(--sky-dark);
}

/* ==========================================================================
   Email Download Modal
   ========================================================================== */
.email-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.email-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.email-modal-container {
  background-color: var(--paper-surface);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  position: relative;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-modal-backdrop.open .email-modal-container {
  transform: scale(1);
}

.email-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px;
  color: var(--slate-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.email-modal-close:hover {
  background-color: var(--paper-subtle);
  color: var(--ink-slate);
}

.email-modal-badge {
  display: inline-block;
  margin-bottom: 12px;
}

.email-modal-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink-slate);
  margin-bottom: 10px;
}

.email-modal-subtitle {
  font-size: 0.92rem;
  color: var(--slate-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.email-input-group {
  position: relative;
  margin-bottom: 14px;
}

.email-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-muted);
}

.email-modal-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.email-modal-input:focus {
  outline: none;
  border-color: var(--sky-blue);
  box-shadow: 0 0 0 4px var(--sky-light);
}

.gdpr-consent-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  margin-bottom: 18px;
  font-size: 0.78rem;
  color: var(--slate-muted);
}

.gdpr-consent-group input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--sky-blue);
}

.email-modal-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
  color: #FFFFFF;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.email-modal-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.modal-alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.modal-alert-box.success {
  background-color: var(--leaf-light);
  color: var(--leaf-dark);
}
.modal-alert-box.error {
  background-color: var(--coral-light);
  color: var(--coral-dark);
}

.email-modal-trust {
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--slate-muted);
}

/* ==========================================================================
   AEPD-Compliant Cookie Banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 680px;
  margin: 0 auto;
  background-color: var(--paper-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
}

.cookie-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-banner-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-slate);
}

.cookie-banner-desc {
  font-size: 0.85rem;
  color: var(--slate-muted);
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.cookie-btn--accept {
  background-color: var(--sky-blue);
  color: #FFFFFF;
}

.cookie-btn--reject {
  background-color: var(--paper-subtle);
  color: var(--slate-muted);
  border: 1px solid var(--border-light);
}

/* ==========================================================================
   Print Optimization Engine (@media print)
   ========================================================================== */
@media print {
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-hidden,
  .site-header,
  .site-footer,
  .mobile-drawer,
  .mobile-backdrop,
  .cookie-banner,
  .email-modal-backdrop,
  .back-to-top-btn,
  .adsbygoogle {
    display: none !important;
    visibility: hidden !important;
  }

  .print-sheet,
  #printArea {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    page-break-after: always;
  }

  .print-sheet img,
  #printArea img,
  #printArea canvas {
    max-width: 100% !important;
    height: auto !important;
    filter: contrast(150%) grayscale(100%);
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar (Thumb-Friendly App Experience)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 1500;
  }

  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--slate-muted);
    font-size: 0.72rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: var(--transition);
  }

  .mobile-bottom-item svg {
    color: var(--slate-muted);
    transition: var(--transition);
  }

  .mobile-bottom-item:active,
  .mobile-bottom-item.active {
    color: var(--sky-blue);
  }

  .mobile-bottom-item:active svg,
  .mobile-bottom-item.active svg {
    color: var(--sky-blue);
    transform: scale(1.1);
  }

  /* Centro destacado para Colorear Online */
  .mobile-bottom-item--highlight .mobile-bottom-icon-bubble {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -10px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    transition: transform 0.2s ease;
  }

  .mobile-bottom-item--highlight .mobile-bottom-icon-bubble svg {
    color: #FFFFFF !important;
  }

  .mobile-bottom-item--highlight:active .mobile-bottom-icon-bubble {
    transform: scale(0.92);
  }

  /* Elevar botón volver arriba para no chocar con la barra inferior */
  .back-to-top-btn {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 42px;
    height: 42px;
  }

  /* Banner de cookies adaptado a móvil */
  .cookie-banner {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    padding: 16px 18px;
  }

  .cookie-banner-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .cookie-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }

  .mobile-toggle-btn {
    display: block;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner {
    height: 64px;
  }

  .logo-brand {
    font-size: 1.4rem;
  }

  .logo-tagline {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Modal de correo a pantalla completa / móvil amigable */
  .email-modal-container {
    padding: 24px 18px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .email-modal-title {
    font-size: 1.25rem;
  }

  .email-modal-subtitle {
    font-size: 0.88rem;
    margin-bottom: 16px;
  }

  .email-modal-submit-btn {
    min-height: 48px;
    font-size: 0.95rem;
  }

  /* Responsive Section Head & FAQ Accordion */
  .section-head {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 1.65rem;
    line-height: 1.3;
  }

  .section-sub {
    font-size: 0.95rem;
  }

  .faq-question {
    padding: 16px 18px;
    font-size: 1rem;
    gap: 12px;
  }

  .faq-chevron {
    width: 30px;
    height: 30px;
  }

  .faq-answer {
    padding: 0 18px;
  }

  .faq-item.open .faq-answer {
    padding-bottom: 18px;
  }
}

/* ==========================================================================
   Banner Global de Conexión: Estudio de Colorear Online / Tablet
   ========================================================================== */
.library-studio-cta {
  padding: 60px 0;
  background-color: var(--paper-surface);
  border-top: 1px solid var(--border-light);
}

.library-studio-card {
  background: linear-gradient(135deg, #0284C7 0%, #0EA5E9 60%, #38BDF8 100%);
  border-radius: var(--radius-lg);
  padding: 44px;
  color: #FFFFFF;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 36px;
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.25);
  position: relative;
  overflow: hidden;
}

.library-studio-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.library-studio-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin-bottom: 22px;
}

.library-studio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  color: var(--sky-dark);
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  text-decoration: none;
}

.library-studio-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: var(--sky-blue);
}

.library-studio-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 1024px) {
  .library-studio-card {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    text-align: center;
  }

  .library-studio-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .library-studio-btn {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .library-studio-title {
    font-size: 1.7rem;
  }

  .library-studio-card {
    padding: 28px 18px;
  }
}

/* ==========================================================================
   Módulo SEO: Colecciones Educativas Relacionadas (.related-collections-section)
   ========================================================================== */
.related-collections-section {
  padding: 64px 0 84px;
  background-color: var(--paper-ground);
  border-top: 1px solid var(--border-light);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-surface);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--ink-slate);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--sky-blue);
  box-shadow: var(--shadow-hover);
}

.related-card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.related-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky-light);
  color: var(--sky-dark);
}

.related-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-slate);
  margin-bottom: 8px;
  line-height: 1.3;
}

.related-card-desc {
  font-size: 0.92rem;
  color: var(--slate-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

.related-card-link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sky-blue);
  margin-top: auto;
}

.related-card:hover .related-card-link-cta {
  color: var(--sky-dark);
}

.related-card:hover .related-card-link-cta svg {
  transform: translateX(4px);
}

.related-card-link-cta svg {
  transition: transform 0.2s ease;
}


