/* =========================
   IGLESIA GENTE NUEVA — Base
   Tema claro + nocturno suave
========================= */

:root{
  --bg: #F5FAFF;
  --surface: #ffffff;
  --surface2: #EEF3FA;
  --text: #0B1F33;
  --muted: #5A6B7A;

  /* Base celestes cielo */
  --primary: #3AA9FF;
  --primary-2: #0F6CCF;
  --secondary: #0B2F4E;

  /* Acentos (6+ tonos bien separados) */
  --gold: #F2C94C;
  --emerald: #22C55E;
  --coral: #FF6B6B;
  --violet: #A855F7;
  --orange: #F97316;
  --teal: #06B6D4;

  --brand: var(--secondary);
  --brand2: var(--primary-2);
  --accent: var(--gold);
  --grad: linear-gradient(135deg, var(--secondary), var(--primary-2));

  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 18px;
  --radius-sm: 12px;
  --border: rgba(11,47,78,.12);
  --max: 1120px;
  --container: var(--max);

  --wa: #25D366;

  --font-ui: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  --font-display: "Montserrat", var(--font-ui);
  --font-script: "Pacifico", cursive;
  --font: "Montserrat", var(--font-ui);
}

html[data-theme="dark"]{
  --bg: #0B1220;
  --surface: #0F1B2E;
  --surface2: #0E1730;
  --text: #EAF2FF;
  --muted: #B6C2D3;

  --primary: #4FB3FF;
  --primary-2: #78C7FF;
  --secondary: #A8D7FF;

  --gold: #F7D77A;
  --emerald: #34D399;
  --coral: #FF8080;
  --violet: #C084FC;
  --orange: #FB923C;
  --teal: #22D3EE;

  --brand: var(--primary);
  --brand2: var(--primary-2);
  --accent: var(--gold);
  --grad: linear-gradient(135deg, var(--primary), var(--primary-2));

  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --border: rgba(168,215,255,.14);
}

*{ box-sizing: border-box; }
body{
  margin:0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main{ flex: 1 0 auto; }

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

a{ color: inherit; text-decoration: none; }
a.link{ color: var(--brand2); }
html[data-theme="dark"] a.link{ color: var(--brand); }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

/* Accessibility */
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  border:0;
}
.skip-link{
  position:absolute;
  left:-999px; top: 8px;
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  z-index: 9999;
}
.skip-link:focus{ left: 12px; }

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .site-header{
  background: rgba(11,18,32,0.65);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand-mark{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  display:grid;
  place-items:center;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand-text{ display:flex; flex-direction: column; line-height: 1.1; }
.brand-sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.nav{ display:flex; align-items:center; gap: 10px; }
.nav-toggle{
  display:none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: none;
}
.nav-toggle-bars{
  width: 18px; height: 2px;
  background: var(--text);
  display:block;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px; height: 2px;
  background: var(--text);
}
.nav-toggle-bars::before{ top: -6px; }
.nav-toggle-bars::after{ top: 6px; }

.nav-menu{
  display:flex;
  align-items:center;
  gap: 10px;
}
.nav-menu a{
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--muted);
}
.nav-menu a:hover{
  background: var(--surface2);
  color: var(--text);
}

.theme-btn{
  margin-left: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
}
.theme-btn:hover{ background: var(--surface2); }

/* Hero */
.hero{
  padding: 0 0 24px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-inner{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}
.hero-copy{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow:hidden;
}
.hero-copy::before{
  content:"";
  position:absolute;
  inset:-2px -2px auto auto;
  width: 340px; height: 340px;
  background: radial-gradient(circle at center, rgba(212,175,55,0.25), transparent 60%);
  transform: translate(35%, -35%);
}
html[data-theme="dark"] .hero-copy::before{
  background: radial-gradient(circle at center, rgba(231,196,106,0.18), transparent 60%);
}
.hero h1{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.02em;
}
.lead{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
}
.hero-ctas{ display:flex; flex-wrap: wrap; gap: 10px; }
.hero-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  text-align: center;
}
.kicker{
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
.hero-subtitle{
  margin: 8px auto 0;
  color: var(--muted);
  max-width: 60ch;
}
.hero-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}
.hero-micro{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}

.versiculo-wrapper{
  align-self: center;
  justify-self: center;
}
.versiculo-dia{
  width: 320px;
  height: 320px;
  padding: 24px;
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,.25);
  background: linear-gradient(135deg, #0B2F4E, #3AA9FF);
}
.versiculo-label{
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .78;
  margin-bottom: 10px;
}
.versiculo-texto{
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 600;
}
.versiculo-cita{
  margin-top: 12px;
  font-size: .95rem;
  opacity: .85;
}
.hero-micro a{ color: inherit; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
}
.btn-primary{
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}
.btn-ghost{
  background: var(--surface);
  color: var(--text);
}
.btn:hover{ transform: translateY(-1px); }

.hero-badges{ display:flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.badge{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: 13px;
}
.badge:hover{ color: var(--text); }

.hero-card .card{ height: 100%; }

/* Sections */
.section{ padding: 26px 0; }
.section-head{
  display:flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.section-head h2{ margin: 0; font-size: 22px; }
.section-title{
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.muted{ color: var(--muted); }
.small{ font-size: 12px; }

.grid{
  display:grid;
  gap: 12px;
}
.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }

/* Cards */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card-title{ margin: 0 0 10px; font-size: 16px; }
.card p{ margin: 0; color: var(--muted); }
.card h3{ margin: 0 0 10px; font-size: 16px; }
.card-link{ display:block; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover{ transform: translateY(-2px); }
.card-cta{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  margin-top: 10px;
  color: var(--brand2);
  font-weight: 800;
}
.card.mini{ padding: 16px; }
.divider{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}
.filial-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.filial-card h3{ margin: 0 0 8px; }
.filial-card p{ margin: 0 0 8px; color: var(--muted); }
.filial-card p strong{ color: var(--text); }
.filial-subtitle{
  margin: 0 0 6px;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.filial-photo{
  margin: 12px 0;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--surface2);
  color: var(--muted);
  text-align: center;
}
.filial-photo--image{
  padding: 0;
  border-style: solid;
  background: transparent;
  overflow: hidden;
}
.filial-photo--image img{
  width: 100%;
  height: auto;
  display: block;
}
html[data-theme="dark"] .filial-photo{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.7);
}
.btn-whatsapp{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--wa);
  color: #fff;
  font-weight: 700;
  transition: transform .15s ease, filter .15s ease;
}
.btn-whatsapp:hover{ transform: translateY(-1px); filter: brightness(1.02); }

/* ===== Ediciones ===== */
.editorial-list{
  margin: 12px 0 0;
  padding-left: 20px;
}
.editorial-list li{
  margin-bottom: 8px;
  color: var(--muted);
}
.editorial-list li strong{ color: var(--text); }
.catalogo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 18px;
}
.catalogo-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow);
}
.catalogo-portada{
  width: 100%;
  height: 320px;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: var(--muted);
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 0;
}
.catalogo-portada picture,
.catalogo-portada img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.catalogo-autor{
  color: var(--muted);
  margin: 6px 0 10px;
}
.catalogo-descripcion{
  color: var(--muted);
  margin: 0;
}

/* ===== Seminario / TV / Donaciones / Libreria ===== */
.plan-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.plan-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
}
.plan-card ul{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.donaciones-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.donacion-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
}
.donacion-card p{ color: var(--muted); }
.donacion-card p strong{ color: var(--text); }

.programacion-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.programa-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
}
.programa-card p{ color: var(--muted); }
.programa-card p strong{ color: var(--text); }

.libreria-list{
  margin: 12px 0 0;
  padding-left: 20px;
}
.libreria-list li{
  margin-bottom: 8px;
  color: var(--muted);
}
.libreria-list li strong{ color: var(--text); }

/* Hero Librería */
:root{
  --titulo-color: #222;
  --subtitulo-color: #444;
}
html[data-theme="dark"]{
  --titulo-color: #f5f5f5;
  --subtitulo-color: #cccccc;
}
.hero-libreria{
  padding-top: 70px;
  padding-bottom: 70px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  --hero-title-shift: -60px;
}
.hero-libreria h1,
.titulo-libreria{
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 25px;
  line-height: 1.3;
  color: var(--titulo-color);
  position: relative;
  z-index: 2;
  top: var(--hero-title-shift);
}
.subtitulo-libreria{
  font-size: 1.15rem;
  max-width: 750px;
  margin: 0 auto 50px auto;
  line-height: 1.6;
  opacity: 0.95;
  color: var(--subtitulo-color);
  position: relative;
  z-index: 2;
  top: var(--hero-title-shift);
}

/* --- Carrusel 3D Librería Cristo Vive --- */
.carrusel-3d{
  --carrusel-shadow: rgba(0, 0, 0, 0.25);
  --carrusel-shadow-hover: rgba(0, 0, 0, 0.35);
  --carrusel-depth: 420px;
  width: 100%;
  display: flex;
  justify-content: center;
  perspective: 1200px;
  margin: 40px 0 60px;
  position: relative;
  z-index: 1;
}
html[data-theme="dark"] .carrusel-3d{
  --carrusel-shadow: rgba(0, 0, 0, 0.55);
  --carrusel-shadow-hover: rgba(0, 0, 0, 0.75);
}
.carousel{
  width: 260px;
  height: 360px;
  position: relative;
  transform-style: preserve-3d;
  animation: giro 14s infinite linear;
  transform-origin: center;
  will-change: transform;
}
.carousel .item{
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
}
.carousel-link{
  display: block;
  width: 100%;
  height: 100%;
}
.carousel-link picture{
  display: block;
  width: 100%;
  height: 100%;
}
.carousel img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 10px 25px var(--carrusel-shadow);
}
.carousel img:hover{
  transform: scale(1.03);
  box-shadow: 0 12px 30px var(--carrusel-shadow-hover);
}
.carousel .item:nth-child(1){ transform: rotateY(0deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(2){ transform: rotateY(45deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(3){ transform: rotateY(90deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(4){ transform: rotateY(135deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(5){ transform: rotateY(180deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(6){ transform: rotateY(225deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(7){ transform: rotateY(270deg) translateZ(var(--carrusel-depth)); }
.carousel .item:nth-child(8){ transform: rotateY(315deg) translateZ(var(--carrusel-depth)); }
@media (max-width: 640px){
  .carrusel-3d{ --carrusel-depth: 320px; }
  .carousel{ width: 220px; height: 320px; }
}
@media (prefers-reduced-motion: reduce){
  .carousel{ animation: none; }
}
.carrusel-3d[data-motion="force"] .carousel{
  animation: giro 14s infinite linear;
}
.carousel-title{
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  margin: 16px 0 0;
  position: relative;
  z-index: 2;
  top: 64px;
}
@keyframes giro{
  from{ transform: rotateY(0deg); }
  to{ transform: rotateY(360deg); }
}

.evento-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 24px;
}
.evento-banner{
  width: 100%;
  aspect-ratio: 1 / 1.14;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}
.evento-content p{
  margin: 6px 0;
  color: var(--muted);
}
.evento-content p strong{ color: var(--text); }
.evento-titulo{
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 900;
}
.evento-descripcion{ margin: 10px 0 0; }
.card-list, .list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.actions{ display:flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Tiles */
.tile{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display:flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow);
}
.tile:hover{ transform: translateY(-1px); }
.tile-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--surface2);
  display:grid;
  place-items:center;
  font-size: 20px;
}
.tile-body{ display:flex; flex-direction: column; gap: 2px; }
.tile-body span{ color: var(--muted); font-size: 13px; }

/* Filters */
.filters{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.chips{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip{
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.chip.is-active{
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}
.event-categories{
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.event-categories a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}
.event-categories a:hover{
  background: var(--surface2);
  color: var(--text);
}
html[data-theme="dark"] .event-categories a{
  background: rgba(15,27,46,.7);
}

/* Form */
.form{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
label{ display:flex; flex-direction: column; gap: 6px; font-weight: 700; }
input, textarea{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font);
}
input::placeholder, textarea::placeholder{ color: rgba(71,85,105,0.75); }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{ color: rgba(180,192,216,0.70); }

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 22px 0 44px;
  margin-top: 26px;
  position: relative;
}
.footer-inner{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.footer-brand{
  display:flex;
  align-items:center;
}
.footer-legal{
  margin: 0;
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1 1 320px;
}
.footer-legal .dot{ color: var(--muted); }
.footer-legal a{ color: var(--muted); }
.footer-legal a:hover{ color: var(--text); }

.footer-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.footer-links{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.footer-links a{
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  display:inline-flex;
  align-items:center;
  gap: 8px;
}
.footer-links a:hover{ color: var(--text); background: var(--surface2); }
.footer-icon{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.footer-icon svg{
  width: 18px;
  height: 18px;
  display:block;
}
.legal-item{
  position: relative;
  display:inline-flex;
  align-items:center;
}
.legal-item[data-tooltip]::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 140%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.legal-item[data-tooltip]::before{
  content:"";
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--surface);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.legal-item[data-tooltip]:hover::after,
.legal-item[data-tooltip]:focus-visible::after{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.legal-item[data-tooltip]:hover::before,
.legal-item[data-tooltip]:focus-visible::before{
  opacity: 1;
}
.footer-credit{
  position: absolute;
  bottom: 3px;
  left: 5%;
  font-size: 11px;
  color: var(--muted);
}
.footer-credit a{ color: var(--brand2); }

/* Floating buttons */
.float-btn{
  position: fixed;
  bottom: 18px;
  z-index: 80;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.float-btn:hover{ transform: translateY(-2px); }
.float-btn:active{ transform: translateY(0); }
.float-btn svg{ width: 20px; height: 20px; }
.float-icon{
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.float-top{
  left: 18px;
  background: var(--surface);
  color: var(--brand2);
}
.float-top:hover{
  background: var(--surface2);
  color: var(--brand);
}

.float-whatsapp{
  right: 18px;
  background: #25D366;
  color: #fff;
  border-color: transparent;
}
.float-whatsapp:hover{ background: #1ebe5d; }
.float-whatsapp:active{ background: #128c7e; }

@media (max-width: 720px){
  .footer-row{
    align-items:flex-start;
  }
  .footer-links{
    justify-content: flex-start;
    width: 100%;
  }
}

/* Responsive */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .versiculo-wrapper{
    display: flex;
    justify-content: center;
    margin-top: 18px;
  }
  .versiculo-dia{
    width: min(90vw, 360px);
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .grid-4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
  .nav-toggle{ display:inline-flex; }
  .nav-menu{
    display:none;
    position:absolute;
    right: 16px;
    top: 64px;
    width: min(360px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .nav-menu.is-open{ display:flex; }
  .nav-menu a{ width:100%; }
}


/* ===== Brand tweaks (v1.0 multipage) ===== */
.logo{
  display:flex; align-items:center; gap:12px;
}
.logo img{
  width:44px; height:44px; object-fit:contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.12));
}
.brand-lines{line-height:1;}
.brand-top{font-family:var(--font-display); font-weight:900; letter-spacing:.08em; font-size:.92rem; text-transform:uppercase;}
.brand-bottom{font-family:var(--font-display); font-weight:800; font-size:.92rem; color:var(--muted); margin-top:2px;}

.hero-title{
  font-family:var(--font-display);
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  line-height:1.05;
  margin: 0 0 6px;
}
.hero-title span{display:block; color: var(--accent);}
.hero-sub{
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  margin: 10px 0 6px;
  color: var(--gold);
  text-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Hero background image (optional) */
.hero{
  position:relative;
  overflow:hidden;
}
.hero-media{
  display: block;
  width: 100%;
  margin-bottom: 18px;
}
.hero-media img{
  width:100%;
  height:auto;
  display:block;
}

/* ===== Footer socials & credit ===== */
.footer{
  position:relative;
  background: #1C4B73;
  color: #fff;
  padding: 20px 0 24px;
  margin-top: auto;
}
html[data-theme="dark"] .footer{
  background: #0B2F4E;
}
.footer .muted{ color: rgba(255,255,255,.78); }
.footer-topline{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.social-row{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.social-link{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px;
  border-radius:12px;
  background: rgba(255,255,255,.12);
  border: 1px solid var(--border);
  color: #fff;
  transition: transform .15s ease, background .15s ease;
}
.social-link:hover{transform: translateY(-2px); background: rgba(255,255,255,.18);}
.social-link svg{width:20px; height:20px; fill: currentColor;}
.social-link img{width:22px; height:22px; object-fit:contain;}
.footer-social-icons{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 36px 0 18px;
  width: 100%;
}

.social-icon{
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--footer-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  animation: floatIcon 5s ease-in-out infinite;
}

.social-icon svg{
  width: 28px;
  height: 28px;
  fill: var(--footer-text);
}

.social-icon::after{
  content: attr(data-label);
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--footer-text);
  color: var(--footer-bg);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icon:hover::after{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.social-icon:hover{
  transform: scale(1.1);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

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

@media (prefers-reduced-motion: reduce){
  .social-icon{
    animation: none;
    transition: none;
  }
  .social-icon::after{
    transition: none;
  }
}
.footer-social-bar{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 24px 0 12px;
  width: 100%;
}

.social-pill{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.social-pill::before{
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    var(--glow-color) 0deg,
    transparent 120deg,
    var(--glow-color) 240deg,
    transparent 360deg
  );
  animation: rotateGlow 4s linear infinite;
  opacity: 0.9;
}

@keyframes rotateGlow{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

.social-pill::after{
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: var(--footer-bg);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 1;
}

.social-pill .icon,
.social-pill .label,
.social-pill svg{
  z-index: 2;
  position: relative;
  color: var(--footer-text);
  fill: var(--footer-text);
}

.social-pill .icon{
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-pill svg{
  width: 22px;
  height: 22px;
}

.social-pill .label{
  font-size: 0.95rem;
  font-weight: 600;
}

.social-pill:hover{
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.social-pill{
  animation: floatPill 5s ease-in-out infinite;
}

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

.instagram{ --glow-color: #E1306C; }
.facebook{ --glow-color: #1877F2; }
.tiktok{ --glow-color: #25F4EE; }
.youtube{ --glow-color: #FF0000; }
.whatsapp{ --glow-color: #25D366; }
.radio{ --glow-color: #FFC300; }

:root{
  --footer-bg: #ffffff;
  --footer-text: #222222;
}

html[data-theme="dark"]{
  --footer-bg: #111827;
  --footer-text: #f5f5f5;
}

@media (prefers-reduced-motion: reduce){
  .social-pill,
  .social-pill::before{
    animation: none;
  }
  .social-pill{
    transition: none;
  }
}
.footer-legal{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin-top: 6px;
}
.footer-sep{ opacity: .65; }
.footer-legal-icons{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-icon-link{
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: transform .15s ease, filter .15s ease;
}
.footer-icon-link img{
  width: 18px;
  height: 18px;
  display: block;
}
.footer-icon-link:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.footer-legal a{color: rgba(255,255,255,.84); text-decoration:none;}
.footer-legal a:hover{text-decoration:underline;}
.footer-year{opacity:.8; font-size:.9rem;}
.footer-credit{
  position:absolute;
  bottom:3px;
  left:5%;
  font-size:.82rem;
  opacity:.82;
}
.footer-credit a{color: rgba(255,255,255,.9); text-decoration:none;}
.footer-credit a:hover{text-decoration:underline;}
@media (max-width:560px){
  .footer-credit{left:4%;}
}

/* ===== Floating buttons ===== */
.fab{
  position:fixed;
  z-index:60;
  width:52px;
  height:52px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .15s ease, opacity .2s ease;
}
.fab:hover{transform: translateY(-2px);}
.fab--top{
  right:14px;
  bottom:14px;
  background: rgba(255,255,255,.85);
  color: var(--secondary);
  opacity:0;
  pointer-events:none;
}
html[data-theme="dark"] .fab--top{background: rgba(15,27,46,.92); color: var(--secondary);}
.fab--top.is-visible{opacity:1; pointer-events:auto;}
.fab--wa{
  left:14px;
  bottom:14px;
  background: var(--wa);
  border-color: rgba(0,0,0,.05);
  color:white;
}
.fab--wa:hover{background: #1fb455;}
.fab svg{width:22px; height:22px; fill: currentColor;}

/* ===== Modal (legal popups) ===== */
.modal{
  position:fixed; inset:0;
  display:none;
  z-index:80;
}
.modal.is-open{display:block;}
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
}
.modal__panel{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width:min(820px, calc(100% - 28px));
  max-height: 86vh;
  overflow:auto;
  background: var(--surface);
  color: var(--text);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.modal__head{
  position:sticky; top:0;
  background: linear-gradient(180deg, rgba(58,169,255,.16), rgba(58,169,255,0));
  padding: 18px 18px 8px;
}
.modal__title{margin:0; font-family:var(--font-display); font-weight:900;}
.modal__close{
  position:absolute; right:14px; top:14px;
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  cursor:pointer;
}
html[data-theme="dark"] .modal__close{background: rgba(15,27,46,.9);}
.modal__body{padding: 0 18px 18px;}
.modal__body p{color: var(--muted);}

/* ===== Shop ===== */
.shop-toolbar{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.shop-filters{
  display:flex; gap:10px; flex-wrap:wrap;
}
.shop-bar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.shop-layout{
  display:grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px){
  .shop-layout{ grid-template-columns: 1fr; }
}
.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
  cursor:pointer;
  font-weight:800;
}
html[data-theme="dark"] .chip{background: rgba(15,27,46,.9);}
.chip[aria-pressed="true"]{outline: 2px solid rgba(58,169,255,.5);}
.shop-search{
  flex:1;
  min-width: 220px;
}
.shop-search input{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  color: var(--text);
}
html[data-theme="dark"] .shop-search input{background: rgba(15,27,46,.9);}

.shop-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
  margin-top: 18px;
}
@media (max-width: 980px){ .shop-grid{grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 620px){ .shop-grid{grid-template-columns: 1fr;} }

.product{
  background: rgba(255,255,255,.82);
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
html[data-theme="dark"] .product{background: rgba(15,27,46,.92);}
.product__img{
  aspect-ratio: 3 / 4;
  background: rgba(58,169,255,.08);
  display:flex; align-items:center; justify-content:center;
}
.product__img picture{
  width: 100%;
  height: 100%;
  display: block;
}
.product__img img{width:100%; height:100%; object-fit:cover;}
.product__body{padding:14px;}
.product__title{margin:0 0 6px; font-family:var(--font-display); font-weight:900; font-size:1.02rem;}
.product__meta{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
.badge{
  display:inline-flex; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight:900;
  font-size:.78rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
}
html[data-theme="dark"] .badge{background: rgba(15,27,46,.9);}
.badge--ediciones{border-color: rgba(242,201,76,.35);}
.badge--libros{border-color: rgba(58,169,255,.45);}
.badge--biblias{border-color: rgba(34,197,94,.35);}
.badge--ensenanza{border-color: rgba(168,85,247,.35);}
.badge--regaleria{border-color: rgba(255,107,107,.35);}

.product__note{margin:10px 0 0; color: var(--muted); font-size:.92rem;}
.product__actions{
  margin-top:auto;
  padding: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.select{
  flex:1;
  min-width: 170px;
}
.select label{display:block; font-size:.78rem; color: var(--muted); font-weight:800; margin-bottom:4px;}
.select select{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  color: var(--text);
}
html[data-theme="dark"] .select select{background: rgba(15,27,46,.9);}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(58,169,255,.95), rgba(15,108,207,.92));
  color:white;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}
.btn:hover{filter: brightness(1.02);}
.btn--ghost{
  background: rgba(255,255,255,.75);
  color: var(--text);
}
html[data-theme="dark"] .btn--ghost{background: rgba(15,27,46,.9); color: var(--text);}
.btn-primary{
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}
.btn-ghost{
  background: var(--surface);
  color: var(--text);
}
.btn-outline{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
html[data-theme="dark"] .btn-ghost{
  background: rgba(15,27,46,.9);
  color: var(--text);
}
html[data-theme="dark"] .btn-outline{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.qty{
  display:flex; align-items:center; gap:10px;
}
.qty input{
  width:86px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
}
html[data-theme="dark"] .qty input{background: rgba(15,27,46,.9); color: var(--text);}

.cart{
  margin-top: 26px;
  background: rgba(255,255,255,.82);
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
html[data-theme="dark"] .cart{background: rgba(15,27,46,.92);}
.cart h3{margin:0 0 12px; font-family:var(--font-display); font-weight:900;}
.cart__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cart__items{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.cart-items{display:flex; flex-direction:column; gap:10px;}
.cart-item{
  display:flex; gap:12px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.65);
}
html[data-theme="dark"] .cart-item{background: rgba(11,18,32,.6);}
.cart-item strong{font-family:var(--font-display); font-weight:900;}
.cart-item small{color: var(--muted);}
.cart-item .actions{display:flex; gap:8px; align-items:center;}
.icon-btn{
  width:38px; height:38px; border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  cursor:pointer;
}
html[data-theme="dark"] .icon-btn{background: rgba(15,27,46,.9); color: var(--text);}

.checkout-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 760px){ .checkout-grid{grid-template-columns: 1fr;} }
.field label{display:block; font-size:.82rem; font-weight:900; margin-bottom:6px;}
.field input, .field select, .field textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  color: var(--text);
}
html[data-theme="dark"] .field input, html[data-theme="dark"] .field select, html[data-theme="dark"] .field textarea{
  background: rgba(15,27,46,.9);
}
.helper{
  margin-top: 10px;
  color: var(--muted);
  font-size:.92rem;
}
.notice{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(58,169,255,.10);
}
.notice strong{font-family: var(--font-display);}



/* --- Page helpers (multipage) --- */
.page-hero{
  padding: 48px 0 18px;
  background: linear-gradient(180deg, rgba(58,169,255,.12), rgba(255,255,255,0));
}
.page-hero h1{ margin:0 0 8px; font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em;}
.page-hero .muted{ max-width: 70ch; }

.section-soft{ background: rgba(58,169,255,.08); }

.section-light{ background: transparent; }
.section-accent{ background: rgba(58,169,255,.08); }
html[data-theme="dark"] .section-accent{ background: rgba(58,169,255,.14); }

.section-dark{
  background: rgba(58,169,255,.18);
}
html[data-theme="dark"] .section-dark{
  background: #0B2F4E;
  color: #fff;
}
html[data-theme="dark"] .section-dark p,
html[data-theme="dark"] .section-dark li{ color: rgba(255,255,255,.85); }
html[data-theme="dark"] .section-dark h2,
html[data-theme="dark"] .section-dark h3{ color: #fff; }

.section-light h2,
.section-accent h2,
.section-dark h2{
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.section-light h3,
.section-accent h3,
.section-dark h3{
  margin: 16px 0 8px;
  font-size: 1.05rem;
}

.map-container{
  margin: 14px 0 18px;
  min-height: 320px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}
html[data-theme="dark"] .section-dark .map-container{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
}
.filiales-list ul{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
html[data-theme="dark"] .section-dark .filiales-list ul{ color: rgba(255,255,255,.85); }

.timeline{
  display:grid;
  gap: 12px;
}
.timeline-item{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
html[data-theme="dark"] .section-dark .timeline-item{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
}
.timeline-year{
  min-width: 90px;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--brand2);
}
html[data-theme="dark"] .section-dark .timeline-year{ color: #fff; }

.split{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 860px){
  .split{ grid-template-columns: 1fr; }
}

.inline-actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items: center;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15,108,207,.10);
  border: 1px solid rgba(15,108,207,.18);
  font-size: 13px;
}

.notice{
  border-radius: 12px;
}

.callout{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.45));
}

:root{ --danger: #b91c1c; }
html[data-theme="dark"]{ --danger: #fb7185; }
