@font-face {
    font-family: "Figtree";
    src: url("/assets/fonts/figtree-400-800-latin.woff2") format("woff2");
    font-display: swap;
    font-style: normal;
    font-weight: 400 800;
}

:root {
    --blue-950: #102b4b;
    --blue-900: #203761;
    --blue-800: #294879;
    --cyan-100: #dbe4eb;
    --cyan-200: #a4e6ff;
    --cyan-500: #00aeef;
    --cyan-600: #0cace7;
    /* Cian de las superficies con texto blanco: franja de sectores, «Ver catálogo» del pie y barra del móvil (4,6:1).
       --cyan-500 queda para líneas y detalles decorativos, como en ydins.es. */
    --cyan-ribbon: #007ea8;
    --cyan-800: #006984;
    --ink: #37393e;
    --ink-strong: #242729;
    --muted: #5b5d62;
    --line: #d7d7d7;
    --line-strong: #7b8793;
    --surface: #f5f5f5;
    --surface-card: var(--surface);
    --footer-surface: var(--cyan-100);
    --white: #fff;
    --shadow: 0 2px 5px rgb(0 0 0 / 15%);
    --shadow-raised: 0 10px 24px rgb(0 0 0 / 18%);
    --radius-control: 6px;
    --radius-media: 12px;
    --radius-card: 20px;
    --radius-pill: 999px;
    --control-size: 44px;
    --font-size-page-title: clamp(2.4rem, 3.3vw, 3rem);
    --font-size-interior-title: clamp(2rem, 3.2vw, 41px);
    --font-size-section-title: clamp(1.5rem, 2.3vw, 2rem);
    --font-size-card-title: 1.4rem;
    --shell: 1680px;
    --shell-gutter: 7%;
    --header-height: 124px;
    --mobile-bar-height: 60px;
    --motion-fast: 200ms;
    --motion-carousel: 250ms;
    --motion-normal: 400ms;
    --motion-ease: cubic-bezier(.2, .65, .3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: "Figtree", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--blue-900);
    font-weight: 700;
    line-height: 1.08;
}

.shell {
    width: min(var(--shell), calc(100% - var(--shell-gutter) * 2));
    margin-inline: auto;
}

.section-spacing {
    padding-block: clamp(56px, 7vw, 92px);
}

.main-content {
    min-height: 45vh;
    padding-top: var(--header-height);
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    color: var(--white);
    background: var(--blue-950);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--focus-color, var(--cyan-800));
    outline-offset: var(--focus-offset, 3px);
}

/* Controles de icono: una sola caja y un solo centrado, con variantes visuales. */
.carousel-arrow, .sector-arrow, .gallery-controls button,
.legal-dialog-panel > header button, .back-to-top {
    display: grid;
    width: var(--control-size);
    min-width: var(--control-size);
    height: var(--control-size);
    min-height: var(--control-size);
    padding: 0;
    place-items: center;
    cursor: pointer;
}
.gallery-controls button {
    border: 0;
    background: var(--blue-900);
    color: var(--white);
    border-radius: 50%;
    transition: background-color var(--motion-normal) ease;
}
.gallery-controls button:not([aria-disabled="true"]):hover,
.gallery-controls button:focus-visible { background: var(--ink-strong); }
.carousel-icon { display: block; width: 24px; height: 24px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-carousel-previous][aria-disabled="true"],
[data-carousel-next][aria-disabled="true"] { opacity: .35; cursor: default; }

/* Base de todos los CTA: el centrado se define una sola vez. */
.button,
.pill-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.button,
.pill-button {
    min-height: 40px;
    padding: 7px 24px;
    color: var(--white);
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--blue-900);
    box-shadow: 4px 0 var(--cyan-600);
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    transition: background-color var(--motion-normal) ease, box-shadow var(--motion-normal) ease;
}

/* Variante compacta reutilizable; hereda alineación, colores y estados. */
.button--compact {
    min-height: 0;
    padding: 5px 18px;
    box-shadow: none;
    font-weight: 400;
    line-height: 1.2;
}

.button:hover,
.button:focus-visible,
.pill-button:hover,
.pill-button:focus-visible {
    background: var(--ink-strong);
    color: var(--white);
    box-shadow: none;
}

.button[aria-disabled="true"],
.pill-button[aria-disabled="true"],
.button:disabled,
.pill-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.eyebrow {
    color: var(--cyan-800);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Hero. */
.hero-carousel {
    position: relative;
    overflow: hidden;
    background: var(--blue-950);
}

.hero-carousel-track {
    position: relative;
    height: clamp(270px, 26.041667vw, 625px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

}

.hero-slide[data-active] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.hero-slide > a,
.hero-slide > div {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Solo se pintan (y por tanto solo se descargan) la diapositiva visible, la que sale y sus dos vecinas. */
.hero-slide:not([data-active], [data-leaving], [data-preload]) img { display: none; }

.hero-slide-caption {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    width: min(960px, 55vw);
    min-height: 46%;
    border-radius: 0 10px 10px 0;
    align-items: center;
    padding: 30px 40px 38px clamp(32px, 5vw, 72px);
    color: var(--white);
    background: transparent;
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.08;
    text-transform: uppercase;
}

.carousel-controls {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 44px;
    pointer-events: none;
}

.carousel-arrow {
    color: var(--white);
    border: 0;
    background: transparent;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: auto;
    text-shadow: 0 1px 5px rgb(0 0 0 / 70%);
}

/* Portada pública. */
.home-intro {
    padding: 100px 0 75px;
    background: var(--white);
}

.home-intro-inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    width: min(1920px, 93%);
    margin-left: 0;
    gap: 30px;
    align-items: center;
}

.home-intro-content {
    min-width: 0;
    max-width: none;
}

.home-intro h1 {
    margin-bottom: 16px;
    color: var(--blue-900);
    font-size: clamp(2rem, 3.1vw, 2.65rem);
    text-transform: uppercase;
}

.home-intro p {
    margin-bottom: 12px;
    font-size: 1.125rem;
    line-height: 1.45;
}

.home-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 32px;
}

.home-gallery a {
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.home-gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

/* «Más información» bajo la galería: a la derecha en escritorio y centrado en móvil, como en ydins.es. */
.home-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 40px;
}

.home-values {
    clear: both;
    padding: 65px 0;
    background: var(--cyan-100);
}

.home-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(36px, 6vw, 95px);
    text-align: center;
}

.home-values h2 {
    margin-bottom: 24px;
    font-size: clamp(1.5rem, 2.2vw, 1.75rem);
}

.home-values p {
    margin-bottom: 0;
    font-size: 1.125rem;
    line-height: 1.48;
}

.home-products {
    padding: 65px 0 75px;
}

.product-showcase {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
}

.product-card,
.blog-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-card);
    box-shadow: var(--shadow);
}

.product-card {
    display: grid;
    grid-template-rows: auto 1fr;
}

.product-card-image {
    display: block;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.product-card-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform var(--motion-fast) var(--motion-ease);
}

.product-card-content {
    display: flex;
    min-height: 310px;
    align-items: center;
    flex-direction: column;
    padding: 20px 20px 22px;
    text-align: center;
}

.product-card-content h2 {
    min-height: 58px;
    margin: 0 0 20px;
    white-space: pre-line;
    font-size: var(--font-size-card-title);
}

.product-card-content h2 a {
    text-decoration: none;
}

.product-card-content p {
    margin-bottom: 22px;
    color: var(--ink);
    line-height: 1.35;
}

.product-card-button {
    margin-top: auto;
    padding-inline: 18px;
    font-size: 1rem;
    white-space: nowrap;
}

/* Sectores. */
.sector-carousel {
    position: relative;
    margin-top: 16px;
    color: var(--white);
    border-bottom: 3px solid var(--cyan-500);
    background: var(--blue-900);
}

.sector-ribbon {
    position: absolute;
    z-index: 4;
    top: -16px;
    left: 0;
    height: 32px;
    background: var(--cyan-ribbon);
    width: 50%;
    clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
}

.sector-ribbon h2 {
    width: auto;
    margin: 0;
    padding-right: 30px;
    color: var(--white);
    font-size: 24px;
    line-height: 32px;
    text-align: right;
    text-transform: uppercase;
}

/* A sangre como la original: 50 px laterales, el recorte cae en el borde del viewport
   y las flechas viven en ese margen, visibles solo al pasar el ratón o con el foco. */
.sector-viewport {
    position: relative;
    margin-inline: 50px;
    overflow: hidden;
}

/* Pantallas anchas (01-10-2026, corrección de los compañeros): como en ydins.es, con 1400 px de franja o más
   caben 10 huecos y los 8 sectores van centrados en ellos (182 px de paso a 1920), en vez de repartirse a todo
   el ancho. Es una consulta de contenedor y no de ventana porque el motor del carrusel decide por el ancho real
   de la franja, sin la barra de desplazamiento; el relleno lo descuenta al calcular cada hueco. */
.sector-carousel { container-type: inline-size; }
@container (min-width: 1500px) {
    .sector-viewport { padding-inline: calc((100% - 100px) / 10); }
}

.sector-track {
    display: flex;
    gap: 0;
    transition: transform var(--motion-carousel) ease;
}

.sector-slide {
    flex: 0 0 16.6667%;
    min-width: 0;
    padding: 30px 8px 31px;
    text-align: center;
}

.sector-slide img {
    width: 100px;
    height: 70px;
    margin-inline: auto;
    object-fit: contain;
}

.sector-slide h3 {
    margin: 2px auto 0;
    color: var(--white);
    font-size: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.sector-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    color: var(--white);
    border: 0;
    background: rgb(16 43 75 / 75%);
    font-size: 2.2rem;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity var(--motion-fast) ease;
}

.sector-arrow-prev { left: 3px; }
.sector-arrow-next { right: 3px; }
/* No es redundante con .sector-arrow: con la misma especificidad y después, oculta la flecha desactivada que
   [data-carousel-previous][aria-disabled="true"] (línea ~164) dejaría a .35. Comprobado con estilos calculados. */
.sector-carousel .sector-arrow { opacity: 0; }
.sector-carousel:is(:hover, :focus-within) .sector-arrow { opacity: 1; }
.sector-carousel:is(:hover, :focus-within) .sector-arrow[aria-disabled="true"] { opacity: .35; }

/* Pie de página. */
.site-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    color: var(--blue-950);
    background: var(--blue-900);
}

.footer-main {
    grid-column: 1 / -1;
    padding: 34px 0 20px;
    background: var(--footer-surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr .8fr .8fr;
    gap: clamp(24px, 3vw, 42px);
    align-items: start;
    width: min(1280px, 72%);
}

.footer-grid h2 {
    margin-bottom: 12px;
    color: var(--blue-900);
    font-size: 1.08rem;
    text-transform: uppercase;
}

/* Como en ydins.es: teléfono y correo en seminegrita, sin subrayado salvo al pasar o enfocar. */
.footer-contact { color: var(--ink-strong); font-weight: 600; text-decoration: none; }
.footer-contact:is(:hover, :focus-visible) { text-decoration: underline; }

.footer-grid h2 a {
    text-decoration: none;
}

/* WCAG 2.5.8: zona pulsable de 24 px o más sin mover un píxel (el margen negativo compensa el relleno). */
.footer-contact, .footer-grid h2 a { display: inline-block; padding-block: 3px; margin-block: -3px; }
.footer-navigation a, .footer-legal a, .breadcrumb a { padding-block: 3px; margin-block: -3px; }

.footer-grid address {
    font-style: normal;
    line-height: 1.45;
}

.footer-catalog {
    display: grid;
    justify-items: center;
    text-decoration: none;
}

.footer-catalog img {
    width: 170px;
    height: auto;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.footer-catalog .pill-button {
    width: 192px;
    min-width: 0;
    max-width: 240px;
    margin-top: -15px;
    position: relative;
    /* Un solo cian para las superficies con texto (01-10-2026, opción B): el mismo que la franja de sectores,
       con texto blanco legible (4,6:1). Letra de 15 px y sin el canto cian de los botones azules: en ydins.es
       este botón es de un solo tono. */
    color: var(--white);
    background: var(--cyan-ribbon);
    box-shadow: none;
    font-size: 15px;
}

@media (min-width: 901px) {
    .footer-main { box-sizing: border-box; height: 251px; padding: 70px 0 30px; }
    .footer-grid { height: 151px; }
    .footer-catalog { position: relative; top: -60px; align-self: start; }
    .footer-catalog .pill-button { position: absolute; top: 180px; min-height: 32px; margin-top: 0; padding-block: 4px; }
}

.footer-catalog:hover .pill-button,
.footer-catalog:focus-visible .pill-button {
    color: var(--white);
    background: var(--ink-strong);
    box-shadow: none;
}

.footer-navigation {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-navigation a {
    text-decoration: none;
}

.footer-navigation a:hover,
.footer-navigation a:focus-visible {
    text-decoration: underline;
}

.footer-legal {
    width: auto;
    margin-inline: 7vw 0;
    padding-block: 14px;
    color: var(--white);
    font-size: .9rem;
    align-self: center;
}

.footer-legal nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-legal a {
    text-decoration: none;
}

.footer-bottom {
    padding: 11px 0;
    color: var(--white);
    background: var(--blue-900);
    text-align: center;
    align-self: center;
    font-size: .9rem;
}

.back-to-top {
    position: fixed;
    z-index: 90;
    right: 18px;
    bottom: 18px;
    color: var(--white);
    border-radius: 50%;
    background: var(--blue-900);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.back-to-top[data-visible] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

.mobile-actions { display: none; }

/* Páginas interiores. */
.page-heading {
    padding-top: clamp(55px, 7vw, 92px);
    padding-bottom: clamp(35px, 5vw, 65px);
}

.page-heading h1 {
    max-width: 980px;
    margin-bottom: 20px;
    font-size: var(--font-size-interior-title);
}

.page-heading-centered {
    padding-top: clamp(22px, 2.2vw, 32px);
    padding-bottom: clamp(24px, 3vw, 42px);
    text-align: center;
}

.page-heading-centered h1 {
    margin-inline: auto;
}
/* Títulos centrados (Blog, Contacto) como el resto de interiores de la original: mayúsculas y barra. */
.page-heading-centered h1 { text-transform: uppercase; }
/* Barra bajo el título: interiores centrados (Blog, Contacto), páginas editoriales y directorio de productos. */
.page-heading-centered h1::after,
.editorial-page > .editorial-heading h1::after,
.product-directory > .editorial-heading h1::after { content: ""; display: block; width: 80px; height: 2px; margin: 16px auto 0; background: var(--blue-900); }


.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    padding-top: 0;
}

.breadcrumb {
    position: static;
    display: flex;
    gap: 8px;
    min-height: 46px;
    align-items: center;
    padding-block: 10px;
    color: var(--muted);
    border: 0;
    background: transparent;
    font-size: .9rem;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.catalog-only-main {
    min-height: 100dvh;
    padding: 0;
}

.catalog-standalone {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #fff;
}

.catalog-standalone iframe {
    display: block;
    width: 100%;
    height: 100dvh;
    border: 0;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Contacto como en ydins.es: dos columnas de 431 px centradas, formulario sobre azul claro. */
.contact-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 431px));
    justify-content: center;
    gap: 30px;
}
/* ydins.es deja 44 px entre el título y la caja, en escritorio y en móvil. */
.contact-layout.section-spacing { padding-top: 0; }
.page-heading:has(+ .contact-layout) { padding-bottom: 24px; }

.contact-form {
    padding: 40px 50px;
    border-radius: var(--radius-card);
    background: var(--cyan-100);
}

/* Medido sobre ydins.es el 23/09: título de 28 px, casillas de 36 px con el nombre dentro, 15 px entre ellas,
   mensaje de 160 px, aceptación a 16 px, tabla RGPD a 11,2 px y botón «Enviar» centrado (a todo el ancho en móvil). */
.contact-form h2 { margin: 11px 0; font-size: 28px; line-height: 1.1; }
.contact-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
.contact-form .form-grid :is(input, textarea):not([type="checkbox"]) {
    min-height: 36px;
    margin-top: 0;
    padding: 6px 12px;
    color: var(--ink);
    border-radius: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.43;
}
.contact-form .form-grid textarea:not([type="checkbox"]) { height: 160px; }
/* Gris de ydins.es (#999) oscurecido hasta 4,5:1 sobre blanco: el marcador hace de etiqueta visible. */
.contact-form ::placeholder { color: #707378; opacity: 1; }
.contact-form .consent-field { gap: 7px; margin: 16px 0 30px; color: var(--ink); font-size: 16px; font-weight: 400; }
.contact-form .consent-field input { margin: 5px 0 0; }
.contact-form .consent-field a { color: var(--blue-900); font-weight: 600; text-decoration: none; }
.contact-form .consent-field a:is(:hover, :focus-visible) { text-decoration: underline; }
.contact-form .button { display: flex; margin: 10px auto 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid label, .consent-field { color: var(--blue-900); font-size: .9rem; font-weight: 700; }
.field-full { grid-column: 1 / -1; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    padding: 12px 14px;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--white);
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--blue-800);
    box-shadow: 0 0 0 2px rgb(0 174 239 / 18%);
}

input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: .7;
}

textarea { resize: vertical; }

.consent-field { display: flex; gap: 10px; align-items: start; margin: 22px 0; font-weight: 500; }
.consent-field input { width: auto; margin-top: 4px; }
.form-status { margin: 16px 0 0; color: var(--blue-900); font-weight: 700; }
.form-note { color: var(--muted); font-size: .86rem; }
/* Columna de datos como en ydins.es: logo de 200 px a 50 px de la foto, texto con 30 px de sangría y líneas de 25,7 px. */
.contact-details { font-size: 18px; line-height: 1.43; }
.contact-data { display: flex; align-items: flex-start; flex-direction: column; margin-top: 50px; padding-inline: 30px; }
.contact-data img { width: 200px; height: 76px; }
.contact-details h2 { margin: 46px 0 11px; font-size: 18px; line-height: 1.43; text-transform: uppercase; }
.contact-details address + h2 { margin-top: 38px; }
.contact-details address { line-height: 1.43; }
.contact-details a { display: inline-flex; align-items: center; gap: 10px; min-height: 26px; color: var(--blue-900); text-decoration: none; }
.contact-details a:first-of-type { margin-top: 37px; }
.contact-details a + a { margin-top: 11px; }
.contact-details a:is(:hover, :focus-visible) { text-decoration: underline; }
.contact-details .icon { flex: none; font-size: 18px; }
address { font-style: normal; }

.legal-content { max-width: 860px; padding-top: 0; }
.legal-content h2 { margin-top: 38px; font-size: 1.55rem; }
.legal-content h3 { margin: 26px 0 10px; font-size: 1.15rem; }
/* Datos en pares etiqueta-valor (titular, cookie, finalidad y base): dos columnas, una en móvil. */
.legal-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 1em; }
.legal-facts dt { font-weight: 700; }
.legal-facts dd { margin: 0; overflow-wrap: anywhere; }
.legal-updated { margin-top: 38px; font-size: .9rem; font-style: italic; }
.legal-dialog-open,
.legal-dialog-open body { overflow: hidden; }
.legal-dialog {
    --dialog-backdrop: rgb(16 43 75 / 72%);
    border: 0;
    border-radius: var(--radius-media);
    color: var(--ink);
    background: var(--white);
    width: min(960px, calc(100% - 32px));
    max-width: none;
    max-height: min(86dvh, 900px);
    padding: 0;
    box-shadow: var(--shadow-raised);
}
.legal-dialog::backdrop { background: var(--dialog-backdrop); }
.legal-dialog-panel > header {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}
.legal-dialog-panel > header h2 { margin: 0; font-size: var(--font-size-section-title); }
.legal-dialog-panel > header button {
    color: var(--blue-900);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    font-size: 1.8rem;
}
.legal-dialog-content { max-height: calc(min(86dvh, 900px) - 81px); padding: 4px 28px 32px; overflow: auto; }
.error-page { min-height: 65vh; padding-block: 100px; text-align: center; }
.error-code { margin: 0; color: var(--cyan-500); font-size: clamp(4rem, 12vw, 9rem); font-weight: 800; line-height: 1; }
.error-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin: 0 0 32px; }
.error-links a { padding-block: 10px; font-weight: 600; }

@media (max-width: 1120px) {
    .product-showcase { gap: 16px; }
    .product-card-content { min-height: 330px; padding-inline: 14px; }
    .footer-grid { gap: 30px; }
}

@media (max-width: 900px) {
    .home-intro-inner { grid-template-columns: 1fr; width: min(var(--shell), 86%); margin-inline: auto; }
    .home-intro-content { max-width: 760px; margin-inline: auto; }
    .product-showcase { grid-template-columns: repeat(3, 1fr); }
    .home-values-grid { gap: 34px; }
    .sector-slide { flex-basis: 25%; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); width: 86%; }
    .site-footer { display: block; }
    .footer-legal { width: 86%; margin-inline: auto; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Contacto en una columna por debajo de 768 px, como el Bootstrap de ydins.es: caja y foto a todo el ancho. */
@media (max-width: 767px) {
    .contact-layout { grid-template-columns: minmax(0, 1fr); width: 100%; }
    .contact-form .button { width: 100%; justify-content: center; }
    .contact-details .contact-installations { max-width: none; }
}

@media (max-width: 600px) {
    /* WCAG 2.4.11: al enfocar con Tab, el navegador no deja el elemento bajo la barra fija de accesos. */
    html { scroll-padding-bottom: calc(var(--mobile-bar-height) + 16px); }
    .section-spacing { padding-block: 50px; }

    .hero-carousel-track { height: clamp(230px, 30svh, 300px); }
    .hero-slide img { object-position: center; }
    .hero-slide-caption { width: 100%; min-height: 0; padding: 16px 24px 56px; border-radius: 0; font-size: 1.375rem; line-height: 1.1; }
    .carousel-controls { bottom: 6px; gap: 70px; }

    .home-intro { padding: 52px 0 62px; }
    .home-intro h1 { font-size: var(--font-size-page-title); }
    .home-intro p { font-size: 1rem; }
    /* 2×2 en móvil (diferencia intencionada con ydins.es, que las apila): la portada a 390 baja de 7.260 a 6.266 px. */
    .home-gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; padding-inline: 12px; }
    .home-gallery a { border-radius: 11px; }
    .home-actions { justify-content: center; margin-top: 32px; }

    .home-values { padding: 72px 0; }
    .home-values-grid { grid-template-columns: 1fr; gap: 62px; }
    .home-values-grid article { max-width: 285px; margin-inline: auto; }
    .home-values h2 { margin-bottom: 22px; font-size: 1.55rem; }
    .home-values p { font-size: 1rem; }

    .home-products { padding: 55px 0 66px; }
    .product-showcase,
    .blog-grid { grid-template-columns: 1fr; }
    .product-showcase { gap: 26px; padding-inline: 12px; }
    /* Una sola columna: sin los altos mínimos que igualan las tarjetas en fila (dejaban huecos bajo los títulos de una línea). */
    .product-card-content { min-height: 0; padding: 20px 22px 24px; }
    .product-card-content h2 { min-height: 0; }

    .sector-ribbon { width: 65%; }
    .sector-slide { flex-basis: 50%; padding-block: 45px 30px; }
    .sector-slide h3 { font-size: .875rem; }

    .footer-main { padding-top: 34px; }
    .footer-grid { grid-template-columns: 1fr; width: 74%; gap: 30px; padding-inline: 0; }
    .footer-catalog img { width: 130px; }
    .footer-catalog .pill-button { width: 210px; min-height: 32px; margin-top: 10px; padding-block: 4px; }
    .footer-navigation { gap: 9px; }
    .footer-legal nav { justify-content: center; }
    .footer-bottom { font-size: .86rem; }

    .site-footer { margin-bottom: var(--mobile-bar-height); }
    /* Accesos fijos (29/09/2026), como en lindis.com: llamar, contactar y catálogo, este destacado.
       Mientras se escribe en un campo de texto se ocultan para no tapar el teclado. */
    .mobile-actions {
        position: fixed;
        z-index: 85;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--blue-900);
        box-shadow: 0 -2px 8px rgb(0 0 0 / 18%);
    }
    .mobile-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: var(--mobile-bar-height);
        padding: 8px 6px;
        color: var(--white);
        font-size: .85rem;
        font-weight: 700;
        line-height: 1.1;
        text-align: center;
        text-decoration: none;
        --focus-color: var(--white);
        --focus-offset: -5px;
    }
    .mobile-action .icon { font-size: 20px; }
    .mobile-action + .mobile-action { border-left: 1px solid rgb(255 255 255 / 18%); }
    .mobile-action:hover,
    .mobile-action:focus-visible,
    .mobile-action[aria-current="page"] { color: var(--white); background: var(--blue-950); }
    .mobile-action-catalog { background: var(--cyan-ribbon); }
    .mobile-action-catalog:hover,
    .mobile-action-catalog:focus-visible { background: var(--cyan-800); }
    body:has(:is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"]), textarea, select):focus) .mobile-actions { display: none; }
    .back-to-top { bottom: calc(var(--mobile-bar-height) + 18px); }

    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .legal-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
    .legal-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .legal-facts dd + dt { margin-top: 10px; }
    .legal-dialog-content { max-height: calc(100dvh - 101px); padding-inline: 18px; }
}

/* Respetar hidden también en controles cuyo estilo define display. */
[hidden] { display: none !important; }
/* Después de los controles para que su sombra no anule el halo de foco. */
.site-footer :focus-visible, .site-header :focus-visible {
    --focus-color: var(--white);
    --focus-offset: 4px;
    box-shadow: 0 0 0 6px var(--blue-900);
}
.directory-links :focus-visible {
    --focus-color: var(--blue-900);
    --focus-offset: 4px;
}
.icon { display: block; width: 1em; height: 1em; fill: currentColor; }
/* Primera capa RGPD en tabla, como la original: etiquetas sobre azul marino. */
.contact-privacy-summary { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 11.2px; line-height: 16px; }
.contact-privacy-summary caption { margin-bottom: 6px; color: var(--blue-900); font-size: 14px; font-weight: 700; text-align: left; }
.contact-privacy-summary :is(th, td) { padding: 5px; border: 1px solid #ddd; vertical-align: top; }
.contact-privacy-summary th { width: 28%; color: var(--white); background: var(--blue-900); text-align: center; }
@media (max-width: 600px) { .footer-bottom { padding-right: 58px; } }
