/* Fundación Monte Tabor, I.A.P. — hoja de estilos principal */

:root {
  --magenta: #c8106f;
  --magenta-bright: #e7138a;
  --magenta-soft: #fdebf4;
  --sun: #f5a524;
  --sky: #2fa8de;
  --ink: #1e2230;
  --text: #3a3f4d;
  --muted: #6b7080;
  --line: #e7e3dd;
  --bg: #fbf9f6;
  --surface: #ffffff;
  --dark: #1b1e29;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(30 34 48 / 6%), 0 8px 24px rgb(30 34 48 / 8%);
  --container: 1140px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin: 0 0 1.1em; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.prose { max-width: 72ch; }
.center { text-align: center; margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 42px; height: auto; }
.brand span { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.brand small { display: block; font-family: var(--font-sans); font-weight: 500; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; padding: 0; color: var(--ink);
}
.nav-toggle svg { margin: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.site-nav a {
  display: block; padding: .5rem .7rem; border-radius: 8px; text-decoration: none;
  color: var(--text); font-size: .95rem; font-weight: 500; white-space: nowrap;
}
.site-nav a:hover { background: var(--magenta-soft); color: var(--magenta); }
.site-nav a[aria-current="page"] { color: var(--magenta); background: var(--magenta-soft); }
.site-nav .nav-cta a { background: var(--magenta); color: #fff; padding-inline: 1.1rem; margin-left: .35rem; }
.site-nav .nav-cta a:hover, .site-nav .nav-cta a[aria-current="page"] { background: var(--ink); color: #fff; }

@media (max-width: 1060px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; inset: 100% 0 auto 0; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .75rem 1rem 1.25rem; gap: .2rem; }
  .site-nav a { padding: .8rem 1rem; font-size: 1rem; }
  .site-nav .nav-cta a { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Héroe / cabecera de página ---------- */
.hero, .page-hero {
  position: relative; color: #fff; isolation: isolate; overflow: hidden;
  background: var(--dark);
}
.hero > picture img, .page-hero > picture img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(20 22 32 / 25%) 0%, rgb(20 22 32 / 70%) 100%);
}
.hero { padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 9vw, 6rem); text-align: center; }
.hero .hero-logo { width: 120px; margin: 0 auto 1.25rem; filter: drop-shadow(0 4px 12px rgb(0 0 0 / 35%)); }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 46ch; margin: 0 auto 2rem; color: rgb(255 255 255 / 92%); }
.page-hero { padding: clamp(3rem, 8vw, 5rem) 0; text-align: center; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { margin: .5rem auto 0; color: rgb(255 255 255 / 88%); max-width: 60ch; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--magenta); margin-bottom: .6rem;
}
.hero .eyebrow, .page-hero .eyebrow { color: #ffd6ea; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--magenta); color: #fff; }
.btn-primary:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--magenta-soft); color: var(--magenta); }
.btn-ghost { border-color: rgb(255 255 255 / 70%); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--magenta); color: var(--magenta); background: transparent; }
.btn-outline:hover { background: var(--magenta); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Secciones ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 3px; margin: .8rem auto 0;
  background: linear-gradient(90deg, var(--sun), var(--magenta-bright));
  border-radius: 3px;
}

.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > :first-child { order: 2; }
}

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.figure { margin: 0; }
.figure img, .rounded { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: .6rem; text-align: center; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.card > img { border-radius: calc(var(--radius) - 4px); margin-bottom: 1.25rem; width: 100%; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--magenta-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8106f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.pill-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; }
.pill-list a {
  display: flex; align-items: center; gap: .75rem; padding: .9rem 1.2rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600;
}
.pill-list a:hover { border-color: var(--magenta); color: var(--magenta); }
.pill-list a::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--magenta-bright); flex: none; }

.quote {
  border-left: 4px solid var(--magenta-bright); background: var(--magenta-soft);
  padding: 1rem 1.25rem; border-radius: 0 12px 12px 0; color: var(--ink); font-weight: 600;
}

.stat-band { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Agradecimientos ---------- */
.name-list { columns: 3 220px; column-gap: 2rem; list-style: none; padding: 0; margin: 0; }
.name-list li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.inst-list { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.inst-list li { padding: .6rem .9rem; background: var(--bg); border-radius: 10px; border: 1px solid var(--line); }

/* ---------- Videos (carga diferida) ---------- */
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--dark); box-shadow: var(--shadow);
}
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video button {
  position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; padding: 0;
}
.video button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; translate: -50% -50%;
  border-radius: 14px; background: var(--magenta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
  transition: background-color .2s;
}
.video:hover img { opacity: 1; }
.video:hover button::after { background-color: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { text-align: center; margin-top: .85rem; font-size: 1.1rem; }

.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.doc-list a {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font-weight: 600; box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.doc-list a:hover { border-color: var(--magenta); transform: translateY(-2px); }
.doc-list svg { flex: none; color: var(--magenta); }
.doc-list small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Galería ---------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; gap: .5rem; } }
.gallery a, .gallery .gallery-video {
  display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: #e9e5df;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery video { width: 100%; height: 100%; object-fit: cover; background: var(--dark); }
.gallery-nav { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.5rem; }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgb(12 13 18 / 92%); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 86vh; width: auto; border-radius: 8px; }
.lightbox button {
  position: fixed; border: 0; background: rgb(255 255 255 / 12%); color: #fff; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { background: rgb(255 255 255 / 25%); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox .lb-next { right: 1rem; top: 50%; translate: 0 -50%; }
.lightbox .lb-count { position: fixed; bottom: 1rem; left: 50%; translate: -50% 0; color: rgb(255 255 255 / 75%); font-size: .9rem; }

/* ---------- Contacto / Donar ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.contact-list li { display: flex; gap: .85rem; align-items: flex-start; }
.contact-list svg { flex: none; color: var(--magenta); margin-top: .3rem; }
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--magenta); }

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; color: var(--ink); font-size: .95rem; }
.form input, .form textarea, .form select {
  font: inherit; color: var(--ink); padding: .75rem .9rem; border-radius: 10px;
  border: 1px solid #d6d1c9; background: #fff; width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--magenta); outline-offset: 0; border-color: var(--magenta); }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }

.bank {
  display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.25rem; margin: 1rem 0 0;
  padding: 1.25rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-all; }

/* ---------- Llamado a donar ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--magenta) 0%, #9b0f5a 100%); color: #fff; text-align: center;
  padding: clamp(2.75rem, 6vw, 4rem) 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 56ch; margin: 0 auto 1.5rem; color: rgb(255 255 255 / 90%); }

/* ---------- Pie ---------- */
.site-footer { background: var(--dark); color: #c9ccd6; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ffb3d6; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer h2 { font-family: var(--font-sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #8e93a3; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-brand img { width: 64px; margin-bottom: 1rem; background: #fff; border-radius: 12px; padding: 6px; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 10%);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: #8e93a3; font-size: .85rem;
}

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--magenta); color: #fff; cursor: pointer; box-shadow: var(--shadow);
  display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--ink); }
