/* Sitio principal | Iglesia Todo Por Ti
 * Colores, letras y medidas: /assets/css/tokens.css (compartido con /bienvenida/). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font-body); background: var(--cream); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.ico { flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 6px; font-weight: 600; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: var(--pad-y) var(--pad-x); display: flex; flex-direction: column; gap: 12px; }
.wrap--narrow { max-width: 820px; }

.bg-cream { background: var(--cream); }
.bg-white { background: var(--white); }
.bg-ink { background: var(--ink); color: var(--on-dark); }
.bg-amber { background: var(--amber); color: var(--ink); }
.bg-sand { background: var(--sand); color: var(--ink); }

.h2 { font-family: var(--font-head); font-weight: 800; font-size: 46px; line-height: 1.08; letter-spacing: -0.01em; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin-bottom: 20px; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 6px; border: 0; font: inherit; font-weight: 600; font-size: 17px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--amber:hover { background: var(--amber-hover); }
.btn--navy { background: var(--ink); color: var(--on-dark); }
.btn--navy:hover { background: var(--navy2); }
.btn--line { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: rgba(14, 35, 64, .07); }
.btn--ghost { border: 1.5px solid var(--on-dark); color: var(--on-dark); background: transparent; }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 16px; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 1px solid var(--edge); border-radius: 999px; color: var(--on-dark); font-size: 15px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { text-decoration: none; border-color: var(--amber); color: var(--amber); background: rgba(242, 169, 59, .10); }
.chip--light { color: var(--ink); border-color: var(--line); background: var(--cream); }
.chip--light:hover { color: var(--ink); border-color: var(--amber-text); background: #FFF6E2; }
.dot { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--edge); color: var(--soft); transition: border-color .15s, color .15s; }
.dot:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Barra superior y encabezado ---------- */
.topbar { background: var(--foot); color: var(--soft); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.topbar .wrap { padding-top: 8px; padding-bottom: 8px; flex-direction: row; justify-content: space-between; gap: 16px; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--on-dark); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(9, 23, 41, .35); }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 28px; font-size: 16px; font-weight: 500; }
.site-nav ul a { padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { text-decoration: none; border-bottom-color: var(--amber); }
.menu-toggle { display: none; background: transparent; border: 0; color: var(--on-dark); width: 48px; height: 48px; align-items: center; justify-content: center; cursor: pointer; border-radius: 6px; }
.menu-toggle .ico-close { display: none; }
.menu-open .menu-toggle .ico-open { display: none; }
.menu-open .menu-toggle .ico-close { display: block; }

/* ---------- Portada ---------- */
.hero .wrap { padding-top: 80px; padding-bottom: 96px; gap: 48px; }
.hero__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; max-width: 900px; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--amber); }
.hero h1 { font-family: var(--font-head); font-weight: 800; font-size: 88px; line-height: .98; letter-spacing: -0.02em; }
.hero__tagline { font-size: 24px; line-height: 1.4; color: var(--on-dark); max-width: 720px; }
.hero__times { font-size: 19px; color: var(--soft); }
.hero__photo .photo { width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; border-radius: var(--radius); }

/* ---------- Soy nuevo ---------- */
.nuevo { flex-direction: row; flex-wrap: wrap; gap: 32px 56px; align-items: flex-start; }
.nuevo__head { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.nuevo__sub { font-size: 20px; font-weight: 600; color: var(--amber-text); }
.nuevo__body { flex: 2 1 440px; display: flex; flex-direction: column; gap: 24px; border-top: 2px solid var(--amber); padding-top: 24px; }
.nuevo__body > p { font-size: 19px; }

/* ---------- Preguntas desplegables ---------- */
.faq { border-top: 1px solid var(--faq-line); }
.faq:last-child { border-bottom: 1px solid var(--faq-line); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 12px 0; cursor: pointer; font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 36px; height: 36px; border-radius: 6px; background: var(--ink); color: var(--on-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-size: 22px; font-weight: 500; line-height: 1; }
.faq[open] summary::after { content: '\2212'; background: var(--amber); color: var(--ink); }
.faq p { margin: 0 0 24px; font-size: 18px; color: var(--muted); max-width: 680px; }

/* ---------- Ministerios ---------- */
.ministerios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ministerio { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--ink); }
.ministerio img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ministerio::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(9, 23, 41, .85) 0%, rgba(9, 23, 41, .15) 55%, rgba(9, 23, 41, 0) 100%); }
.ministerio span { position: absolute; left: 20px; bottom: 16px; z-index: 1; font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--on-dark); }
.ministerio:hover img { transform: scale(1.04); }

/* ---------- Ubicaciones ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tab { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { background: rgba(14, 35, 64, .07); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--on-dark); }
.sede { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: stretch; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.sede__info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.sede__tag { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-text); }
.sede h3 { font-family: var(--font-head); font-weight: 700; font-size: 30px; line-height: 1.15; }
.sede dl { display: flex; flex-direction: column; gap: 14px; }
.sede dt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--amber-text); }
.sede dd { margin: 4px 0 0 28px; font-size: 17px; line-height: 1.5; }
.sede__nota { color: var(--muted); font-size: 15px; }
.sede__map { flex: 1.4 1 420px; min-width: 0; }
.sede__map iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: var(--radius); }

/* ---------- Instagram ---------- */
.ig__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.ig__head > div { display: flex; flex-direction: column; gap: 12px; }
.ig__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ig__grid a { border-radius: 6px; overflow: hidden; }
.ig__grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s ease, opacity .2s; }
.ig__grid a:hover img { transform: scale(1.05); opacity: .9; }

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contacto__card { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, transform .15s; }
.contacto__card:hover { text-decoration: none; border-color: var(--amber-text); transform: translateY(-2px); }
.contacto__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--amber); margin-bottom: 8px; }
.contacto__label { font-size: 14px; font-weight: 600; color: var(--amber-text); }
.contacto__value { font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.redes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--foot); color: var(--soft); font-size: 14px; line-height: 1.5; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer__brand { display: flex; align-items: center; gap: 20px; }
.site-footer__brand img { height: 72px; width: auto; }
.site-footer__name { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--on-dark); }
.site-footer__links { display: flex; gap: 10px; }
.site-footer__copy { flex: 1 1 100%; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 20px; }

/* ---------- Aviso de cookies ---------- */
.cookie-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--ink); color: var(--on-dark); border: 1px solid var(--edge); border-radius: 10px; box-shadow: 0 12px 32px rgba(9, 23, 41, .35); font-size: 15px; }
.cookie-consent p { flex: 1; }

/* ---------- Tableta ---------- */
@media (max-width: 960px) {
  .hero h1 { font-size: 68px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: stretch; justify-content: center; gap: 24px; padding: 96px 32px 40px; background: var(--ink); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--navy-line); font-family: var(--font-head); font-size: 28px; font-weight: 700; }
  .site-nav .btn { min-height: 52px; font-size: 17px; }
  .brand, .menu-toggle { position: relative; z-index: 2; }
  .ministerios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contacto { grid-template-columns: 1fr; }
}

/* ---------- Celular ---------- */
@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }
  .topbar { font-size: 12px; }
  .topbar__city { display: none; }
  .site-header .wrap { padding: 12px 20px; }
  .brand img { height: 44px; }
  .brand span { font-size: 18px; }

  .hero .wrap { padding-top: 44px; padding-bottom: 48px; gap: 28px; }
  .hero__text { gap: 18px; }
  .eyebrow { font-size: 15px; }
  .hero h1 { font-size: 48px; line-height: 1.02; }
  .hero__tagline { font-size: 19px; }
  .hero__times { font-size: 16px; }
  .hero__photo .photo { aspect-ratio: 4 / 3; }

  .h2 { font-size: 34px; }
  .lead { font-size: 17px; margin-bottom: 12px; }
  .btn { min-height: 50px; padding: 0 24px; }
  .btns .btn { flex: 1 1 100%; }

  .nuevo { gap: 20px; }
  .nuevo__sub { font-size: 18px; }
  .nuevo__body > p { font-size: 17px; }

  .faq summary { font-size: 20px; min-height: 64px; }
  .faq p { font-size: 17px; }

  .ministerios { gap: 10px; }
  .ministerio { aspect-ratio: 1; }
  .ministerio span { left: 12px; bottom: 10px; font-size: 18px; }

  .tab { flex: 1 1 auto; padding: 0 14px; font-size: 15px; }
  .sede { padding: 20px; gap: 24px; }
  .sede h3 { font-size: 24px; }
  .sede .btn { width: 100%; }
  .sede__map { flex-basis: 100%; }
  .sede__map iframe { min-height: 260px; aspect-ratio: 4 / 3; height: auto; }

  .ig__grid { gap: 6px; }

  .contacto { grid-template-columns: 1fr; gap: 10px; }
  .contacto__card { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px; }
  .contacto__icon { margin: 0; grid-row: 1 / span 2; }
  .contacto__label { align-self: end; }
  .contacto__value { align-self: start; font-size: 18px; }
  .redes .chip { flex: 1 1 100%; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .cookie-consent { flex-direction: column; align-items: stretch; text-align: left; }
}

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