/* ═══════════════════════════════════════════════════════════════════
   styles.css — Sara Pino · Literary salon aesthetic
   Instrument Serif + Inter + JetBrains Mono
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }

/* ── Design tokens: Light (default) ─────────────────────────────── */
:root {
  --max-width: 1200px;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #5a6578;
  --accent: #2b6cb0;
  --sage: #4a7a96;
  --border: rgba(17,24,39,.10);
  --border-focus: rgba(43,108,176,.50);
  --shadow-sm: 0 1px 3px rgba(17,24,39,.06);
  --shadow-md: 0 8px 30px rgba(17,24,39,.08);
  --shadow-lg: 0 20px 50px rgba(17,24,39,.10);
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(.22,1,.36,1);
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* ── Design tokens: Dark ────────────────────────────────────────── */
[data-theme="light"] { color-scheme: light; }
[data-theme]:not([data-theme="light"]) {
  --bg: #0f172a;
  --surface: #1e293b;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --sage: #7dd3fc;
  --border: rgba(241,245,249,.10);
  --border-focus: rgba(56,189,248,.50);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.15);
  --shadow-md: 0 8px 30px rgba(0,0,0,.20);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.28);
}

/* ── Base ───────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

em {
  font-style: italic;
  color: var(--accent);
}

.label {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: .75rem;
}

.meta {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: .5rem;
}

/* ── Accessibility ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Header ─────────────────────────────────────────────────────── */
header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 60px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background .3s var(--ease);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -.03em;
  white-space: nowrap;
  position: relative;
  z-index: 101;
}

.desktop-nav { display: none; }
.desktop-nav a {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  position: relative;
  transition: color .25s var(--ease);
}
.desktop-nav a:hover,
.desktop-nav a.active { color: var(--ink); }
.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .3s var(--ease);
}
.desktop-nav a:hover::after,
.desktop-nav a.active::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 101;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.email-link {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .02em;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background .2s, color .2s;
}
.email-link:hover {
  background: var(--ink);
  color: var(--bg);
}

.menu-btn {
  display: flex;
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
}
.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s, opacity .3s;
}
.menu-btn.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  background: var(--surface);
  z-index: 90; /* behind header (100) so the animated hamburger X is visible */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.mobile-drawer.active { 
  opacity: 1; 
  visibility: visible; 
}
.mobile-nav { 
  display: flex; 
  flex-direction: column; 
  gap: 25px; 
  text-align: center;
  width: 100%;
}
.mobile-nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.3s;
}
.mobile-nav-link:hover { 
  color: #9a0026; 
}
.drawer-buy-btn {
  background: #9a0026;
  color: #ffffff;
  padding: 12px 32px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 20px;
  display: inline-block;
  align-self: center;
  transition: background 0.3s, transform 0.3s;
}
.drawer-buy-btn:hover {
  background: #7a001e;
  transform: scale(1.05);
}

/* ── Main ───────────────────────────────────────────────────────── */
main { padding-top: 64px; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
  align-items: center;
  padding: clamp(40px, 8vw, 100px) clamp(20px, 5vw, 60px);
  gap: clamp(40px, 6vw, 100px);
  overflow: hidden;
}

.hero-content { z-index: 1; }

.hero-name {
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: .92;
  margin: 1rem 0 1.5rem;
  letter-spacing: -.04em;
}
.hero-name em {
  display: block;
  font-size: 1.15em;
}

.hero-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 500px;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent);
}
.stat span {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  transition: background .25s, transform .25s, box-shadow .25s;
  box-shadow: 0 4px 16px rgba(196,85,58,.25);
}
.btn-primary:hover {
  background: #a8432d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,85,58,.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s, color .25s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-portrait {
  position: relative;
  display: flex;
  justify-content: flex-start;
  order: -1;
}
.hero-portrait img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ── Sobre mí ───────────────────────────────────────────────────── */
.about-section {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about-quote-box {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-width: 280px;
  box-shadow: var(--shadow-md);
}
.about-quote-box p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
}

.about-content h2 { margin-bottom: 1.25rem; }
.about-content h2 em { color: var(--accent); }

.about-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.about-text {
  font-size: .98rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 2rem;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pillar-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.pillar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pillar-info strong {
  font-size: .95rem;
  color: var(--ink);
}
.pillar-info span {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Section shared ─────────────────────────────────────────────── */
.section-header {
  max-width: 600px;
  margin-bottom: 3.5rem;
}

.section-header h2 { margin-bottom: 1rem; }
.section-header h2 em { font-style: italic; }

.section-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
}

/* ── Booktrailers ───────────────────────────────────────────────── */
.trailers {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trailers .section-header { text-align: center; max-width: 100%; margin-left: auto; margin-right: auto; }
.trailers .section-sub { margin-left: auto; margin-right: auto; }

.carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.trailer-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: auto;
  padding: 24px 56px;
  width: 100%;
  scrollbar-width: none;
}
.trailer-carousel::-webkit-scrollbar { display: none; }

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease), background .25s;
}
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.carousel-nav:hover { transform: translateY(-50%) scale(1.08); }

/* Film card (carousel) */
.film-card {
  flex: 0 0 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow .3s, border-color .3s;
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;
}
.film-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.film-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(196,85,58,.15);
}

.film-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.film-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.film-card:hover .film-img { transform: scale(1.06); }

.film-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.50) 100%);
  pointer-events: none;
}

.film-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  z-index: 2;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(196,85,58,.40);
  transition: transform .3s var(--ease), box-shadow .3s;
  z-index: 3;
}
.play-icon { font-size: 1rem; margin-left: 2px; }
.film-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 24px rgba(196,85,58,.50);
}

.film-details { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.film-genre {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage);
}
.film-details h3 { font-size: 1.2rem; color: var(--ink); line-height: 1.2; }
.film-details p { font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.modal.active { opacity: 1; pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.70);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  width: 92%;
  max-width: 800px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.50);
  z-index: 1;
  transform: scale(.94);
  transition: transform .4s var(--ease);
}
.modal.active .modal-box { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.modal-head { margin-bottom: 16px; }
.modal-head h4 { margin-top: 4px; color: var(--ink); }

.video-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}
.video-icon { font-size: 2.5rem; }

/* ── Catalogue (Libros) ─────────────────────────────────────────── */
.catalogue {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
}

.catalogue-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}
.catalogue-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.6;
}

/* Featured Book Hero Spot */
.book-featured {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 5vw, 50px);
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.featured-cover-container {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.featured-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--border-focus) 0%, transparent 70%);
  opacity: .3;
  pointer-events: none;
}

.featured-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.book-featured:hover .featured-cover {
  transform: scale(1.03);
}

.featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  background: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
}

.featured-details {
  display: flex;
  flex-direction: column;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--sage);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.featured-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.featured-title em { color: var(--accent); }

.featured-synopsis {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 2rem;
}

.featured-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .92rem;
  color: var(--ink);
}
.highlight-num {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent);
  font-weight: 600;
}

/* Secondary Books Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.book-card-v2 {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.book-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.card-v2-cover {
  position: relative;
  aspect-ratio: 2/3;
}
.card-v2-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-v2-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: .56rem;
  color: var(--ink);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.card-v2-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.card-v2-body h3 {
  font-size: 1.35rem;
  margin: 0.4rem 0 0.8rem;
}
.card-v2-body h3 em { color: var(--accent); }
.card-v2-desc {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s var(--ease);
}
.link-arrow span { transition: transform .25s var(--ease); display: inline-block; }
.link-arrow:hover { gap: 10px; }
.link-arrow:hover span { transform: translateX(3px); }

/* ── Agenda & Eventos ───────────────────────────────────────────── */
.agenda-section {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
}

.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.agenda-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.6;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.event-card {
  display: grid;
  grid-template-columns: 90px 1fr 200px;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.event-card.event-past {
  opacity: .55;
  filter: grayscale(80%);
}
.event-card.event-past .event-date .day {
  color: var(--muted);
}
.event-card.event-past .badge-type {
  background: rgba(120, 120, 120, 0.12);
  color: var(--muted);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.event-date .day {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent);
}
.event-date .month {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  color: var(--ink);
  font-weight: 600;
  margin-top: 2px;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .84rem;
}

.badge-type {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(43,108,176,.10);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.event-meta .location {
  color: var(--muted);
}

.event-title {
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--ink);
}
.event-title em { color: var(--accent); }

.event-desc {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.5;
}

.event-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.event-time {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--ink);
  font-weight: 500;
}
.free-entry {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sage);
}

/* ── Reseñas & Lectores ─────────────────────────────────────────── */
.reviews-section {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.rating-badge-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  background: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.rating-badge-summary .score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1;
}
.rating-badge-summary .stars {
  color: #f59e0b;
  font-size: .9rem;
  letter-spacing: 2px;
}
.rating-badge-summary .count {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--muted);
  text-transform: uppercase;
}

.reviews-slider-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

.reviews-carousel {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 12px 4px 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.reviews-carousel::-webkit-scrollbar { display: none; }

.reviews-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.6rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.reviews-nav.prev { left: -16px; }
.reviews-nav.next { right: -16px; }
.reviews-nav:hover {
  transform: translateY(-50%) scale(1.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.reviews-dots-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 1.25rem;
}

.reviews-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: rgba(120, 120, 120, 0.06);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.reviews-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--muted);
  opacity: 0.35;
  cursor: pointer;
  transition: width .35s var(--ease), background-color .35s, opacity .35s;
}
.reviews-dot:hover {
  opacity: 0.75;
}
.reviews-dot.active {
  width: 28px;
  background: var(--accent);
  opacity: 1;
  border-radius: 6px;
}

.reviews-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.review-card {
  flex: 0 0 calc(33.333% - 1.2rem);
  min-width: 280px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  animation: fadeIn .4s var(--ease);
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}
.featured-review {
  border-color: var(--border-focus);
  background: linear-gradient(180deg, var(--bg) 0%, rgba(43,108,176,.04) 100%);
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.review-stars {
  color: #f59e0b;
  font-size: .85rem;
  letter-spacing: 2px;
}
.review-source {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sage);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.review-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 1.75rem;
  flex: 1;
}

.review-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.review-author strong {
  font-size: .95rem;
  color: var(--ink);
}
.review-author span {
  font-size: .8rem;
  color: var(--muted);
}
.review-author span em { color: var(--accent); }

/* ── Social Feed Sections (Instagram & Threads) ──────────────────── */
.social-section {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  display: grid;
  grid-template-columns: 320px 1fr; /* Default to 2 columns for Instagram */
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.twitter-section {
  grid-template-columns: 1fr; /* Twitter forced to 1 column on desktop */
  max-width: 90%;
  margin: auto;
}
.threads-section {
  border-top: 1px solid var(--border);
}

.social-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.social-header h2 { margin-bottom: 1rem; }
.social-header h2 em { color: var(--accent); }

.social-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 600px;
}

.social-feed-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.social-embed-frame {
  width: 100%;
  max-width: 540px;
  height: 520px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.threads-feed-card {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.threads-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.threads-profile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.threads-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.threads-profile-text {
  display: flex;
  flex-direction: column;
}

.threads-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: var(--ink);
}

.threads-verified {
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: bold;
}

.threads-handle {
  font-size: 0.82rem;
  color: var(--muted);
}

.threads-app-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--accent);
  border: 1px solid var(--border);
  font-weight: 500;
}

.threads-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.threads-post-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border);
}
.threads-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.threads-post-text {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.threads-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.threads-post-stats {
  display: flex;
  gap: 14px;
}

.threads-feed-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.btn-outline.full-width {
  width: 100%;
  text-align: center;
}

/* ── X / Twitter Feed Section ───────────────────────────────────── */
.twitter-section,
.facebook-section {
  border-top: 1px solid var(--border);
}

.twitter-feed-card {
  width: 100%;
  max-width: 90%;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.twitter-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.twitter-profile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.twitter-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
}

.twitter-profile-text {
  display: flex;
  flex-direction: column;
}

.twitter-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: var(--ink);
}

.twitter-badge-icon {
  font-weight: bold;
  font-size: 0.85rem;
  color: var(--ink);
}

.twitter-handle {
  font-size: 0.82rem;
  color: var(--muted);
}

.twitter-app-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
  border: 1px solid var(--border);
  font-weight: 500;
}

.twitter-tweets-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.twitter-tweet-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border);
}
.twitter-tweet-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.twitter-tweet-header-meta {
  margin-bottom: 0.5rem;
}

.twitter-tweet-text {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0.75rem;
  white-space: pre-line;
}

.twitter-tweet-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.twitter-tweet-link:hover {
  opacity: 0.85;
}

.tweet-inner-link,
.twitter-time-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease, text-decoration 0.2s ease;
}

.tweet-highlight {
  color: var(--accent);
  font-weight: 500;
  cursor: text;
}

.tweet-inner-link:hover,
.twitter-time-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.twitter-tweet-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.twitter-tweet-stats {
  display: flex;
  gap: 14px;
}

.twitter-feed-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ── Preguntas Frecuentes (FAQ) ─────────────────────────────────── */
.faq-section {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  width: 100%;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.faq-item[open] {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }

.faq-icon {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform .3s var(--ease);
}
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.75rem 1.5rem;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid transparent;
}
.faq-item[open] .faq-answer {
  border-top-color: var(--border);
  padding-top: 1rem;
  animation: fadeIn .3s var(--ease);
}
.faq-answer em { color: var(--accent); font-style: italic; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.gallery-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.gallery-item:hover .gallery-img-wrap img { transform: scale(1.06); }

.gallery-info { padding: 1.25rem 1.5rem 1.5rem; }
.gallery-info h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: .4rem;
  color: var(--ink);
}
.gallery-info p {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Journal (Diario) ───────────────────────────────────────────── */
.journal {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
  padding-left: 2rem; /* reset la herencia del estilo anterior */
}

/* Miniatura de imagen — reemplaza el bloque de fecha */
.post-thumb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}
.post-card:hover .post-thumb img {
  transform: scale(1.06);
}
.post-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-thumb-placeholder span {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
}

/* Contenido central */
.post-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .84rem;
}

.post-category {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(43,108,176,.10);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.post-card h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

.post-excerpt {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Acción derecha */
.post-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.post-footer .arrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
  font-weight: 600;
  transition: transform .25s;
}
.post-card:hover .post-footer .arrow { transform: translateX(5px); }
.post-footer .read-label {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}

.load-more-wrap { margin-top: 2rem; text-align: center; }
.load-more { cursor: pointer; background: transparent; }
.load-more span { transition: transform .25s; display: inline-block; }
.load-more:hover span { transform: rotate(90deg); }

/* ── Contact ────────────────────────────────────────────────────── */
.contact {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  background: transparent;
  border-top: 1px solid var(--border);
}

.contact-header {
  margin-bottom: 3.5rem;
}
.contact-header h2 { margin-bottom: 0.8rem; }
.contact-header h2 em { color: var(--accent); }

.contact-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: start;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.channel-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
  color: var(--ink);
}
a.channel-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.channel-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(43,108,176,.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.channel-label {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sage);
}
.channel-info strong {
  font-size: 1rem;
  color: var(--ink);
}
.channel-info p {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.5;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-md);
}

.contact-card-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  color: var(--ink);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .92rem;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
}

/* ── Book Preview Modal (Reading Excerpt) ───────────────────────── */
.book-fragment-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 23, 42, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.book-fragment-modal.active {
  opacity: 1;
  visibility: visible;
}

.book-fragment-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease);
}

.book-fragment-modal.active .book-fragment-dialog {
  transform: translateY(0) scale(1);
}

.book-fragment-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.06);
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.book-fragment-close:hover {
  background: rgba(17, 24, 39, 0.12);
  transform: scale(1.08);
}

.book-fragment-sidebar {
  width: 290px;
  background: var(--bg);
  padding: 36px 24px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  overflow-y: auto;
}

.book-fragment-cover-img {
  width: 160px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  margin-bottom: 24px;
}

.book-fragment-meta-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: #9a0026;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  align-self: flex-start;
  width: 100%;
}

.book-fragment-meta-list {
  list-style: none;
  font-size: 0.85rem;
  color: #4b5563;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.book-fragment-meta-list li strong {
  color: #111827;
}

.book-fragment-content {
  flex: 1;
  padding: 44px 48px;
  overflow-y: auto;
  background: #ffffff;
}

.book-fragment-content p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: auto 3;
  hyphenate-limit-lines: 2;
  -webkit-hyphenate-limit-lines: 2;
}

.book-fragment-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 6px;
}

.book-fragment-author {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  margin-bottom: 28px;
}

.book-fragment-body {
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.8;
  color: #374151;
}

.book-fragment-body p {
  margin-bottom: 16px;
  text-indent: 1.5rem;
}

.book-fragment-body p:first-of-type {
  text-indent: 0;
}

.book-fragment-cta {
  margin-top: 32px;
  padding: 20px;
  background: #fff8f8;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.book-fragment-cta-text p:first-child {
  font-size: 0.9rem;
  font-weight: 700;
  color: #9a0026;
}

.book-fragment-cta-text p:last-child {
  font-size: 0.78rem;
  color: #6b7280;
}

.book-fragment-btn {
  background: #9a0026;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  white-space: nowrap;
}

.book-fragment-btn:hover {
  background: #7a001e;
}


/* ── Cover Sample Badge ─────────────────────────────────────────── */
.cover-sample-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-md);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  cursor: pointer;
}

.cover-sample-badge:hover,
.book-cover-container:hover .cover-sample-badge {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px);
}


/* ── Formatos y Ediciones ───────────────────────────────────────── */
.editions-section {
  padding-top: 3rem;
  margin-bottom: 5rem;
  border-top: 1px solid var(--border);
}

.editions-header {
  margin-bottom: 2.5rem;
}

.editions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.edition-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.edition-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.edition-card.featured {
  border-color: var(--accent);
  box-shadow: 0 12px 35px rgba(43, 108, 176, 0.12);
}

.edition-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.edition-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(43, 108, 176, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.edition-title {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.edition-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.edition-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--ink);
  border-top: 1px dashed var(--border);
  padding-top: 18px;
}

.edition-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edition-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.edition-price {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
}


/* ── Video Preview Box (Avoid YouTube Error 153) ───────────────── */
.video-preview-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #0f172a;
  cursor: pointer;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}

.video-preview-box:hover .video-thumb-img {
  transform: scale(1.04);
  opacity: 1;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 44px;
  background: #ff0000;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  transition: transform 0.25s var(--ease), background-color 0.25s;
}

.video-play-btn svg {
  width: 24px;
  height: 24px;
  margin-left: 2px;
}

.video-preview-box:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #cc0000;
}


/* ── Video Modal Overlay (Theatre Popup on same page) ──────────── */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(15, 23, 42, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.video-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16/9;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease);
}

.video-modal-overlay.active .video-modal-container {
  transform: scale(1);
}

.video-modal-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.video-modal-close:hover {
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .book-fragment-dialog {
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
  }
  .book-fragment-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 24px;
  }
  .book-fragment-content {
    padding: 24px;
  }
  .book-fragment-cta {
    flex-direction: column;
    text-align: center;
  }
}
.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-label a { color: var(--accent); text-decoration: underline; }

.submit-btn { width: 100%; justify-content: center; margin-top: 4px; }

.success-msg {
  display: none;
  margin-top: 1.25rem;
  padding: 14px 20px;
  background: rgba(43,108,176,.10);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 500;
  font-size: .92rem;
  text-align: center;
}
.success-msg.visible { display: block; animation: fadeUp .4s var(--ease); }

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

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 60px);
  border-top: 1px solid var(--border);
}
footer p { font-size: .82rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: .82rem;
  color: var(--muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* ── Article modal ──────────────────────────────────────────────── */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.article-modal.active { opacity: 1; pointer-events: auto; }
.article-modal-container {
  position: relative;
  width: 92%;
  max-width: 750px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  transform: scale(.94);
  transition: transform .4s var(--ease);
  color: var(--ink);
}
.article-modal.active .article-modal-container { transform: scale(1); }
.article-modal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.article-category {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage);
  background: rgba(107,143,123,.12);
  padding: 4px 10px;
  border-radius: 6px;
}
.article-date { font-size: .82rem; color: var(--accent); font-weight: 500; }
.article-modal-container h2 { font-size: 1.8rem; line-height: 1.2; margin-bottom: 1.5rem; }
.article-modal-body { font-size: 1rem; line-height: 1.8; color: var(--muted); }
.article-modal-body p,
.article-modal-body div { margin-bottom: 14px; }
.article-modal-body a { color: var(--accent); text-decoration: underline; }

/* ── Responsive: ≤ 900px ────────────────────────────────────────── */
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-btn { display: flex; }
  .email-link { display: none; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: 50px 5% 60px;
    gap: 32px;
  }
  .hero-content { order: 2; }
  .hero-portrait { order: 1; justify-content: center; }
  .hero-portrait img { max-width: 280px; }
  .hero-name { font-size: clamp(3rem, 14vw, 5rem); }
  .hero-bio, .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-ctas { justify-content: center; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .about-image-wrap {
    max-width: 300px;
    margin: 0 auto;
  }
  .about-quote-box {
    position: relative;
    bottom: auto;
    right: auto;
    margin: -30px auto 0;
    max-width: 100%;
  }
  .about-pillars {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .book-featured {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .featured-cover-container {
    max-width: 260px;
    margin: 0 auto;
  }
  .featured-meta, .featured-highlights {
    align-items: center;
    justify-content: center;
  }
  .featured-actions {
    justify-content: center;
    display: flex;
  }
  .agenda-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .event-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: left;
  }
  .event-date {
    width: 80px;
  }
  .event-action {
    align-items: flex-start;
  }
  .post-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .post-thumb {
    width: 100%;
    height: 160px;
  }
  .post-footer {
    align-items: flex-start;
    flex-direction: row;
    gap: 6px;
  }
  .book-grid {
    grid-template-columns: 1fr;
  }
  .book-card-v2 {
    grid-template-columns: 1fr;
  }
  .card-v2-cover {
    max-width: 220px;
    margin: 1.5rem auto 0;
  }

  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .rating-badge-summary {
    align-items: flex-start;
  }
  .review-card {
    flex: 0 0 85vw;
    min-width: 260px;
  }
  .reviews-nav { display: none; }

  .social-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }

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

  .carousel-nav { display: none !important; }
  .trailer-carousel { padding: 16px 0; gap: 0; scroll-snap-type: x mandatory; }
  .film-card {
    flex: 0 0 82vw;
    max-width: 320px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transform: none !important;
    opacity: 1 !important;
    margin: 0 calc((100vw - 82vw) / 2);
  }

  footer { flex-direction: column; gap: 16px; text-align: center; }
}

/* ── Responsive: ≤ 600px ────────────────────────────────────────── */
@media (max-width: 600px) {
  .icon-btn { display: none; }
  .hero-portrait img { max-width: 240px; }
  .hero-stats { gap: 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .contact-card { padding: 1.5rem; }
}
