/* Daño Cerebral Sevilla — web pública (cutover .org) */

:root {
  --blue: #003f85;
  --blue-2: #0057b8;
  --blue-soft: #e8f0fb;
  --green: #00b84d;
  --green-d: #007a34;
  --magenta: #c2185b;
  --ink: #10243a;
  --muted: #4d647a;
  --line: rgba(16, 36, 58, .12);
  --bg: #f7f9fc;
  --white: #fff;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { max-width: 720px; }

.staging-banner {
  background: #10243a;
  color: #fff;
  text-align: center;
  font-size: .88rem;
  padding: .55rem 1rem;
}
.staging-banner a { color: #8fd6ff; text-decoration: underline; margin-left: .5rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 247, 252, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  min-height: var(--header);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
}
.brand img { width: 64px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: .95rem; color: var(--blue); }
.brand-text em { font-style: normal; font-family: var(--serif); font-size: 1.15rem; color: var(--green-d); }

.nav { display: flex; align-items: center; gap: 1rem; }
.nav ul { display: flex; gap: .15rem; flex-wrap: wrap; }
.nav a {
  display: inline-flex; padding: .55rem .7rem; border-radius: 999px;
  font-size: .92rem; font-weight: 600; color: var(--ink);
}
.nav a[aria-current="page"], .nav a:hover { background: var(--blue-soft); color: var(--blue); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  padding: 10px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.35rem; border-radius: 999px;
  font-weight: 800; letter-spacing: .01em; border: 2px solid transparent;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
/* Contraste alto: texto claro sobre fondo oscuro (WCAG) */
.btn-primary { background: #002a5c; color: #fff !important; }
.btn-primary:hover { background: #003f85; color: #fff !important; }
.btn-donate { background: #007a34; color: #fff !important; }
.btn-donate:hover { background: #005c27; color: #fff !important; }
.btn-donate--lg { min-height: 56px; padding: .9rem 2rem; font-size: 1.1rem; }
.btn-ghost { background: rgba(0,0,0,.45); color: #fff !important; border-color: #fff; }
.btn-outline { background: #fff; color: #002a5c !important; border-color: #002a5c; }
.btn-outline:hover { background: #002a5c; color: #fff !important; }

.hero {
  position: relative;
  min-height: clamp(420px, 62vh, 620px);
  display: grid; align-items: center; color: #fff;
  overflow: hidden;
  /* Reserva espacio estable (evita “corte” / CLS al cargar) */
  content-visibility: auto;
}
.hero--photo .hero-media {
  position: absolute; inset: 0;
  background-color: #10243a;
  background-size: cover; background-position: center;
  transform: scale(1.02);
}
@media (prefers-reduced-motion: no-preference) {
  .hero--photo .hero-media {
    animation: heroDrift 28s ease-in-out infinite alternate;
  }
}
.hero--photo .hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,36,58,.32), rgba(16,36,58,.58));
}
@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to { transform: scale(1.06) translate3d(-0.6%, 0.6%, 0); }
}
.hero-content {
  position: relative; z-index: 1;
  padding: clamp(3rem, 8vh, 5rem) 0;
}
.hero-content--center { text-align: center; }
.hero-quote {
  margin: 0 auto;
  max-width: min(22ch, 100%);
  padding-inline: .25rem;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.65rem, 4.2vw, 2.75rem); line-height: 1.3;
  color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.45);
  /* Evita reflujo brusco al llegar Fraunces */
  font-size-adjust: 0.5;
}

.section { padding: 4.5rem 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-mission { text-align: center; padding-top: 3rem; padding-bottom: 2rem; }
.home-years {
  font-family: var(--sans); font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 800; line-height: 1.35; color: #2c3e50; text-transform: uppercase;
}
.home-years-accent { color: var(--magenta); display: inline; }
.section-head { margin-bottom: 2rem; max-width: 40rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head p { color: var(--muted); }
.section-more { margin-top: 2rem; }

.icon-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
  text-align: center;
}
.icon-card {
  display: grid; gap: .75rem; justify-items: center; padding: .5rem;
  transition: transform .25s var(--ease);
}
.icon-card:hover { transform: translateY(-4px); }
.icon-circle {
  width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.7rem; font-weight: 800;
  color: #fff; box-shadow: 0 10px 28px rgba(16,36,58,.18);
}
.icon-card--gold .icon-circle { background: #d4a017; }
.icon-card--gold strong { color: #8a6a00; }
.icon-card--green .icon-circle { background: #1b5e20; }
.icon-card--green strong { color: #1b5e20; }
.icon-card--lime .icon-circle { background: #558b2f; }
.icon-card--lime strong { color: #33691e; }
.icon-card--pink .icon-circle { background: #ad1457; }
.icon-card--pink strong { color: #880e4f; }
.icon-card--forest .icon-circle { background: #1b4332; }
.icon-card--forest strong { color: #1b4332; }
.icon-card strong {
  font-size: .82rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; max-width: 12ch; line-height: 1.25;
}

.section-mural { background: #fff; }
.mural-fig { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,63,133,.14); }
.mural-fig img { width: 100%; height: auto; }

.quality-row {
  display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center;
  text-align: center;
}
.quality-logo { width: min(280px, 70vw); height: auto; }
.quality-seal { width: 140px; height: auto; margin: 1rem auto 0; }
.quality-link a {
  color: var(--blue-2); font-weight: 800; font-size: 1.05rem;
  text-decoration: underline; text-underline-offset: 3px;
}

.section-centro {
  position: relative; color: #fff; text-align: center;
  /* Sin foto extra: evita segunda descarga del hero (~95 KiB) */
  background: linear-gradient(145deg, #0a1424 0%, #003f85 55%, #005c27 120%);
  padding: 5rem 0;
}
.centro-in h2 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); }
.centro-in p { max-width: 36rem; margin: 0 auto 1.5rem; color: rgba(255,255,255,.92); }
.centro-more a { color: #fff; font-weight: 700; text-decoration: underline; }

.action-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.action {
  display: grid; gap: .35rem; padding: 1.4rem;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.action:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,63,133,.12); }
.action-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-d); }
.action strong { font-size: 1.25rem; font-family: var(--serif); }
.action span:last-child { color: var(--muted); font-size: .95rem; }

.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.pillars article {
  padding: 1.25rem; border-radius: 20px; background: var(--blue-soft);
}
.pillars h3 { font-size: 1.15rem; color: var(--blue); }
.pillars p { color: var(--muted); margin: 0; font-size: .95rem; }

.split {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center;
}
.split-note {
  background: linear-gradient(160deg, var(--blue), #0a5a9c);
  color: #fff; border-radius: 24px; padding: 1.6rem;
}
.split-note p { color: rgba(255,255,255,.9); }
.split-note strong { color: #fff; }

.page-hero {
  padding: 3.5rem 0 2rem;
  background: linear-gradient(180deg, #e8f0fb, transparent);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 16ch; }
.eyebrow {
  display: inline-block; margin: 0 0 .75rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-d);
}
.prose {
  font-size: 1.05rem;
}
.prose h2, .prose h3, .prose h4 {
  margin-top: 1.6em;
  color: var(--blue);
}
.prose img {
  border-radius: 16px;
  margin: 1.2rem auto;
  max-width: min(100%, 720px);
}
/* Botones / CTAs tipo Avada (dona 5€, hazte socio…): no a ancho completo */
.prose img[src*="boton-"],
.prose img[src*="/dona-"],
.prose img[src*="utilidad-publica"],
.prose img[src*="beneficios-fiscales"] {
  max-width: min(100%, 200px);
  border-radius: 12px;
  margin: .6rem auto;
}
.prose .cta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
  justify-items: center;
  margin: 1.2rem 0 1.6rem;
  max-width: 720px;
}
.prose .cta-row > p { margin: 0; width: 100%; }
.prose .cta-row img {
  max-width: min(100%, 200px);
  margin: 0 auto;
  border-radius: 12px;
}
.prose a { color: var(--blue-2); text-decoration: underline; text-underline-offset: 2px; }
/* Botones de documentos (transparencia, etc.): contraste alto forzado */
.prose a.btn,
.prose .btn {
  text-decoration: none; margin: .35rem .35rem .35rem 0;
  background: #002a5c !important; color: #fff !important;
  border-color: #002a5c !important;
  display: inline-flex;
}
.prose a.btn:hover,
.prose .btn:hover { background: #0057b8 !important; color: #fff !important; }
.prose a.btn-donate,
.prose .btn-donate { background: #007a34 !important; border-color: #007a34 !important; color: #fff !important; }
.prose a.btn-outline,
.prose .btn-outline {
  background: #fff !important; color: #002a5c !important; border-color: #002a5c !important;
}
.prose ul, .prose ol { margin: 0 0 1em 1.2em; padding: 0; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; background: #fff; }
.prose code {
  background: #fff; border: 1px solid var(--line); padding: .15rem .45rem; border-radius: 8px;
}
.article-meta { color: var(--muted); font-size: .95rem; }
.news-list { display: grid; gap: .75rem; }
.news-item {
  display: grid; gap: .2rem; padding: 1rem 1.15rem;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.news-item:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,63,133,.1); }
.news-item time { color: var(--muted); font-size: .85rem; font-weight: 600; }
.news-item strong { font-size: 1.05rem; color: var(--blue); }
.pager {
  display: flex; gap: 1rem; align-items: center; justify-content: center;
  margin-top: 2rem; flex-wrap: wrap;
}
.pager a { font-weight: 700; color: var(--blue); }

#formulario-socio { scroll-margin-top: calc(var(--header) + 1rem); }
.donate-box {
  margin-top: 2.5rem; padding: 1.5rem;
  background: linear-gradient(160deg, #e8f0fb, #f3fcf6);
  border: 1px solid var(--line); border-radius: 22px;
}
.donate-box h2 { color: var(--blue); font-size: 1.5rem; }
.donate-form {
  display: grid; gap: .9rem; max-width: 420px; margin-top: 1rem;
}
.donate-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.donate-form input, .donate-form select {
  min-height: 48px; border: 1px solid var(--line); border-radius: 12px;
  padding: .6rem .8rem; background: #fff; font: inherit;
}

.form-error {
  background: #fde8e8; color: #8a1f1f; border: 1px solid #f5b5b5;
  padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.25rem;
}
.socio-ficha-form { display: grid; gap: 1.5rem; margin: 0 0 3rem; }
.socio-ficha-form fieldset {
  margin: 0; padding: 1.25rem 1.35rem 1.4rem;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
}
.socio-ficha-form legend {
  font-family: var(--serif); font-weight: 650; color: var(--blue);
  padding: 0 .35rem; font-size: 1.15rem;
}
.socio-ficha-form .hint { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; }
.socio-ficha-form .form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem;
}
.socio-ficha-form label {
  display: grid; gap: .35rem; font-weight: 600; font-size: .92rem;
}
.socio-ficha-form label.full { grid-column: 1 / -1; }
.socio-ficha-form label.check {
  display: flex; align-items: flex-start; gap: .55rem; font-weight: 500;
  grid-column: 1 / -1;
}
.socio-ficha-form label.check input { margin-top: .2rem; }
.socio-ficha-form input,
.socio-ficha-form select,
.socio-ficha-form textarea {
  min-height: 48px; border: 1px solid var(--line); border-radius: 12px;
  padding: .6rem .8rem; background: #fff; font: inherit; width: 100%;
}
.socio-ficha-form textarea { min-height: 96px; resize: vertical; }
.socio-ficha-form .btn-donate { justify-self: start; margin-top: .25rem; }
@media (max-width: 640px) {
  .socio-ficha-form .form-grid-2 { grid-template-columns: 1fr; }
}

.site-footer {
  background: #0b1f36; color: rgba(255,255,255,.86); padding: 3rem 0 1.5rem; margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem;
}
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: .25rem; }
.footer-tag, .footer-contact { color: rgba(255,255,255,.72); }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .75rem; }
.footer-links { display: grid; gap: .4rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; font-size: .9rem; color: rgba(255,255,255,.55); }

@media (max-width: 920px) {
  .action-row, .pillars, .split, .footer-grid, .icon-row { grid-template-columns: 1fr 1fr; }
  .icon-row { gap: 1.25rem; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: calc(var(--header) + 34px) 0 auto 0;
    display: none; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 1rem;
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; }
  .btn-donate { width: auto; justify-content: center; }
}
@media (max-width: 560px) {
  .icon-row { grid-template-columns: 1fr; }
}
