/* ============ Tokens (paleta del rediseño hecho en v0/Vercel, adoptada para el sitio) ============ */
:root {
  --navy: #17245a;
  --navy-mid: #27337c;
  --text: #26324a;
  --bg: #ffffff;
  --bg-soft: #f6f7fc;
  --purple: #5630a8;
  --purple-deep: #3d2178;
  --lilac: #e7defa;
  --red: #ff5a8f;
  --yellow: #ffc857;
  --teal: #28b8d4;
  --pink: #c84eb2;
  --line: #dfe3f0;
  --black: #000;

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;

  --header-h: 96px;
  --gutter: 20px;
  --maxw: 1140px;
  --radius: 14px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.015em; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; text-align: justify; hyphens: auto; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--purple); color: #fff; padding: 8px 14px; z-index: 200; border-radius: 6px; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head p { text-align: center; }
.section-title { color: var(--purple); }
.eyebrow { font-family: var(--font-head); font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: var(--purple); margin: 0 0 .6rem; }
.section-lead { font-family: var(--font-head); font-weight: 500; font-size: 1.2rem; color: var(--navy); margin: 0 0 .75rem; }

/* ============ Encabezado ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .08);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand img { width: 84px; height: auto; }

.nav-toggle { display: none; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav-list > li { position: relative; }
.nav-link {
  appearance: none; background: none; border: 0; cursor: pointer;
  font: 500 .78rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: #55565a; text-decoration: none;
  padding: 14px 16px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 8px;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--purple); }
.has-sub > .nav-link::after {
  content: ""; width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
  transition: transform .2s;
}
.has-sub > .nav-link[aria-expanded="true"]::after { transform: rotate(180deg); }

.sub {
  list-style: none; display: none;
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border-radius: 10px; padding: 8px;
  box-shadow: 0 12px 30px rgba(20, 10, 40, .16);
  border-top: 3px solid var(--purple);
}
.has-sub.open > .sub { display: block; }
.sub a {
  display: block; padding: 10px 14px; border-radius: 6px;
  color: var(--navy); text-decoration: none; font-size: .9rem;
}
.sub a:hover { background: var(--bg-soft); color: var(--purple); }

/* ============ Portada ============ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy-mid) 58%, var(--purple) 100%);
  padding-top: 92px;
}
.hero::after {
  content: ""; position: absolute; right: -12%; top: -40%; width: 60%; height: 100%;
  background: radial-gradient(circle, rgba(255, 90, 143, .35), transparent 68%); pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 64px; align-items: center; padding-bottom: 56px;
}
.hero-badge {
  display: inline-block; border: 1px solid rgba(255, 255, 255, .4); border-radius: 99px;
  padding: 7px 16px; font-family: var(--font-head); font-weight: 600; font-size: .78rem;
}
.hero-copy h1 { color: #fff; margin: 20px 0; }
.hero-copy .lead { color: rgba(255, 255, 255, .82); max-width: 30rem; font-size: 1.05rem; margin-bottom: 32px; }
.hero-photo {
  position: relative; aspect-ratio: 4 / 3; max-height: 430px;
  border-radius: 26px; overflow: hidden; border: 6px solid rgba(255, 255, 255, .18);
  box-shadow: 0 24px 55px rgba(10, 15, 40, .45); background: var(--navy);
}
.hero-slide {
  position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .7s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 36, 90, 0) 45%, rgba(15, 20, 50, .78) 100%);
}
.hero-slide figcaption {
  position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 1;
  display: flex; flex-direction: column; gap: 4px; text-shadow: 0 2px 14px rgba(10, 15, 40, .5);
}
.hero-slide figcaption span {
  font-family: var(--font-head); font-weight: 700; font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--yellow);
}
.hero-slide figcaption strong { font-size: 1.2rem; line-height: 1.2; max-width: 20rem; }
.hero-carousel-dots { position: absolute; right: 18px; bottom: 16px; z-index: 2; display: flex; gap: 7px; }
.hero-carousel-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .2s, background .2s;
}
.hero-carousel-dots button.active { width: 22px; border-radius: 99px; background: var(--yellow); }

.hero-stats {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 16px 38px;
  padding: 26px 0 32px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .86rem;
}
.hero-stats span { display: flex; align-items: center; gap: 9px; }
.hero-stats .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hero-stats .dot-red { background: var(--red); }
.hero-stats .dot-yellow { background: var(--yellow); }
.hero-stats .dot-teal { background: var(--teal); }

/* ============ Tarjetas / grillas ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.card p:last-child { margin-bottom: 0; }
.card-accent { border-left-width: 4px; border-left-color: var(--purple); }
.card-red { border-left-color: var(--red); }
.card-yellow { border-left-color: var(--yellow); }
.section-alt .card { border-color: transparent; }

.placeholder { border-style: dashed !important; border-color: #cfcfd8 !important; background: transparent; }
.section-alt .placeholder { background: #fff; }
.ph-note {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--purple); background: #f3e6fa; padding: 3px 10px; border-radius: 99px; margin-bottom: 12px;
}

/* ============ Historia ============ */
.historia { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.historia-col { display: flex; flex-direction: column; gap: 32px; }
.historia-intro { position: sticky; top: calc(var(--header-h) + 24px); }
.timeline { list-style: none; position: relative; padding-left: 28px; border-left: 2px solid var(--line); }
.timeline > li { position: relative; padding-bottom: 26px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -37px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--purple); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--purple);
}
.timeline > li:last-child::before { background: var(--yellow); box-shadow: 0 0 0 2px var(--yellow); }
.tl-date { display: block; font-family: var(--font-head); font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.timeline p { margin: 0 0 .6em; }
.timeline p:last-child { margin-bottom: 0; }

/* Lista de hitos dentro de un mismo año (ej. 2024, que tiene varios logros) */
.tl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tl-items li { position: relative; padding-left: 16px; padding-bottom: 0; }
.tl-items li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--purple);
}

/* ============ Proyectos ============ */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: stretch; }
.project {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--purple);
  border-radius: var(--radius); padding: 28px; box-shadow: 0 2px 14px rgba(23, 36, 90, .06);
  display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.project:hover, .project:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(23, 36, 90, .12); }
.project h3 { margin: 0; font-size: 1.2rem; }
.project > p { margin: 0; }
.project-red { border-top-color: var(--red); }
.project-teal { border-top-color: var(--teal); }
.project-yellow { border-top-color: var(--yellow); }
.project-purple { border-top-color: var(--purple); }
.project-pink { border-top-color: var(--pink); }
.project:last-child {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 12px;
}
.project:last-child h3, .project:last-child .gallery { grid-column: 1 / -1; }

.checks { list-style: none; flex: 1; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: .95rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%;
  background: var(--lilac); box-shadow: inset 0 0 0 3px var(--purple);
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery span {
  aspect-ratio: 4 / 3; border-radius: 10px;
  background: repeating-linear-gradient(45deg, #f1eef4, #f1eef4 10px, #e9e4ee 10px, #e9e4ee 20px);
  border: 1px dashed #cfc7d8;
}
.gallery img { aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; width: 100%; height: 100%; }

/* ============ Eventos ============ */
.events-carousel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.events-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: 4px 4px 8px;
}
.events-track::-webkit-scrollbar { display: none; }
.carousel-arrow {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--purple); display: grid; place-items: center; cursor: pointer;
  transition: background .2s, color .2s;
}
.carousel-arrow:hover, .carousel-arrow:focus-visible { background: var(--purple); color: #fff; }
.event-card {
  scroll-snap-align: start; flex: 0 0 calc(50% - 12px); min-width: 280px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 14px; cursor: pointer;
  box-shadow: 0 2px 14px rgba(20, 10, 40, .06); transition: transform .2s, box-shadow .2s;
}
.event-card:hover, .event-card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20, 10, 40, .12); }
.event-card h3 { margin: 0; }
.event-card > p { margin: 0; }
.event-date {
  align-self: flex-start; font-family: var(--font-head); font-weight: 600; font-size: .72rem;
  letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--purple);
  padding: 5px 14px; border-radius: 99px;
}
.event-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: var(--purple);
}
.event-card:hover .event-link, .event-card:focus-visible .event-link { color: var(--purple-deep); }

/* Ventana de detalle de evento */
.event-modal-backdrop {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(20, 10, 40, .55); backdrop-filter: blur(6px);
}
.event-modal-backdrop[hidden] { display: none; }
.event-modal {
  position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 20px; box-shadow: 0 30px 70px rgba(20, 10, 40, .35);
  display: grid; grid-template-columns: 1.1fr 1.3fr;
}
.event-modal-media { padding: 24px 0 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.event-modal-main {
  aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #f1eef4, #f1eef4 10px, #e9e4ee 10px, #e9e4ee 20px);
  border: 1px dashed #cfc7d8;
}
.event-modal-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-modal-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.event-modal-thumbs button {
  aspect-ratio: 1; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: repeating-linear-gradient(45deg, #f1eef4, #f1eef4 8px, #e9e4ee 8px, #e9e4ee 16px);
  border: 2px solid transparent;
}
.event-modal-thumbs button.active { border-color: var(--purple); }
.event-modal-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-modal-body { padding: 32px 28px; display: flex; flex-direction: column; gap: 10px; }
.event-modal-body h3 { font-size: 1.5rem; margin: 0; }
.event-modal-body p { margin: 0; }
.event-modal-body .event-date { margin-bottom: 4px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 1; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #fff; color: var(--navy); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}

/* Ventana de detalle de proyecto */
.project-modal-backdrop {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(20, 10, 40, .55); backdrop-filter: blur(6px);
}
.project-modal-backdrop[hidden] { display: none; }
.project-modal {
  position: relative; width: min(820px, 100%); min-height: 500px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 20px; box-shadow: 0 30px 70px rgba(20, 10, 40, .35);
  display: grid; grid-template-columns: .9fr 1.1fr;
}
.project-modal-media {
  aspect-ratio: 4 / 3; border-radius: 20px 0 0 20px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #f1eef4, #f1eef4 10px, #e9e4ee 10px, #e9e4ee 20px);
}
.project-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-modal-body { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.project-modal-body h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.project-modal-body p { margin: 0; }
.project-modal-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 6px; }
.modal-secondary-action {
  border: 0; background: none; color: var(--purple); font-family: var(--font-head); font-weight: 700;
  font-size: .85rem; padding: 4px 0; cursor: pointer;
}
.modal-secondary-action:hover { color: var(--purple-deep); }

/* ============ Pasos (usado dentro de la vía "Como voluntario") ============ */
.steps { list-style: none; margin: 20px 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 14px; color: var(--navy); font-weight: 500; }
.steps span {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: #fff; background: var(--purple);
}
.steps li:nth-child(2) span { background: var(--red); }
.steps li:nth-child(3) span { background: #d99a12; }
.steps li:nth-child(4) span { background: #26b99b; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600;
  font-size: .92rem; line-height: 1.3; padding: 14px 26px; border-radius: 99px; text-decoration: none;
  cursor: pointer; border: 2px solid transparent; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-deep); }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn svg { flex: none; }

/* ============ Sumate (como voluntario / donando dinero / donando materiales) ============ */
.ways-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: stretch; margin-top: 12px; }
.way-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--purple);
  border-radius: var(--radius); padding: 28px; box-shadow: 0 2px 14px rgba(23, 36, 90, .06);
  display: flex; flex-direction: column; gap: 10px;
}
.way-card h3 { margin: 0; }
.way-card > p { margin: 0; }
.way-card .bank { margin-top: auto; padding-top: 8px; }
.way-donar { border-top-color: var(--red); }
.way-materiales { border-top-color: var(--yellow); }
.way-badge {
  align-self: flex-start; font-family: var(--font-head); font-weight: 600; font-size: .72rem;
  letter-spacing: .05em; text-transform: uppercase; color: var(--purple); background: var(--lilac);
  padding: 5px 14px; border-radius: 99px;
}
.allies-note { margin: 32px 0 0; text-align: center; font-size: .95rem; }

.bank summary, .faq summary {
  cursor: pointer; font-weight: 600; color: var(--purple); list-style: none;
}
.bank summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.bank summary::before, .faq summary::before { content: "+"; display: inline-block; width: 1.2em; font-weight: 700; }
.bank[open] summary::before, .faq details[open] summary::before { content: "–"; }
.bank dl { margin: 14px 0 0; font-size: .9rem; }
.bank dt { font-weight: 600; color: var(--navy); }
.bank dd { margin: 0 0 8px; }

/* ============ Contacto ============ */
.contact-band {
  background: var(--purple); color: #fff; text-align: center; padding: 64px 0;
  position: relative;
}
.contact-band::after {
  content: ""; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  border: 12px solid transparent; border-top-color: var(--purple); border-bottom: 0;
}
.contact-band h2 { color: #fff; font-weight: 500; font-family: var(--font-body); font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .4em; }
.contact-band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 14px; }
.band-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 99px;
  border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; font-family: var(--font-head); font-weight: 600;
  font-size: .95rem; text-decoration: none; transition: background .2s, border-color .2s, transform .2s;
}
.band-link svg { flex: none; }
.band-link:hover { background: rgba(255, 255, 255, .12); border-color: #fff; transform: translateY(-2px); }

.contact-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.form { display: grid; gap: 16px; margin-top: 24px; }
.form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--navy); }
.form .opt { font-weight: 400; text-transform: none; color: var(--text); }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--navy);
  padding: 12px 14px; border: 1px solid #cfcfd8; border-radius: 10px; background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(85, 0, 122, .25); border-color: var(--purple); }
.form button { justify-self: start; border: 0; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.4em; }
.form-status.error { color: #b3261e; }
.form-alt { margin: 16px 0 0; font-size: .88rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { color: var(--navy); }
.faq details p { margin: 10px 0 0 1.2em; font-size: .95rem; }

/* ============ Pie de página ============ */
.site-footer {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 58%, var(--purple) 100%);
  color: rgba(255, 255, 255, .78); padding: 72px 0 24px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr 1.3fr; gap: 32px;
}
.footer-brand img { width: 170px; height: auto; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-weight: 500; font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; font-size: .85rem; line-height: 1.5; }
.footer-col p { font-size: .85rem; line-height: 1.6; }
.footer-col a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col .more { color: var(--yellow); font-size: .9rem; }
.footer-legal { max-width: var(--maxw); margin: 48px auto 0; padding: 20px var(--gutter) 0; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .8rem; color: rgba(255, 255, 255, .55); }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .footer-inner { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --header-h: 76px; }
  .brand img { width: 64px; }

  .nav-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; border: 0; background: none; cursor: pointer; border-radius: 8px;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 8px var(--gutter) 20px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, .1);
  }
  .nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: .85rem; }
  .sub { position: static; box-shadow: none; border-top: 0; padding: 0 0 10px 12px; min-width: 0; }

  .hero {
    padding-top: 68px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 55%, var(--purple) 100%);
  }
  /* En desktop el resplandor usa height:100% de una caja baja y ancha (mancha chica en la
     esquina). En mobile el hero es mucho más alto (el contenido se apila), así que esa misma
     regla lo estiraba en una franja rosada de arriba a abajo. Se lo fija a un alto acotado. */
  .hero::after { width: 90%; height: 480px; top: -14%; right: -30%; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
  .hero-photo { aspect-ratio: 4 / 3.4; max-height: 320px; }
  .hero-slide figcaption strong { font-size: 1.05rem; }
  .hero-stats { flex-direction: column; gap: 12px; padding: 22px 0 28px; }

  .grid-2, .projects, .historia, .ways-grid, .contact-split { grid-template-columns: 1fr; gap: 28px; }
  .project:last-child { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }

  /* Tarjetas de Proyectos: menos padding y letra un toque más chica para que el
     contenedor no se haga tan largo y las fotos ganen peso relativo. */
  .project { padding: 20px; gap: 10px; }
  .project > p { font-size: .92rem; line-height: 1.55; }
  .project .checks li { font-size: .88rem; margin-bottom: 6px; }

  .events-carousel { gap: 8px; }
  .carousel-arrow { width: 34px; height: 34px; }
  .event-card { flex-basis: 100%; min-width: 0; padding: 18px; gap: 10px; }
  .event-card .ph-note { display: none; }
  .event-card .event-text { font-size: .92rem; }

  .event-modal { grid-template-columns: 1fr; max-height: calc(100vh - 24px); }
  .event-modal-media { padding: 20px 20px 0; }
  .event-modal-body { padding: 20px; }

  /* El modal de Proyecto usa min-height:500px en escritorio para que la foto mida lo
     mismo en las 5 áreas (ver más abajo). En mobile el layout se apila (foto arriba,
     texto abajo) y ese mínimo lo hacía innecesariamente alto; se saca acá. */
  .project-modal { grid-template-columns: 1fr; min-height: 0; max-height: calc(100vh - 24px); }
  .project-modal-media { border-radius: 20px 20px 0 0; }
  .project-modal-body { padding: 24px; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .card { padding: 24px; }
  .btn-row .btn { width: 100%; text-align: center; }
}

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