/* ==========================================================================
   VIDU · estilos de la web
   Reproduce el diseño de la web original (Drupal + Bootstrap 5.2) sin
   depender de ningún framework. Breakpoints: 576 / 768 / 992 / 1200 / 1400.
   ========================================================================== */

:root {
  --color-text: #212529;
  --color-white: #fff;
  --color-header-border: #f4f4f4;
  --color-cookie-banner: #0779bf;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";
  --font-footer: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: 1.5rem;
  --half-gutter: calc(var(--gutter) / 2);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

p,
ul {
  margin-bottom: 1rem;
}

ul {
  padding-left: 2rem;
}

a {
  color: inherit;
}

strong {
  font-weight: bolder;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Las imágenes se sirven en <picture> (AVIF/WebP): el envoltorio no debe afectar a la maquetación */
picture {
  display: contents;
}

button,
select {
  margin: 0;
  font: inherit;
}

/* Texto solo para lectores de pantalla y buscadores (no ocupa espacio en pantalla) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--half-gutter);
}

@media (min-width: 576px) {
  .container { max-width: 540px; }
}
@media (min-width: 768px) {
  .container { max-width: 720px; }
}
@media (min-width: 992px) {
  .container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

/* Texto de contenido: 16px, 14px en móvil */
main {
  font-size: 1rem;
}

@media (max-width: 767.98px) {
  main {
    font-size: 14px;
  }
}

/* Dos columnas (en móvil, una debajo de otra) */
.split {
  display: flex;
  flex-wrap: wrap;
  margin-inline: calc(var(--half-gutter) * -1);
}

.split > * {
  width: 100%;
  padding-inline: var(--half-gutter);
}

@media (min-width: 768px) {
  .split--wide-narrow > :first-child { width: 75%; }
  .split--wide-narrow > :last-child { width: 25%; }
  .split--halves > * { width: 50%; }
  .split--halves > .split__full { width: 100%; }
}

.split__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.split__media img {
  width: 100%;
}

/* Párrafos o listas seguidos sin separación entre ellos */
.text-group > * {
  margin-bottom: 0;
}

.text-group > :last-child {
  margin-bottom: 1rem;
}

.plain-list {
  padding-left: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--color-header-border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.site-header__logo {
  display: block;
}

.site-header__logo img {
  display: block;
  width: auto;
  height: 60px;
}

.site-header__menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.site-header__toggle {
  display: none;
  margin-block: 10px;
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(0, 0, 0, 0.55);
  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.375rem;
  cursor: pointer;
}

.site-header__toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem;
}

.site-header__toggle-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")
    center / 100% no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 50px;
}

.site-nav__links {
  display: flex;
  gap: 50px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__links a {
  display: block;
  font-weight: 700;
  text-decoration: none;
}

.lang-switch {
  display: block;
  width: 50px;
  padding: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")
    no-repeat right 0.75rem center / 16px 12px;
  border: 0;
  border-radius: 0.375rem;
  appearance: none;
  cursor: pointer;
}

.lang-switch:focus {
  outline: 0;
}

.lang-switch:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .site-header__toggle {
    display: block;
  }

  /* Menú plegado: se despliega bajo el botón al pulsarlo */
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-inline: 5px;
    font-size: 12px;
  }

  .site-header__toggle[aria-expanded="true"] + .site-nav {
    display: flex;
  }

  .site-nav__links {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__links a,
  .lang-switch {
    margin-bottom: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 35px 0 30px;
  font-family: var(--font-footer);
}

/* Márgenes heredados de la maquetación original para que el pie quede en la
   misma posición exacta: 20px + 11px de aire vertical y columnas desplazadas. */
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  margin: 0 11px 0 -13px;
  padding-block: 31px;
  font-size: 0.857rem;
}

.site-footer__brand,
.site-footer__nav {
  width: 100%;
  padding-inline: var(--half-gutter);
}

@media (min-width: 992px) {
  .site-footer__brand,
  .site-footer__nav {
    width: 50%;
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
}

.site-footer__brand img {
  display: block;
  width: auto;
  height: 60px;
}

.site-footer__tagline {
  margin: 1rem 0 0 -20px;
}

.site-footer__nav {
  display: flex;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  display: block;
  font-weight: 700;
  text-decoration: none;
}

.site-footer__contact {
  position: relative;
}

.site-footer__contact span {
  position: absolute;
  top: 18px;
  left: 0;
  font-weight: 400;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .site-footer__nav li {
    width: 30%;
  }
}

/* --------------------------------------------------------------------------
   Componentes de contenido
   -------------------------------------------------------------------------- */

/* Cabecera de página con imagen */
.hero {
  position: relative;
  display: flex;
  height: max(200px, 30vw);
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__title,
.hero__subtitle {
  margin-bottom: 0.5rem;
  line-height: 1.2;
  color: var(--color-white);
}

.hero__title {
  font-size: max(30px, 4vw);
  font-weight: 700;
}

.hero__subtitle {
  font-size: max(16px, 1.6vw);
  font-weight: 500;
}

/* Banda de imagen entre secciones */
.band {
  position: relative;
  height: max(200px, 20vw);
  margin-top: 3rem;
  overflow: hidden;
}

.band--tall {
  height: max(200px, 25vw);
}

/* Banda final de la portada: sin margen superior, encuadrada arriba y con
   el espacio de una línea de texto antes del pie, como en el original. */
.band--closing {
  height: max(200px, 30vw);
  margin-top: 0;
  margin-bottom: calc(1.071rem * 1.5);
}

.band__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band--closing .band__image {
  object-position: top;
}

/* Títulos de sección */
.section-title {
  margin: 3rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.section-title--spaced {
  margin-bottom: 1.5rem;
}

.section-title--loose {
  margin-bottom: 3rem;
}

/* Rejilla de bloques imagen + texto (2 columnas desde 992px) */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--half-gutter) * -1);
  padding: 0;
  list-style: none;
}

.feature {
  display: flex;
  width: 100%;
}

.feature__media,
.feature__body {
  padding-inline: var(--half-gutter);
}

.feature__media {
  display: flex;
  align-items: center;
  width: 25%;
}

.feature__media img {
  width: 100%;
}

.feature__body {
  width: 75%;
}

/* La rejilla es una lista: sin esto las listas internas saldrían con viñeta de lista anidada */
.feature__body ul {
  list-style-type: disc;
}

.feature__title {
  margin: 1rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 767.98px) {
  /* En móvil los bloques pares llevan la imagen a la derecha */
  .feature:nth-child(even) .feature__media {
    order: 1;
  }
}

@media (min-width: 768px) {
  .feature__media { width: 33.33333333%; }
  .feature__body { width: 66.66666667%; }

  .feature-grid--padded-media .feature__media img {
    padding: 1.5rem;
  }
}

@media (min-width: 992px) {
  .feature {
    width: 50%;
  }
}

/* Imágenes sueltas */
.seal {
  max-width: 320px;
}

.infographic {
  width: 100%;
  margin-top: 3rem;
}

.full-width {
  width: 100%;
}

/* Llamada a descargar el catálogo */
.catalog-cta__link {
  margin-inline: 0.5rem;
}

.catalog-cta__icon {
  text-decoration: none;
}

.catalog-cta__icon img {
  width: 25px;
  height: 25px;
}

/* Vídeo incrustado 16:9 */
.video {
  margin-bottom: 1rem;
}

.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* Páginas legales: bloques separados por una línea en blanco */
.legal h2 {
  margin: 0;
  font: inherit;
}

.legal p,
.legal ul {
  margin-bottom: 0;
}

.legal > section + section,
.legal > p + p {
  margin-top: 1.5em;
}

/* --------------------------------------------------------------------------
   Banner de cookies
   -------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 99999;
  width: 100%;
  color: var(--color-white);
  text-align: center;
  background-color: var(--color-cookie-banner);
  animation: cookie-banner-in 1s ease;
}

.cookie-banner[hidden] {
  display: none;
}

@keyframes cookie-banner-in {
  from { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    animation: none;
  }
}

.cookie-banner__content {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 80%;
  margin: 0 auto;
  text-align: left;
}

.cookie-banner__message {
  float: left;
  max-width: 60%;
  margin: 5px 0 0;
}

.cookie-banner__title,
.cookie-banner__text {
  margin: 0 0 5px;
  font-weight: 700;
  line-height: 1.4;
}

.cookie-banner__title {
  font-size: 16px;
}

.cookie-banner__text {
  display: inline;
  font-size: 12px;
}

.cookie-banner__more {
  color: var(--color-white);
}

.cookie-banner__buttons {
  float: right;
  max-width: 40%;
  margin: 0 0 1em;
}

.cookie-banner__accept,
.cookie-banner__decline {
  margin-top: 1em;
  vertical-align: middle;
  cursor: pointer;
}

.cookie-banner__accept {
  padding: 0 8px;
  color: var(--color-white);
  background: none;
  border: 0;
}

.cookie-banner__decline {
  margin-right: 5px;
  padding: 4px 8px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: #000;
  text-shadow: 1px 1px 0 #fff;
  background-color: #ededed;
  background-image: linear-gradient(to bottom, #ededed 5%, #dfdfdf 100%);
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 0 #fff;
}

.cookie-banner__decline:hover {
  background-color: #dfdfdf;
  background-image: linear-gradient(to bottom, #dfdfdf 5%, #ededed 100%);
}

.cookie-banner__decline:active {
  position: relative;
  top: 1px;
}

@media (max-width: 600px) {
  .cookie-banner__content {
    max-width: 95%;
  }

  .cookie-banner__message {
    max-width: 100%;
  }

  .cookie-banner__buttons {
    clear: both;
    float: none;
    max-width: 100%;
    margin: 5px 0 1em;
  }
}
