/* ==========================================================================
   COSIENDO RESISTENCIA · aa-cr.css v5
   WCAG 2.2 nivel AA, con AAA en: contraste de texto 7:1 (1.4.6),
   objetivo táctil 44 px (2.5.5), foco visible reforzado (2.4.13),
   animación desactivable (2.3.3) y ancho de línea ≤ 80 caracteres (1.4.8).

   Contrastes medidos sobre el fondo lino #FDFBF7:
     carbón #1E2322 ......... 15,4:1
     terracota-texto ........ 9,1:1
     verde-oliva-oscuro ..... 9,4:1
     texto-suave ............ 8,6:1
     verde-oliva ............ 6,8:1  (AA; solo para bordes y decoración)
     terracota .............. 3,2:1  (solo decoración, nunca texto)

   Uso: este archivo sustituye al contenido de style.css (que debe quedarse
   solo con la cabecera del tema). Se carga con wp_enqueue_style.
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
    color-scheme: light;

    --cr-fondo-lino: #FDFBF7;
    --cr-texto-carbon: #1E2322;
    --cr-verde-oliva: #4A5D4E;
    --cr-verde-oliva-oscuro: #39483C;
    --cr-terracota: #C87A53;
    --cr-terracota-oscuro: #A9623D;
    --cr-terracota-texto: #7C2D12;
    --cr-texto-suave: #454B49;
    --cr-gris-suave: #EFECE6;
    --cr-blanco: #FFFFFF;
    --cr-linea: #D6D0C4;                  /* decorativa: no usar para identificar controles */
    --cr-error: #8F1D1D;                  /* 8,9:1 sobre blanco */

    /* Foco en dos tonos: anillo oscuro + halo claro (se invierte en secciones oscuras) */
    --cr-foco: var(--cr-texto-carbon);
    --cr-foco-halo: var(--cr-fondo-lino);

    --cr-fuente: "Google Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --cr-fs-base: clamp(1.0625rem, 1rem + 0.2vw, 1rem);  
    --cr-lh: 1.65;
     --cr-medida: 100%; /*68ch; */

    --cr-margen-x: clamp(1rem, 0.5rem + 3vw, 2rem);
    --cr-pad-izq: max(var(--cr-margen-x), env(safe-area-inset-left, 0px));
    --cr-pad-der: max(var(--cr-margen-x), env(safe-area-inset-right, 0px));
    --cr-seccion-y: clamp(3rem, 2rem + 5vw, 6rem);
    --cr-objetivo: 2.75rem;               /* 44 px */

    /* Paleta global de Neve alineada con la marca */
    --nv-primary-accent: var(--cr-terracota-texto);
    --nv-secondary-accent: var(--cr-verde-oliva-oscuro);
    --nv-site-bg: var(--cr-fondo-lino);
    --nv-light-bg: var(--cr-gris-suave);
    --nv-dark-bg: var(--cr-texto-carbon);
    --nv-text-color: var(--cr-texto-carbon);
    --nv-text-dark-bg: var(--cr-fondo-lino);
}

/* ==========================================================================
   2. BASE
   Se elimina html { font-size: calc(1em + 0.1vw) }: mezclar vw con el tamaño
   base impide que el texto crezca de forma proporcional al hacer zoom (1.4.4)
   y duplicaba el escalado que ya hace --cr-fs-base.
   ========================================================================== */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 5rem;             /* el foco no queda tapado por la cabecera fija (2.4.11) */
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

html body {
    margin: 0;
    background-color: var(--cr-fondo-lino);
    color: var(--cr-texto-carbon);
    font-family: var(--cr-fuente);
    font-size: var(--cr-fs-base);
    font-optical-sizing: auto;
    line-height: var(--cr-lh);
    text-align: start;
    overflow-wrap: break-word;
    overflow-x: clip;
    hyphens: manual;
}

:is(button, input, select, textarea, .nav-ul, .nav-ul a, .main-navigation, .site-footer, .header-menu-sidebar) {
    font-family: var(--cr-fuente);
}

/* Utilidad para forzar Google Sans en un elemento concreto.
   font-display no es válido aquí: va dentro del @font-face de la fuente. */
.google-sans-cr {
    font-family: var(--cr-fuente);
    font-optical-sizing: auto;
    font-variation-settings: "GRAD" 0;
    font-weight: 400 700;
    font-style: normal;
}

/* ==========================================================================
   3. TIPOGRAFÍA Y CONTENIDO
   ========================================================================== */
html :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--cr-fuente);
    color: var(--cr-texto-carbon);
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}

.nv-page-title-wrap h1,
.entry-title,
.entry-content h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 2.5rem); }
.entry-content h2 { font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.2rem); }
.entry-content h3 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.7rem); }
.entry-content h4 { font-size: 1.25rem; }
.entry-content :is(h5, h6) { font-size: 1.0625rem; }

.entry-content {
    /*  max-width: 70ch;                     AAA: 80 caracteres como máximo */
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.entry-content :where(h2, h3, h4, h5, h6) { margin: .8em 0; }

.entry-content :where(p, li) { text-align: start;  vertical-align: middle;}   /* AAA: sin texto justificado */

.entry-content :where(p),
.comment-content :where(p),
.nv-comment-content :where(p) {
    margin: 0 0 1.5em;
    text-wrap: pretty;
}
.widefat td, .widefat th {
  padding: 0!important;
}
/* Columna de lectura */
:where(.entry-content, .comment-content, .nv-comment-content, .cr-landing) :where(p, ul, ol, dl, blockquote, h1, h2, h3, h4, h5, h6) {
    max-width: var(--cr-medida);
}

.entry-content :where(ul, ol) {
    margin: 0 0 1.5em;
    padding-inline-start: 1.5em;
}

.entry-content :where(li) { margin-block-end: 0.5em; }

.entry-content :where(blockquote) {
    margin: 1.5em 0;
    padding: 0.25em 0 0.25em 1.25em;
    border-inline-start: 4px solid var(--cr-verde-oliva);
    font-style: italic;
}

.entry-content pre {
    max-width: 100%;
    margin: 0 0 1.5em;
    padding: 1rem;
    overflow-x: auto;
    background: var(--cr-gris-suave);
    border-radius: 4px;
    line-height: 1.5;
}

:where(code, kbd, samp) {
    padding: 0.1em 0.3em;
    background: var(--cr-gris-suave);
    border-radius: 3px;
    font-size: 0.9em;
}

.entry-meta,
.entry-meta a,
.nv-meta-list,
.nv-meta-list a,
.comment-metadata,
.comment-metadata a,
.wp-caption-text,
.wp-element-caption,
figcaption {
    color: var(--cr-texto-suave);
}

figcaption,
.wp-caption-text,
.wp-element-caption {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

figure { margin: 0 0 1.5em; }

/* Separadores: degradado */
hr,
.entry-content .wp-block-separator:not(.is-style-dots) {
    height: 1px;
    margin-block: clamp(2rem, 1.5rem + 2vw, 3rem);
    border: 0;
    background-color: var(--cr-linea);
    background-image: linear-gradient(to right, transparent, color-mix(in srgb, var(--cr-texto-carbon) 75%, transparent), transparent);
}

/* ==========================================================================
   4. ENLACES Y FOCO
   ========================================================================== */

/* Enlaces del texto: subrayados (no dependen solo del color, 1.4.1) */
.comment-content a,
.nv-comment-content a,
.entry-content a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])) {
    color: var(--cr-terracota-texto);
    text-decoration: underline;
    text-decoration-thickness: max(1px, 0.08em);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
    transition: color 0.2s ease-in-out;
}

.comment-content a:is(:hover, :focus),
.nv-comment-content a:is(:hover, :focus),
.entry-content a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])):is(:hover, :focus) {
    color: var(--cr-texto-carbon);
    text-decoration-thickness: 0.16em;
}

/* Foco de teclado en dos tonos: anillo de 3 px + halo de 2 px.
   Con las variables, funciona igual sobre fondo claro y oscuro.
   (Antes: #111 con !important, invisible sobre las secciones oscuras.) */
:focus-visible {
    outline: 3px solid var(--cr-foco) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 2px var(--cr-foco-halo) !important;
}

/* Elementos que reciben el foco por programa (p. ej. destino del salto) */
[tabindex="-1"]:focus-visible {
    outline: 0 !important;
    box-shadow: none !important;
}

/* Enlace "Saltar al contenido" */
.screen-reader-text:focus,
.skip-link:focus {
    --cr-foco: var(--cr-fondo-lino);
    --cr-foco-halo: var(--cr-texto-carbon);
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100000;
    width: auto;
    height: auto;
    padding: 0.9rem 1.25rem;
    clip: auto !important;
    clip-path: none;
    background: var(--cr-texto-carbon);
    color: var(--cr-fondo-lino);
    border-radius: 4px;
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================================================
   5. BOTONES
   Un solo bloque para .button, Gutenberg, formularios y [role="button"]
   del contenido. No toca el botón de menú ni otros botones del tema.
   ========================================================================== */
:is(.button, .wp-block-button__link, .wp-element-button, input[type="submit"], input[type="button"], :where(.entry-content) [role="button"], :where(.entry-content) [role="dialog"] button) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--cr-objetivo);
    min-height: var(--cr-objetivo);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--cr-verde-oliva-oscuro);
    border-radius: 4px;
    background-color: var(--cr-verde-oliva-oscuro);   /* 9,4:1 con texto lino */
    color: var(--cr-fondo-lino);
    font-family: var(--cr-fuente);
    font-size: 1em;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

:is(.button, .wp-block-button__link, .wp-element-button, input[type="submit"], input[type="button"], :where(.entry-content) [role="button"], :where(.entry-content) [role="dialog"] button):is(:hover, :focus-visible) {
    background-color: var(--cr-texto-carbon);
    border-color: var(--cr-texto-carbon);
    color: var(--cr-fondo-lino);
}

/* Botón secundario con borde */
.button.cr-boton--borde,
.button.button-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border-color: var(--cr-texto-carbon);
    color: var(--cr-texto-carbon);
}

.button.cr-boton--borde:is(:hover, :focus-visible),
.button.button-secondary:is(:hover, :focus-visible),
.wp-block-button.is-style-outline .wp-block-button__link:is(:hover, :focus-visible) {
    background-color: var(--cr-texto-carbon);
    color: var(--cr-fondo-lino);
}

:is(.button, .wp-block-button__link, .wp-element-button, input[type="submit"], input[type="button"], :where(.entry-content) [role="button"]):is([disabled], [aria-disabled="true"]) {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: no-preference) {
    :where(.entry-content) [role="button"]:active { transform: scale(0.97); }
}

@media (max-width: 37.5em) {
    :where(.entry-content) [role="button"] { width: 100%; }
}

/* ==========================================================================
   6. FORMULARIOS
   ========================================================================== */
:root :is(
    input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="search"], [type="password"], [type="number"], [type="date"]),
    textarea,
    select
) {
    box-sizing: border-box;
    width: 100%;
    max-width: 40rem;
    min-height: var(--cr-objetivo);
    padding: 0.6rem 0.8rem;
    background: var(--cr-blanco);
    color: var(--cr-texto-carbon);
    border: 2px solid var(--cr-texto-suave);          /* borde 8,6:1 */
    border-radius: 4px;
    font-family: var(--cr-fuente);
    font-size: 1em;
}

:root :is(
    input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="search"], [type="password"], [type="number"], [type="date"]),
    textarea,
    select
):focus {
    border-color: var(--cr-texto-carbon);
}

/* Errores: borde más grueso además del color (no solo color, 1.4.1) */
:root :is(
    input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="search"], [type="password"], [type="number"], [type="date"]),
    textarea,
    select
)[aria-invalid="true"],
:root .wpcf7-not-valid {
    border-color: var(--cr-error);
    border-width: 3px;
}

.wpcf7-not-valid-tip,
.cr-error {
    color: var(--cr-error);
    font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.5rem;
    height: 1.5rem;
    accent-color: var(--cr-verde-oliva-oscuro);
}

::placeholder {
    color: var(--cr-texto-suave);
    opacity: 1;
}

label { font-weight: 600; }

.comment-form p { margin-bottom: 1.25rem; }

/* ==========================================================================
   7. MEDIOS Y TABLAS
   ========================================================================== */
img { max-width: 100%; height: auto; vertical-align: middle;}

iframe, embed, object, video { max-width: 100%; }
video { height: auto; }

@media (max-width: 30em) {
    .entry-content .alignleft,
    .entry-content .alignright {
        float: none;
        display: block;
        margin-inline: 0;
    }
}

/* El scroll horizontal lo gestiona el contenedor (.wp-block-table / .cr-tabla-wrap),
   no la propia tabla: overflow-x no funciona sobre display:table. */
.entry-content table,
.wp-block-table table,
table.cr-tabla {
    width: 100%;
    margin: 0 0 1.5em;
    border: 0;
    border-collapse: collapse;
    font-size: 1rem;
    line-height: 1.5;
}

:is(.entry-content, .wp-block-table, .cr-tabla) :is(th, td) {
    padding: 0.7rem 0.9rem;
    border: 0;
    border-bottom: 1px solid var(--cr-linea);
    text-align: start;
    vertical-align: top;
    background: transparent;
}

:is(.entry-content, .wp-block-table, .cr-tabla) thead th {
    border-bottom: 2px solid var(--cr-texto-carbon);
    font-weight: 700;
}

:is(.entry-content, .wp-block-table, .cr-tabla) tbody th { font-weight: 600; }

:is(.entry-content, .wp-block-table, .cr-tabla) tbody tr:nth-child(even) > * {
    background: var(--cr-blanco);
}

.entry-content table caption,
table.cr-tabla caption {
    caption-side: top;
    padding: 0 0 0.6rem;
    text-align: start;
    font-weight: 700;
    color: var(--cr-texto-carbon);
}

.wp-block-table figcaption,
.wp-block-table .wp-element-caption { text-align: start; }

.wp-block-table,
.cr-tabla-wrap {
    max-width: 100%;
    margin: 0 0 1.5em;
    overflow-x: auto;
}

.wp-block-table table,
.cr-tabla-wrap table {
    min-width: 30rem;
    margin-bottom: 0;
}

@media (max-width: 40em) {
    :is(.entry-content, .wp-block-table, .cr-tabla) :is(th, td) { padding: 0.6rem 0.7rem; }
}

/* ==========================================================================
   8. REDES SOCIALES E IMAGEN PRINCIPAL

   Redes: cualquier lista con enlaces a Instagram y a Bluesky se convierte
   en enlaces táctiles (apilados en móvil); también vale la clase
   cr-social-links. El "|" de separación se oculta a la vista; bórralo en el
   editor para que tampoco lo lea el lector de pantalla.

   Imagen principal: bloque Imagen > Avanzado > Clase CSS adicional >
   cr-hero-img (y rellena su texto alternativo).
   ========================================================================== */
:is(.cr-social-links, .entry-content ul:has(a[href*="instagram.com"]):has(a[href*="bsky.app"])) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    max-width: none;
}

:is(.cr-social-links, .entry-content ul:has(a[href*="instagram.com"]):has(a[href*="bsky.app"])) li {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0;                         /* oculta el "|" */
    line-height: 0;
}

:is(.cr-social-links, .entry-content ul:has(a[href*="instagram.com"]):has(a[href*="bsky.app"])) a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])) {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: var(--cr-objetivo);
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 4px;
    color: var(--cr-texto-carbon);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
}

:is(.cr-social-links, .entry-content ul:has(a[href*="instagram.com"]):has(a[href*="bsky.app"])) a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])):is(:hover, :focus-visible) {
    color: var(--cr-terracota-texto);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
}

@media (max-width: 30em) {
    :is(.cr-social-links, .entry-content ul:has(a[href*="instagram.com"]):has(a[href*="bsky.app"])) { flex-direction: column; }
    :is(.cr-social-links, .entry-content ul:has(a[href*="instagram.com"]):has(a[href*="bsky.app"])) a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])) { display: flex; }
}

.entry-content .cr-hero-img { margin: 0 0 clamp(1.5rem, 1rem + 2vw, 2.5rem); }

.entry-content .cr-hero-img img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(70vh, 32rem);
    object-fit: cover;
    border-radius: 6px;
}

/* ==========================================================================
   9. COMPONENTES CON ROLES ARIA
   Limitados al contenido (.entry-content) con :where(), sin añadir
   especificidad. Antes eran globales y afectaban a elementos que añaden el
   tema o los plugins (menús, banners de cookies, etc.).
   Para volver al comportamiento global, quita ":where(.entry-content) ".
   ========================================================================== */

/* Enlaces con role dentro del contenido: sin el subrayado de los enlaces de texto */
.entry-content.entry-content a:is([role="button"], [role="menuitem"], [role="tab"]) {
    text-decoration: none;
}

/* Navegación */
:where(.entry-content) [role="navigation"] a:is(:hover, :focus-visible) {
    color: var(--cr-terracota-texto);
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

@media (max-width: 37.5em) {
    :where(.entry-content) [role="navigation"] [role="list"] {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    :where(.entry-content) [role="navigation"] a {
        display: block;
        min-height: var(--cr-objetivo);
        padding: 0.85rem;
        text-align: center;
    }
}

/* Listas y elementos de lista */
:where(.entry-content) [role="list"] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

:where(.entry-content) [role="listitem"] {
    margin: 0 auto;
    border-radius: 12px;
}

@media (prefers-reduced-motion: no-preference) {
    :where(.entry-content) [role="listitem"] { transition: transform 0.2s ease, box-shadow 0.2s ease; }

    /* Solo se levantan los elementos con enlace; también con teclado */
    :where(.entry-content) [role="listitem"]:has(a):is(:hover, :focus-within) {
        transform: translateY(-4px);
        box-shadow: 0 5px 15px rgb(30 35 34 / 0.1);
    }
}

/* Menú */
:where(.entry-content) [role="menu"] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: min(100%, 12.5rem);
    padding: 0.5rem;
    background: var(--cr-gris-suave);
    border: 1px solid var(--cr-linea);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.13);
}

:where(.entry-content) [role="menuitem"] {
    display: block;
    min-height: var(--cr-objetivo);
    padding: 0.6rem 0.9rem;
    color: var(--cr-texto-carbon);
    text-decoration: none;
    border-radius: 6px;
}

/* Corregido: antes solo cambiaba el color a lino sobre el fondo gris claro
   (texto casi invisible). Ahora cambia también el fondo. */
:where(.entry-content) [role="menuitem"]:is(:hover, :focus-visible) {
    background: var(--cr-texto-carbon);
    color: var(--cr-fondo-lino);
}

@media (max-width: 37.5em) {
    :where(.entry-content) [role="menu"] { width: 100%; }
    :where(.entry-content) [role="menuitem"] { padding: 1rem; }
}

/* Pestañas: la selección se indica con borde, no solo con color */
:where(.entry-content) [role="tablist"] {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--cr-linea);
    overflow-x: auto;
    scrollbar-width: thin;
}

:where(.entry-content) [role="tab"] {
    flex: 0 0 auto;
    min-height: var(--cr-objetivo);
    padding: 0.9rem 1.25rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--cr-texto-suave);
    font-family: var(--cr-fuente);
    font-size: 1em;
    font-weight: 600;                     /* peso fijo: el texto no salta al cambiar de pestaña */
    cursor: pointer;
}

:where(.entry-content) [role="tab"]:hover {
    color: var(--cr-texto-carbon);
    border-bottom-color: var(--cr-texto-suave);
}

:where(.entry-content) [role="tab"][aria-selected="true"] {
    color: var(--cr-verde-oliva-oscuro);
    border-bottom-color: var(--cr-verde-oliva-oscuro);
}

:where(.entry-content) [role="tabpanel"] { padding-block: 1.25rem; }

@media (max-width: 30em) {
    :where(.entry-content) [role="tablist"] { gap: 0.15rem; }
    :where(.entry-content) [role="tab"] { padding: 0.8rem; font-size: 0.9rem; }
}

/* Diálogo */
:where(.entry-content) [role="dialog"] {
    box-sizing: border-box;
    width: min(90%, 34.375rem);
    max-height: 85dvh;
    margin: auto;
    padding: 2rem;
    overflow-y: auto;
    background: var(--cr-fondo-lino);
    color: var(--cr-texto-carbon);
    border: 1px solid var(--cr-linea);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgb(0 0 0 / 0.27);
}

:where(.entry-content) [role="dialog"] h2 {
    margin-top: 0;
    color: var(--cr-verde-oliva-oscuro);
}

dialog::backdrop { background: rgb(30 35 34 / 0.6); }

@media (max-width: 37.5em) {
    :where(.entry-content) [role="dialog"] {
        width: calc(100% - 1.5rem);
        max-height: 90dvh;
        padding: 1.25rem;
        border-radius: 12px;
    }
}

/* ==========================================================================
   10. NEVE: CABECERA, MENÚ, BLOG, PIE
   ========================================================================== */
.container { padding-inline: var(--cr-pad-izq) var(--cr-pad-der); }

.hfg_header.site-header {
    box-shadow: none;
    border-bottom: 1px solid var(--cr-linea);
}

.hfg_header.site-header,
.hfg_header .header--row { background-color: var(--cr-fondo-lino); }

.hfg_header .site-logo img {
    width: auto;
    max-width: clamp(4rem, 3rem + 5vw, 6.25rem);
    height: auto;
}

.hfg_header .nav-ul .menu-item a { color: var(--cr-texto-carbon); }

.hfg_header .nav-ul .menu-item a:is(:hover, :focus) { color: var(--cr-terracota-texto); }

.hfg_header .nav-ul :is(.current-menu-item, .current_page_item) > :is(a, .wrap > a) {
    color: var(--cr-terracota-texto);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.35em;
}

/* Objetivo táctil de 44 px (AAA) en menús de cabecera y pie */
:is(.hfg_header, .hfg_footer) .nav-ul .menu-item > :is(a, .wrap > a) {
    min-height: var(--cr-objetivo);
}

.hfg_header .nav-ul .sub-menu {
    background-color: var(--cr-fondo-lino);
    border: 1px solid var(--cr-texto-suave);
}

.header-menu-sidebar-bg,
.header-menu-sidebar .header-menu-sidebar-inner {
    background-color: var(--cr-fondo-lino);
    color: var(--cr-texto-carbon);
}

.navbar-toggle {
    min-width: var(--cr-objetivo);
    min-height: var(--cr-objetivo);
    color: var(--cr-texto-carbon);
    border-color: var(--cr-texto-carbon);
}

.navbar-toggle .icon-bar { background-color: var(--cr-texto-carbon); }

.nv-page-title-wrap .nv-page-title { margin-bottom: 0; }
.nv-page-title-wrap.nv-big-title .nv-page-title { border-bottom: 0; }

.nv-index-posts .blog-entry-title,
.nv-index-posts .blog-entry-title a {
    color: var(--cr-texto-carbon);
    font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
    line-height: 1.3;
    text-decoration: none;
}

.nv-index-posts .blog-entry-title a:is(:hover, :focus) {
    color: var(--cr-terracota-texto);
    text-decoration: underline;
}

/* Paginación y "Responder" en comentarios: objetivo táctil de 44 px */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--cr-objetivo);
    min-height: var(--cr-objetivo);
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--cr-objetivo);
}

/* Preguntas frecuentes con el bloque Detalles de Gutenberg */
.entry-content .wp-block-details {
    max-width: var(--cr-medida);
    border-bottom: 1px solid var(--cr-linea);
}

.entry-content .wp-block-details summary {
    min-height: var(--cr-objetivo);
    padding-block: 0.6rem;
    font-weight: 600;
    cursor: pointer;
}

/* Pie */
.hfg_footer .footer--row,
.site-footer {
    background-color: var(--cr-gris-suave);
    color: var(--cr-texto-carbon);
}

.site-footer p { font-size: 0.875rem; }

.site-footer a {
    color: var(--cr-terracota-texto);    /* 7,9:1 sobre gris suave */
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.site-footer a:is(:hover, :focus) { color: var(--cr-texto-carbon); }
ul.cr-footer-social-link{
  column-count: 4; /* Número de columnas */
  column-gap: 2rem; /* Separación entre columnas */
  padding-left: 1.2rem;
}

ul.cr-footer-social-link li {
  break-inside: avoid; /* Evita que un elemento se parta entre columnas */
}
/* ==========================================================================
   11. LANDING (clases .cr-*)
   ========================================================================== */
.entry-content:has(.cr-landing) { margin-top: 0 !important; }
.entry-content:has(.cr-landing) .wp-block-group__inner-container { padding: 0 !important; }

.cr-landing {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    font-size: var(--cr-fs-base);
    line-height: 1.7;
    color: var(--cr-texto-carbon);
    background: var(--cr-fondo-lino);
}

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

.cr-landing :is(h1, h2, h3) {
    font-family: inherit;
    color: inherit;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}
.cr-landing h1 { font-size: clamp(2.25rem, 1.5rem + 3.5vw, 3.75rem); }
.cr-landing h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
.cr-landing h3 { font-size: 1.25rem; }
.cr-landing p  { margin: 0 0 1.2em; }
.cr-landing ul { margin: 0; padding: 0; list-style: none; }   /* añade role="list" a estas ul (VoiceOver) */
.cr-landing li { margin: 0; vertical-align: middle;}

.cr-wrap {
    width: 100%;
    max-width: 62rem;
    margin-inline: auto;
    padding-block: var(--cr-seccion-y);
    padding-inline: var(--cr-pad-izq) var(--cr-pad-der);
}

.cr-texto { max-width: var(--cr-medida); }

.cr-acciones { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 2rem; }

@media (max-width: 30em) {
    .cr-acciones .button { width: 100%; }
}

/* Secciones oscuras: foco, enlaces y botones invertidos */
.cr-manifiesto,
.cr-comunidad {
    --cr-foco: var(--cr-fondo-lino);
    --cr-foco-halo: var(--cr-texto-carbon);
    color: var(--cr-fondo-lino);
}

.cr-comunidad { --cr-foco-halo: var(--cr-verde-oliva-oscuro); }

.entry-content :is(.cr-manifiesto, .cr-comunidad) a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])) {
    color: inherit;
}

.entry-content :is(.cr-manifiesto, .cr-comunidad) a:not(:is(.button, .wp-block-button__link, .wp-element-button, .wp-block-file__button, [role])):is(:hover, :focus) {
    color: var(--cr-blanco);
}

:is(.cr-manifiesto, .cr-comunidad) .button {
    background-color: var(--cr-fondo-lino);
    border-color: var(--cr-fondo-lino);
    color: var(--cr-texto-carbon);
}

:is(.cr-manifiesto, .cr-comunidad) .button:is(:hover, :focus-visible) {
    background-color: var(--cr-blanco);
    border-color: var(--cr-blanco);
    color: var(--cr-texto-carbon);
}

:is(.cr-manifiesto, .cr-comunidad) .button.cr-boton--borde {
    background-color: transparent;
    border-color: var(--cr-fondo-lino);
    color: var(--cr-fondo-lino);
}

:is(.cr-manifiesto, .cr-comunidad) .button.cr-boton--borde:is(:hover, :focus-visible) {
    background-color: var(--cr-fondo-lino);
    color: var(--cr-texto-carbon);
}

/* 1. Hero */
.cr-hero { border-bottom: 1px solid var(--cr-linea); }
.cr-subtitulo {
    font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
    font-weight: 500;
    color: var(--cr-verde-oliva-oscuro);
}

/* 2. Manifiesto */
.cr-manifiesto { background: var(--cr-texto-carbon); }
.cr-landing .cr-manifiesto blockquote {
    margin: 2rem 0 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border: 0;
    border-left: 4px solid var(--cr-fondo-lino);
    background: none;
    color: var(--cr-fondo-lino);
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    font-style: italic;
}
.cr-landing .cr-manifiesto blockquote p { margin: 0; }

/* 3. Servicios */
.cr-tarjetas { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 2rem; }
.cr-tarjeta {
    flex: 1 1 min(100%, 16rem);
    padding: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    background: var(--cr-blanco);
    border: 1px solid var(--cr-linea);
    border-top: 5px solid var(--cr-verde-oliva);
    border-radius: 6px;
}
.cr-tarjeta:nth-child(2) { border-top-color: var(--cr-terracota); }
.cr-tarjeta h3 { margin-bottom: 0.4em; }
.cr-tarjeta p  { margin: 0; }

/* 4. Comunidad */
.cr-comunidad { background: var(--cr-verde-oliva-oscuro); }

/* 5. Preguntas frecuentes */
.cr-faq details { border-bottom: 1px solid var(--cr-linea); }
.cr-faq details:first-of-type { border-top: 1px solid var(--cr-linea); }
.cr-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.5rem;
    padding: 0.75rem 0;
    cursor: pointer;
    list-style: none;
}
.cr-faq summary::-webkit-details-marker { display: none; }
.cr-faq summary::after {
    content: "+";
    content: "+" / "";                    /* el lector de pantalla no lo anuncia */
    flex: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--cr-terracota-texto);
}
.cr-faq details[open] summary::after {
    content: "\2212";
    content: "\2212" / "";
}
.cr-landing .cr-faq summary h3 { margin: 0; font-size: 1.125rem; font-weight: 500; }
.cr-respuesta { max-width: var(--cr-medida); padding-bottom: 0.5rem; }

/* ==========================================================================
   12. PREFERENCIAS DEL USUARIO Y MODOS DE ACCESIBILIDAD
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --cr-linea: var(--cr-texto-carbon);
        --cr-texto-suave: var(--cr-texto-carbon);
    }
    .entry-content a:not([role]) { text-decoration-thickness: 2px; }
}

@media (forced-colors: active) {
    :focus-visible { outline-color: Highlight !important; }
    .cr-tarjeta { border: 1px solid CanvasText; }
    :is(.button, .wp-block-button__link, .wp-element-button, input[type="submit"], input[type="button"]) {
        border-color: ButtonText;
    }
}

/* ==========================================================================
   13. UTILIDADES
   ========================================================================== */
.cr-sr,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Oculta la barra de copyright de Neve. ".off" es muy genérica: si algún
   plugin la usa para otra cosa, también quedará oculto. */
.off,
.copyright-bar {
    display: none;
}

.fa-solid { width: 1em; display: inline-block; }
