/* Federación Red Micelio (FERM) — hoja de estilos única.
   Colores y tipografías tomados de la web original (Elementor). */

@font-face { font-family: 'Georama'; src: url('/fonts/Georama-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Georama'; src: url('/fonts/Georama-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Georama'; src: url('/fonts/Georama-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
/* Alegreya (Juan Pablo del Peral, licencia libre SIL OFL) sustituye a Kefa, que era de Apple y no tenía licencia para webs */
@font-face { font-family: 'Alegreya'; src: url('/fonts/Alegreya-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ink: #3E354F;        /* morado oscuro (primary) */
  --paper: #EFEFEF;      /* gris claro de fondo */
  --grey: #B8BAB9;       /* gris de iconos y créditos */
  --link: #C02D5E;       /* enlaces dentro del texto (un poco más oscuro que #CC3366: contraste ≥ 4,5 sobre el gris) */
  --sans: 'Georama', system-ui, sans-serif;
  --serif: 'Alegreya', Georgia, serif;
  --wide: 1140px;
  --narrow: 1000px;
  --gutter: 24px;
  --r-box: 16px;          /* esquinas de tarjetas y recuadros */
  --r-btn: 10px;          /* esquinas de botones y campos */
  --topbar: 44px;
  --navbar: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--navbar) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.5 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3, p { margin: 0; }
.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Tipografía de bloques ---------- */
.title { font: 700 44px/1.1 var(--sans); }
.sec--hero .title { font-size: 52px; }
.title-md { font: 700 30px/1.2 var(--sans); }
.title-sm { font: 700 24px/1.2 var(--sans); }
.kicker { font: 400 24px/1.2 var(--serif); }
.center { text-align: center; }
.rule { width: 20%; min-width: 80px; height: 0; margin: 5px 0; border: 0; border-top: 2px solid currentColor; }
.center .rule, .rule.center { margin-left: auto; margin-right: auto; }
.prose { text-align: justify; }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol, .prose ol + p { margin-top: 14px; }
.prose.beneficios { text-align: left; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 36px; align-items: start; }
.prose.beneficios p + p { margin-top: 0; }
@media (max-width: 900px) { .prose.beneficios { grid-template-columns: 1fr; } }
.prose ul, .prose ol { margin: 0; padding-left: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose a { color: inherit; text-underline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; align-self: flex-start; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--r-btn);
  background: transparent; color: var(--ink); font: 700 18px/18px var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--paper); box-shadow: 0 0 10px rgba(0, 0, 0, .5); }
.center .btn, .btn-row .btn, .btn.mid { align-self: center; }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 10px; }
/* Botones parejos: mismo ancho, uno al lado del otro */
.btn-row--eq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 560px); margin: 0 auto; }
.btn-row--eq .btn { width: 100%; text-align: center; }

/* ---------- Secciones ---------- */
.sec { padding: 60px 12px; border-bottom: 2px solid var(--ink); }
.sec--dark { background: var(--ink); color: var(--paper); }
.sec--dark .btn { border-color: var(--paper); color: var(--paper); }
.sec--dark .btn:hover, .sec--dark .btn:focus-visible { background: var(--paper); color: var(--ink); }
.wrap { display: flex; flex-direction: column; gap: 20px; max-width: var(--narrow); margin: 0 auto; }
.sec--split .wrap, .sec--logo .wrap { max-width: var(--wide); }
.sec--split .wrap { flex-direction: row; gap: 0; }
.sec--split .col { flex: 1 1 50%; padding: 10px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.col { display: flex; flex-direction: column; gap: 20px; }
.sec--hero { min-height: min(90vh, 900px); display: flex; align-items: center; padding: 10px; }
.sec--hero .wrap { width: 100%; }
.sec--hero .rule { margin: 9px 0; }
.sec--logo { padding: 42px 12px; }
.sec--logo .pic img { width: 114px; margin: 0 auto; }
.sec--quote { padding-bottom: 90px; }
.sec--tight { padding: 60px 12px; }
.sec + .sec { border-top: 0; }

/* Imágenes recortadas en círculo (máscara circular del original) */
.circle { margin: 0; display: flex; justify-content: center; }
.circle img { width: min(100%, var(--d, 440px)); aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.pic { margin: 0; }

/* Franjas de foto a todo el ancho */
.band { position: relative; height: 340px; background: var(--ink); border-bottom: 2px solid var(--ink);
  clip-path: inset(0 0 0 0); -webkit-clip-path: inset(0 0 0 0); isolation: isolate; }
/* Foto anclada (como en AYNI): la imagen queda fija a la pantalla y la franja hace de ventana.
   Funciona también en móvil y en iPhone, a diferencia de background-attachment: fixed. */
.band .bg-fixed-img { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; max-width: none;
  object-fit: cover; object-position: center; z-index: -1; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .band .bg-fixed-img { position: absolute; height: 100%; } }

/* ---------- Acordeón ---------- */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion details { border: 2px solid var(--ink); border-radius: var(--r-box); background: var(--paper); overflow: hidden; }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 18px; font: 700 18px/1.3 var(--sans);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ''; flex: none; width: 10px; height: 10px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.accordion details[open] summary { background: var(--ink); color: var(--paper); }
.accordion details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.accordion .prose { padding: 16px 18px 18px; }

/* Código ético completo (réplica del PDF) */
.codigo { padding: 22px 26px 26px; font-size: 17px; line-height: 1.5; }
.codigo h2 { font: 700 22px/1.3 var(--sans); text-align: center; margin-bottom: 22px; }
.codigo h3 { font: 700 17px/1.3 var(--sans); margin: 34px 0 16px; padding-left: 1.6em; }
.codigo p + p { margin-top: 14px; }
.codigo ol { margin: 0; padding-left: 3.2em; }
.codigo li { padding-left: .6em; }
.codigo li + li { margin-top: 12px; }
.codigo a { color: inherit; text-underline-offset: 3px; }
.codigo sup a { text-decoration: none; font-weight: 700; }
.codigo .nota { margin-top: 24px; padding-top: 12px; border-top: 1px solid currentColor; font-size: 14px; }
@media (max-width: 767px) { .codigo { padding: 16px 14px 20px; font-size: 16px; } .codigo ol { padding-left: 2em; } .codigo h3 { padding-left: 0; } }

/* Tarjetas (blog): títulos, textos y enlaces alineados por fila con subgrid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 12px; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-box); padding: 0 0 22px; overflow: hidden; }
.card > *:not(.card-img) { margin: 0 22px; }
.card-img { display: block; aspect-ratio: 16 / 10; background: var(--ink); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-meta { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #6d6680; }
.card-title { font: 700 22px/1.2 var(--sans); }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-text { font-size: 16px; line-height: 1.5; }
.card-more { align-self: end; font-weight: 700; color: var(--ink); text-decoration: none; }
.card-more:hover { text-decoration: underline; }
.wide { max-width: var(--wide) !important; }

/* Página del taller: datos rápidos, tarjetas de temas (sin imagen), dos columnas y formulario */
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.facts li { padding: 6px 12px; border: 2px solid currentColor; border-radius: var(--r-btn); font-weight: 700; font-size: 15px; line-height: 1.3; }
.cards--topics { grid-template-columns: repeat(4, 1fr); gap: 24px; }  /* 8 tarjetas: 4 + 4, o 2 por fila en tablet */
@media (max-width: 1000px) { .cards--topics { grid-template-columns: repeat(2, 1fr); } }
.card--topic { grid-row: span 3; padding: 22px 0 24px; }
.card--topic .card-meta { font-weight: 700; }
.card--topic .card-title { font-size: 20px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; align-items: start; }
.duo .prose { text-align: left; }
.form-taller { width: 100%; max-width: 440px; align-self: center; }
.form.form-taller .btn { justify-self: stretch; align-self: stretch; text-align: center; }
.small { font-size: 14px; }
.pasos { list-style: none; margin: 0 auto 18px; padding: 0; max-width: 560px; display: grid; gap: 18px; counter-reset: none; }
.pasos li { border: 2px solid var(--ink); border-radius: var(--r-box); padding: 18px 20px 20px; }
.pasos .btn { margin-top: 14px; }
.pasos [hidden] { display: none; }
@media (max-width: 767px) { .duo { grid-template-columns: 1fr; gap: 36px; } }

/* Artículos del blog */
.post-meta { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.post-back { font-weight: 700; color: var(--ink); }
.post-cover { margin: 0; }
.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-box); }
.post-cover figcaption { font-size: 13px; margin-top: 6px; color: #6d6680; }
.prose h2 { font: 700 26px/1.2 var(--sans); margin: 34px 0 12px; text-align: left; }
.prose h3 { font: 700 20px/1.25 var(--sans); margin: 26px 0 10px; text-align: left; }

/* Listas de recursos y estudios (Marco legal, Ciencia) */
.refs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.refs-head { font: 700 20px/1.3 var(--sans); margin: 34px 0 14px; }
.prose + .refs-head { margin-top: 28px; }
.ref { background: #fff; border: 2px solid var(--ink); border-radius: var(--r-box); padding: 16px 20px; }
.ref-meta { font-size: 13px; letter-spacing: .03em; color: #6d6680; margin-bottom: 4px; }
.ref h3 { font: 700 18px/1.3 var(--sans); margin-bottom: 6px; }
.ref h3 a { color: var(--ink); }
.ref p:last-child { font-size: 16px; line-height: 1.5; }
.sec--dark .ref { background: transparent; border-color: var(--paper); }
.sec--dark .ref h3 a, .sec--dark .ref-meta { color: var(--paper); }
.toc { display: flex; flex-wrap: wrap; gap: 10px; }
.toc a { padding: 6px 12px; border: 2px solid currentColor; border-radius: var(--r-btn); color: inherit; font-weight: 700; font-size: 15px; text-decoration: none; }
.toc a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.note-legal { font-size: 15px; font-style: italic; }

/* Carrusel móvil con barra de progreso */
.swipe-hint { display: none; }
@media (max-width: 760px) {
  .cards, .apoya-cards { display: flex !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding-inline: 22px; gap: 14px; margin-inline: -22px; padding: 6px 22px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cards::-webkit-scrollbar, .apoya-cards::-webkit-scrollbar { display: none; }
  .apoya-card { display: flex; flex-direction: column; gap: 12px; }
  .apoya .swipe-progress { background: rgba(239, 239, 239, .3); }
  .apoya .swipe-progress span { background: var(--paper); }
  .apoya .swipe-label { color: var(--paper); }
  .cards > *, .apoya-cards > * { flex: 0 0 84%; scroll-snap-align: start; min-width: 0; display: flex; flex-direction: column; }
  .cards .card-more { margin-top: auto; align-self: flex-start; }
  .swipe-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
  .swipe-progress { flex: 1; max-width: 180px; height: 3px; border-radius: 999px; background: #cfcad6; overflow: hidden; }
  .swipe-progress span { display: block; height: 100%; background: var(--ink); border-radius: inherit; transform-origin: left center; transform: scaleX(0); transition: transform .15s linear; }
  .swipe-label { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: #6d6680; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
  .swipe-label::after { content: "→"; animation: swipeNudge 1.6s ease-in-out infinite; }
  @keyframes swipeNudge { 0%, 100% { transform: none; } 50% { transform: translateX(5px); } }
}
@media (prefers-reduced-motion: reduce) { .swipe-label::after { animation: none; } }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: calc(-1 * var(--topbar)); z-index: 100; }
.topbar { position: relative; height: var(--topbar); background: var(--ink); display: flex; justify-content: center; align-items: center; gap: 14px; }
.tb-social { display: flex; gap: 14px; }
.topbar .tb-social a { display: grid; place-items: center; width: 30px; height: 30px; color: var(--grey); transition: color .2s; }
.topbar .tb-social a:hover { color: var(--paper); }
.topbar svg { width: 16px; height: 16px; fill: currentColor; }
.navbar { position: relative; height: var(--navbar); background: var(--paper); border-bottom: 2px solid var(--ink); }
.navbar .inner { max-width: calc(var(--wide) + 2 * var(--gutter)); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex-shrink: 0; text-decoration: none; }
/* Logo de FERM: emblema + FERM y, debajo, «Federación Red Micelio» al mismo ancho (imágenes originales) */
.logo img { display: block; width: 110px; height: auto; transition: width .45s ease; }
.navbar { transition: height .45s ease; }
.menu a { white-space: nowrap; }
/* Cabecera que se encoge al hacer scroll (como AYNI): arriba logo grande, al bajar compacta.
   script.js mide si el logo grande cabe junto al menú; si no, .hdr-tight lo deja compacto. .hdr-ml lo fuerza solo al medir. */
.site-header:not(.scrolled):not(.hdr-tight) .navbar, .site-header.hdr-ml .navbar { height: 104px; }
.site-header:not(.scrolled):not(.hdr-tight) .logo img, .site-header.hdr-ml .logo img { width: 180px; }
.site-header.hdr-noanim *, .site-header.hdr-ml * { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .navbar, .logo img { transition: none; } }
.menu { margin-left: auto; }
.menu > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.menu li { position: relative; }
.menu a { display: flex; align-items: center; gap: 6px; padding: 13px 14px; color: var(--ink); font: 400 15px/20px var(--sans); text-decoration: none; position: relative; }
.menu > ul > li > a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; background: var(--ink); opacity: 0; transition: opacity .2s; }
.menu > ul > li > a:hover::after, .menu > ul > li > a[aria-current]::after, .menu > ul > li.current > a::after { opacity: 1; }
.menu .chev { width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); margin-left: 4px; }
.menu .sub { list-style: none; margin: 0; padding: 0; border-radius: var(--r-btn); overflow: hidden; position: absolute; top: 100%; left: 0; min-width: 190px; background: var(--paper); border: 2px solid var(--ink); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; }
.menu li:hover > .sub, .menu li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.menu .sub a { padding: 10px 20px; white-space: nowrap; }
.menu .sub a:hover, .menu .sub a[aria-current] { background: var(--ink); color: var(--paper); }
.lang-menu { position: relative; margin-left: 24px; }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: var(--r-btn); font: 700 13px/1 var(--sans); letter-spacing: .06em; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.lang-menu[open] summary { background: var(--ink); color: var(--paper); }
.lang-menu ul { list-style: none; margin: 0; padding: 0; border-radius: var(--r-btn); overflow: hidden; position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; background: var(--paper); border: 2px solid var(--ink); z-index: 10; }
.lang-menu a { display: block; padding: 9px 16px; color: var(--ink); font-size: 15px; text-decoration: none; }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--ink); color: var(--paper); }
.burger { display: none; place-items: center; width: 44px; height: 44px; background: none; border: 0; padding: 0; margin-right: -11px; color: var(--ink); cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background-color .2s; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; }
.burger span::before { top: -7px; } .burger span::after { top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 10px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--r-btn); background: var(--paper);
  color: var(--ink); font: 400 16px/1.4 var(--sans);
}
.form input::placeholder, .form textarea::placeholder { color: #8e8899; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; background: var(--paper); }
.form .btn:hover { background: var(--ink); }
.form .note { font-size: 15px; min-height: 1.4em; }
.form-contact { max-width: 840px; margin: 0 auto; width: 100%; }
.form-contact .row2 { gap: 32px; }
.form-contact input, .form-contact textarea { border-color: transparent; background: #fff; }
.form-contact textarea { min-height: 200px; }
.form-contact .btn { margin-top: 6px; }
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.form .consent input { width: auto; margin-top: 3px; accent-color: var(--ink); }
.playoff-frame { width: 100%; min-height: 900px; border: 0; background: #fff; }

/* ---------- Pie ---------- */
/* Bloque «Apoya a la Federación»: dos tarjetas con título, texto y botón alineados (subgrid) */
.apoya { background: var(--ink); color: var(--paper); padding: 56px 12px; border-bottom: 2px solid var(--paper); }
.apoya .inner { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; } /* mismos bordes que las columnas del pie */
.apoya h2 { font: 700 34px/1.15 var(--sans); text-align: center; margin-bottom: 28px; }
.apoya-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.apoya-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 12px; border: 2px solid var(--paper); border-radius: var(--r-box); padding: 22px 24px 24px; }
.apoya-card h3 { font: 700 22px/1.2 var(--sans); }
.apoya-card p { font-size: 16px; line-height: 1.5; }
.apoya-card .btn { align-self: end; justify-self: start; border-color: var(--paper); color: var(--paper); }
.apoya-card .btn:hover, .apoya-card .btn:focus-visible { background: var(--paper); color: var(--ink); }
.mailing { display: grid; gap: 14px; align-content: start; min-width: 0; }
.mailing h2 { font: 700 18px/1.25 var(--sans); margin: 0; }
.mailing .form input { border-color: transparent; }
.mailing .form .btn { justify-self: stretch; text-align: center; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.mailing .form .btn:hover { background: transparent; color: var(--paper); }
.mailing .consent-txt { font-size: 12.5px; line-height: 1.5; color: var(--grey); }
.mailing .consent-txt a { color: var(--paper); }
.foot { background: var(--ink); color: var(--paper); padding: 56px 12px; }
.foot .inner { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 0 var(--gutter); }
.foot .flogo { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.foot .flogo img { width: 140px; height: auto; }
.fsocial { display: flex; gap: 10px; }
.fsocial a { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--paper); border-radius: 50%; color: var(--paper); transition: background .2s, color .2s; }
.fsocial a:hover { background: var(--paper); color: var(--ink); }
.fsocial svg { width: 18px; height: 18px; fill: currentColor; }
.foot nav { min-width: 0; }
.foot h2 { font: 700 18px/1.2 var(--sans); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.foot li { break-inside: avoid; }
.foot li a { display: block; padding: 5px 0; color: var(--paper); font-size: 14px; text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.copy { background: var(--ink); color: var(--paper); border-top: 2px solid var(--paper); padding: 40px 12px; text-align: center; }
.copy p { font: 700 11px/1.2 var(--sans); }
.copy p.policies { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin: 0 0 14px; font-size: 13px; font-weight: 400; color: var(--paper); }
.copy p.policies a { text-decoration: underline; text-underline-offset: 3px; }
.copy p + p { margin-top: 6px; font-size: 9px; color: var(--grey); }
.copy p.policies + p { margin-top: 0; font-size: 11px; color: var(--paper); }
@media (max-width: 1000px) {
  .foot .inner { grid-template-columns: auto minmax(0, 1fr); gap: 40px; }
  .foot .mailing { grid-column: 1 / -1; max-width: 520px; }
}
.copy a { color: inherit; text-decoration: none; }
.copy p.legal { margin: 8px auto 0; max-width: 760px; font-weight: 400; font-size: 10px; line-height: 1.6; }
.copy p.legal span { white-space: nowrap; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .title, .sec--hero .title { font-size: 38px; line-height: 1.1; }
  .kicker { font-size: 22px; }
}

/* ---------- Móvil y tablet estrecha: menú desplegable ---------- */
@media (max-width: 1180px) {
  .burger { display: grid; margin-left: 3px; }
  .lang-menu { margin-left: auto; }
  /* visibility: el menú cerrado no recibe el foco del teclado */
  .menu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 2px); margin: 0; background: var(--paper); max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s, visibility 0s .3s; }
  .menu.open { visibility: visible; transition: max-height .3s; max-height: 80vh; overflow-y: auto; border-bottom: 2px solid var(--ink); box-shadow: 0 8px 16px rgba(0, 0, 0, .12); }
  .menu > ul { flex-direction: column; align-items: stretch; padding: 6px 0; }
  .menu a { padding: 12px var(--gutter); font-size: 16px; }
  .menu > ul > li > a::after { display: none; }
  .menu .chev { display: none; }
  .menu .sub { position: static; opacity: 1; visibility: visible; transform: none; border: 0; min-width: 0; }
  .menu .sub a { padding-left: calc(var(--gutter) + 18px); }
}
@media (max-width: 900px) {
  :root { --navbar: 60px; }
  .site-header:not(.scrolled):not(.hdr-tight) .navbar, .site-header.hdr-ml .navbar { height: 84px; }
  .site-header:not(.scrolled):not(.hdr-tight) .logo img, .site-header.hdr-ml .logo img { width: 140px; }
  .sec--split .wrap { flex-direction: column; gap: 30px; max-width: var(--narrow); }
  .sec--split .col { padding: 0; }
  .sec--hero { min-height: 0; padding: 50px 22px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .title, .sec--hero .title { font-size: 30px; line-height: 1.2; }
  .title-md { font-size: 24px; }
  .kicker { font-size: 19px; line-height: 1.15; }
  .sec { padding: 40px 22px; }
  .sec--hero { min-height: 0; padding: 30px 22px; }
  .btn, .center .btn { align-self: center; }
  .btn-row { flex-direction: column; align-items: center; padding: 0; }
  .btn-row .btn { width: min(100%, 300px); text-align: center; }
  .btn-row--eq { display: flex; }
  .band { height: 220px; }
  .form .row2, .form-contact .row2 { grid-template-columns: 1fr; gap: 10px; }
  .foot .inner { grid-template-columns: 1fr; gap: 36px; }
  .foot .mailing { max-width: none; }
  .apoya { padding: 40px 12px; }
  .apoya h2 { font-size: 26px; }
  .apoya-card { display: flex; flex-direction: column; gap: 12px; }
  .apoya-card .btn { margin-top: auto; }
  .foot nav { text-align: left; }
  .foot ul { columns: 2; }
}

/* ---------- Botones flotantes: «Volver» (izquierda) y «Subir» (derecha) ---------- */
/* Mismo estilo que EI Amazonía: negro translúcido, esquinas casi rectas, discretos */
.back-float { position: fixed; left: 20px; bottom: 20px; z-index: 90; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px 0 11px; border-radius: 2px; background: rgba(0, 0, 0, .4); color: #fff; font: 600 13px/1 var(--sans); letter-spacing: .3px; text-decoration: none; transition: background .25s; }
.back-float:hover, .back-float:focus-visible { background: rgba(0, 0, 0, .72); }
.back-float svg { width: 15px; height: 15px; flex: none; }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 40px; height: 40px; border-radius: 2px; display: grid; place-items: center; background: rgba(0, 0, 0, .4); color: #fff; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background .25s; }
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: rgba(0, 0, 0, .7); }
.to-top svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .back-float { left: 14px; bottom: 14px; height: 38px; padding: 0 13px 0 9px; font-size: 12.5px; } .to-top { right: 14px; bottom: 14px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .back-float, .to-top { display: none; } }

/* ---------- Ventana emergente para formularios y enlaces externos ---------- */
body.dialog-open { overflow: hidden; }
dialog.web-window { width: min(1100px, calc(100vw - 32px)); height: min(880px, calc(100vh - 48px)); max-width: none; max-height: none; border: 2px solid var(--ink); border-radius: var(--r-box); padding: 0; background: #fff; color: var(--ink); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55); overflow: hidden; }
dialog.web-window[open] { display: flex; flex-direction: column; }
dialog.web-window::backdrop { background: rgba(40, 34, 51, .6); backdrop-filter: blur(3px); }
.ww-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; background: var(--paper); border-bottom: 2px solid var(--ink); flex: none; }
.ww-title { flex: 1; min-width: 0; margin: 0; font: 700 15px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ww-tab { font-size: 13px; color: var(--ink); white-space: nowrap; }
.ww-back, .ww-close { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.ww-back { font-size: 16px; }
.ww-back:hover, .ww-close:hover { background: var(--ink); color: #fff; }
.ww-body { position: relative; flex: 1; min-height: 0; background: #fff; }
.ww-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.ww-loading { position: absolute; top: 40%; left: 0; right: 0; margin: 0; text-align: center; color: #6b6478; font-size: 14px; }
.ww-body.ready .ww-loading { display: none; }
.ww-note { flex: none; margin: 0; padding: 8px 18px; font-size: 12px; color: #6b6478; background: var(--paper); border-top: 1px solid #d6d3dc; }
dialog.web-window.is-card { width: min(560px, calc(100vw - 32px)); height: fit-content; }
.is-card .ww-body { flex: none; }
.is-card .ww-note { display: none; }
.ww-card { padding: 28px; display: grid; gap: 12px; }
.ww-host { font: 700 22px/1.2 var(--sans); margin: 0; }
.ww-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.btn-ghost { background: transparent; }
@media (max-width: 760px) {
  dialog.web-window { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  dialog.web-window.is-card { width: calc(100vw - 24px); height: fit-content; border: 2px solid var(--ink); border-radius: var(--r-box); }
  .ww-bar { padding: 8px 8px 8px 14px; gap: 8px; }
  .ww-tab { font-size: 12px; white-space: normal; max-width: 34vw; text-align: right; line-height: 1.2; }
}

/* ---------- Aviso de cookies (abajo, sin tapar toda la página) ---------- */
.aviso-cookies { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 200; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; padding: 20px 22px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-box); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .55); display: grid; gap: 10px; font-size: 15px; line-height: 1.5; }
.aviso-cookies .ac-titulo { font: 700 18px/1.3 var(--sans); }
.aviso-cookies a { color: var(--ink); }
.ac-opciones[hidden] { display: none; }
.ac-opciones { display: grid; gap: 8px; padding: 8px 0; border-top: 1px solid #cfcbd6; }
.ac-opciones label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ac-opciones input { margin-top: 4px; accent-color: var(--ink); }
.ac-botones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ac-botones .btn { width: 100%; text-align: center; justify-content: center; cursor: pointer; }
.ac-botones .btn[hidden] { display: none; }
@media (max-width: 560px) { .ac-botones { grid-template-columns: 1fr 1fr; } .ac-botones .ac-conf, .ac-botones .ac-guardar { grid-column: 1 / -1; } }

/* ---------- Ventana emergente del taller ---------- */
dialog.taller-pop { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-sizing: border-box; padding: 34px 30px 28px; border: 2px solid var(--paper); border-radius: var(--r-box); background: var(--ink); color: var(--paper); text-align: center; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
dialog.taller-pop[open] { display: grid; gap: 14px; }
dialog.taller-pop::backdrop { background: rgba(40, 34, 51, .6); backdrop-filter: blur(3px); }
.taller-pop .kicker { font-size: 17px; }
.taller-pop .title-md { color: var(--paper); }
.taller-pop p { font-size: 16px; line-height: 1.5; }
.tp-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.taller-pop .btn { color: var(--paper); border-color: var(--paper); cursor: pointer; background: transparent; }
.taller-pop .btn:first-child { background: var(--paper); color: var(--ink); }
.tp-cerrar { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--paper); background: transparent; color: var(--paper); font-size: 20px; line-height: 1; cursor: pointer; }

/* ---------- Acceso entidades (zona privada de Playoff) ---------- */
.acceso { display: inline-flex; align-items: center; gap: 7px; color: var(--paper); text-decoration: none; font: 700 13px/1 var(--sans); letter-spacing: .02em; border: 1.5px solid currentColor; border-radius: 999px; padding: 6px 12px 6px 10px; transition: background .2s, color .2s; }
.acceso:hover, .acceso:focus-visible { background: var(--paper); color: var(--ink); }
.acceso svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.tb-acciones { position: absolute; right: max(var(--gutter), calc((100% - var(--wide)) / 2)); top: 50%; transform: translateY(-50%); display: flex; gap: 8px; align-items: center; }
.federa { display: inline-flex; align-items: center; background: var(--paper); color: var(--ink); text-decoration: none; font: 700 13px/1 var(--sans); letter-spacing: .02em; border: 1.5px solid var(--paper); border-radius: 999px; padding: 6px 12px; transition: background .2s, color .2s; }
.federa:hover, .federa:focus-visible { background: transparent; color: var(--paper); }
.federa .l-corto { display: none; }
.foot .acceso { margin-top: 4px; }
@media (max-width: 900px) { .topbar { justify-content: flex-start; padding-left: var(--gutter); } .tb-acciones { right: var(--gutter); } .federa .l-largo { display: none; } .federa .l-corto { display: inline; } }
@media (max-width: 560px) { .tb-acciones { gap: 6px; } .topbar .acceso { padding: 5px 10px 5px 8px; font-size: 12px; } .federa { padding: 5px 10px; font-size: 12px; } }

/* ---------- Recuadro destacado (p. ej. Centro de Apoyo de ICEERS) ---------- */
.destacado { display: grid; gap: 14px; justify-items: start; padding: 26px 28px; background: #fff; border: 2px solid var(--ink); border-left-width: 8px; border-radius: var(--r-box); }
.destacado .title-md { margin: 0; }
.destacado p { margin: 0; font-size: 17px; line-height: 1.55; }
@media (max-width: 767px) { .destacado { padding: 20px 18px; } .destacado .btn { align-self: stretch; text-align: center; } }

/* Bloque «En primera línea de la autorregulación» (portada) */
.sec--autorreg .prose { max-width: 820px; margin: 0 auto; }
.sec--autorreg .prose p { font-size: 19px; line-height: 1.6; text-align: center; }
@media (max-width: 767px) { .sec--autorreg .prose p { font-size: 17px; } }

/* Botón principal relleno (p. ej. «Federa tu asociación» en la portada) */
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-btns .btn { align-self: auto; }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover, .btn--solid:focus-visible { background: transparent; color: var(--ink); }
@media (max-width: 767px) { .hero-btns { justify-content: center; } }
@media (max-width: 400px) { .topbar .acceso span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .topbar .acceso { padding: 5px 7px; } }
.foot li a { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 400px) { .foot ul { columns: 1; } }
.title, .title-md { overflow-wrap: break-word; }

/* ---------- Adhesión: tabla comparativa, pasos y ventajas ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabla-wrap { overflow-x: auto; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-box); }
.comparativa { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.comparativa th, .comparativa td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #d6d3dc; }
.comparativa tr:last-child th, .comparativa tr:last-child td { border-bottom: 0; }
.comparativa thead th { background: var(--ink); color: var(--paper); font: 700 16px/1.3 var(--sans); }
.comparativa thead a { color: var(--paper); }
.comparativa tbody th { width: 22%; font-weight: 700; }
.comparativa .btn { font-size: 14px; line-height: 1.2; padding: 8px 12px; margin: 2px 4px 2px 0; }
.nota-aviso { margin: 0; padding: 14px 18px; background: #fff; border: 2px solid var(--ink); border-left-width: 8px; border-radius: var(--r-box); font-size: 16px; line-height: 1.5; }
.cards--pasos, .cards--ventajas { grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .cards--pasos, .cards--ventajas { grid-template-columns: repeat(2, 1fr); } }
.card--ventaja { grid-row: span 2; padding: 22px 0 24px; }
.card--topic.card--link { grid-row: span 4; }
.card-text ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.toc--codigo { padding: 14px 18px 4px; }
.toc--codigo a { font-size: 14px; }
.cards--dos { grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .cards--dos { grid-template-columns: 1fr; } }
.cards--modalidades { grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) and (min-width: 768px) { .cards--modalidades { grid-template-columns: 1fr; } }

/* Adhesión: tarjetas de modalidad (cabecera oscura, cuota grande, lista con iconos) */
.card--plan { grid-row: span 5; row-gap: 0; padding: 0 0 22px; }
.card--plan > .card-meta, .card--plan > .card-title, .card--plan > .plan-precio { margin: 0; padding: 0 22px; background: var(--ink); color: var(--paper); }
.card--plan > .card-meta { padding-top: 20px; color: #c9c3d6; }
.card--plan > .card-title { padding-top: 6px; }
.card--plan > .plan-precio { padding: 12px 22px 20px; font-size: 15px; }
.plan-precio strong { font: 700 38px/1 var(--sans); margin-right: 4px; }
.plan-list { list-style: none; margin: 18px 22px 18px !important; padding: 0; display: grid; gap: 10px; align-content: start; font-size: 15px; line-height: 1.4; }
.plan-list li { position: relative; padding-left: 30px; }
.plan-list li::before { position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.plan-list .si::before { content: "✓"; background: var(--ink); color: var(--paper); }
.plan-list .parcial::before { content: "–"; background: #fff; color: var(--ink); border: 2px solid var(--ink); width: 16px; height: 16px; }
.plan-list .no::before { content: "✕"; background: #e4e1ea; color: #6d6680; }
.plan-list .no { color: #6d6680; }
.card--plan > .card-meta, .card--plan > .card-title { box-shadow: 0 1px 0 var(--ink); }
/* Dos columnas con botón: título, raya, texto y botón alineados entre columnas */
.duo--cta .col { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 18px; }
.duo--cta .col > .btn { justify-self: start; align-self: end; margin-top: 14px; }
@media (min-width: 768px) { .duo--cta { grid-template-rows: repeat(4, auto); row-gap: 18px; } }
@media (max-width: 767px) { .duo--cta .col { grid-row: auto; grid-template-rows: none; } .duo--cta { row-gap: 48px; } }
.card-title { overflow-wrap: break-word; }
/* Título de portada: siempre en tres líneas fijas, sin guiones */
.title--lineas { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }
.title--lineas span { display: block; }
.sec--hero .col:has(> .title--lineas) { container-type: inline-size; }
.sec--hero .title--lineas { font-size: clamp(20px, 7.4cqi, 52px); }
.title--lineas span { white-space: nowrap; }

/* Adhesión: tabla de tres modalidades (de menos a más). Cada fila de contenido alineada entre columnas
   con subgrid; en el móvil, una columna debajo de otra (decisión de Adolf, 17/10/2026). */
.sec--wide-planes .wrap { max-width: var(--wide); }
.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { display: grid; grid-row: span 8; grid-template-rows: subgrid; row-gap: 0; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-box); overflow: hidden; }
.plan > .card-meta, .plan > .card-title, .plan > .plan-para, .plan > .plan-precio { margin: 0; padding: 0 22px; background: var(--ink); color: var(--paper); box-shadow: 0 1px 0 var(--ink); }
.plan > .card-meta { padding-top: 20px; color: #c9c3d6; }
.plan > .card-title { padding-top: 6px; font: 700 26px/1.15 var(--sans); }
.plan > .plan-para { padding-top: 4px; font-size: 15px; color: #e4e0ec; }
.plan > .plan-precio { padding: 14px 22px 20px; font-size: 15px; }
.plan .plan-list { margin: 18px 22px 8px !important; }
.plan--destacada { border-width: 3px; box-shadow: 0 14px 30px -18px rgba(62, 53, 79, .6); }
.plan--destacada > .card-meta::before { content: "★ "; color: var(--paper); }
.plan-mas { margin: 0 22px; border-top: 1px solid #d9d5e0; }
.plan-mas summary { cursor: pointer; list-style: none; padding: 12px 0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.plan-mas summary::-webkit-details-marker { display: none; }
.plan-mas summary::before { content: "▸"; transition: transform .15s; }
.plan-mas[open] summary::before { transform: rotate(90deg); }
.plan-mas ul { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.plan-btns { display: flex; flex-wrap: wrap; gap: 10px; align-self: stretch; align-content: flex-start; padding: 14px 22px 22px; border-top: 1px solid #d9d5e0; }
.plan-btns .btn { flex: 1 1 auto; text-align: center; }
.planes-nota { margin: 0; font-size: 16px; line-height: 1.5; text-align: center; }
@media (max-width: 900px) {
  .planes { grid-template-columns: 1fr; gap: 24px; }
  .plan { grid-row: auto; grid-template-rows: none; display: flex; flex-direction: column; }
  .plan-btns { margin-top: auto; }
}

/* Accesibilidad (auditoría 19/10/2026) */
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.sec--dark a:not(.btn), .apoya a:not(.btn), .foot a:not(.btn) { color: var(--paper); }
.sec--dark .prose a:not(.btn), .sec--dark p a:not(.btn) { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.form select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233E354F' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.form select:invalid { color: #6d6680; }
.form-intro { margin: 0 0 6px; font-size: 16px; line-height: 1.5; }
