/* Home (diseño v8): secciones bajo el hero. La intro está en veo-home-intro.css */

/* Secciones: fondo, color de texto, relleno y ancho del contenido van en cada bloque de grupo (paleta y espaciado del editor).
   Aquí solo lo que el editor no puede poner: la coma decorativa */
.seccion-coma {
    position: relative;
}

.seccion-coma::before {
    content: "";
    position: absolute;
    top: clamp(16px, 2vw, 40px);
    left: clamp(12px, 1.6vw, 30px);
    width: clamp(36px, 3.6vw, 70px);
    aspect-ratio: 85 / 130;
    background: url(../img/coma.svg) no-repeat center / contain;
}

/* Color (rojo) y tamaño (XL) de los títulos de sección, en el bloque desde Gutenberg (27-11-2026) */
.titulo-seccion {
    margin-bottom: clamp(2rem, 4vw, 4.5rem);
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
}

/* Lema de dos líneas: palabra crema enorme y frase blanca encima. Centrado aunque el texto de debajo vaya a la
   izquierda, y más separado de él (Ricard, vídeo del 01-12-2026, 10:11 y 13:56) */
.lema {
    display: grid;
    justify-items: center;
    margin: 0 0 clamp(2.5rem, 5.5vw, 6.5rem);
    text-align: center;
    line-height: 1;
}

.lema__grande,
.lema__linea {
    display: block;
}

/* El color de las dos líneas va en línea desde Gutenberg (Resaltar › Texto): crema y blanco */
.lema__grande {
    margin-bottom: -0.36em;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(64px, 12.6vw, 243px);
    text-transform: uppercase;
}

/* En el diseño v8 la frase mide el 29 % de la palabra grande */
.lema__linea {
    position: relative;
    color: #fff;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 800;
    font-size: clamp(26px, 3.65vw, 70px);
}

.texto-fuerte {
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 700;
    font-size: clamp(17px, 1.55vw, 30px);
    line-height: 1.25;
}

.texto-destacado {
    margin-top: 2rem;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    line-height: 1.25;
}

/* Presentación */
#home-presentacion p {
    max-width: 1000px;
    font-weight: 500;
    font-size: clamp(17px, 1.55vw, 30px);
    line-height: 1.25;
}

/* Tamaño (M) y color (rojo, en el lema) van en el bloque, desde Gutenberg; aquí solo la letra */
#home-presentacion .texto-entrada,
#home-presentacion .texto-lema {
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
}

/* Carrusel de trabajos. Sin JS (o con movimiento reducido) se desliza en horizontal;
   con JS (js/home.js, clase carrusel--scroll) la escena se queda fija y las diapositivas pasan al bajar */
#home-carrusel {
    --ancho-diapo: 78%;
}

.carrusel {
    display: flex;
    gap: clamp(1rem, 2vw, 2.5rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.carrusel__diapositiva {
    flex: 0 0 var(--ancho-diapo);
    min-width: 0;
    scroll-snap-align: start;
}

/* Son grupos en flujo: el espacio entre bloques de WordPress les daba margen arriba a partir de la segunda y salían escalonadas */
.carrusel > .carrusel__diapositiva {
    margin-block: 0;
}

.carrusel__imagen {
    margin: 0;
}

.carrusel__imagen img {
    display: block;
    width: 100%;
    aspect-ratio: 1600 / 896;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

/* Trabajo con vídeo: play sobre la portada, abajo a la izquierda (como en el diseño); al pulsarlo, el vídeo ocupa su sitio */
.carrusel__imagen--video {
    position: relative;
}

.carrusel__play {
    position: absolute;
    left: clamp(10px, 1.2vw, 22px);
    bottom: clamp(10px, 1.2vw, 22px);
    width: clamp(44px, 4vw, 64px);
    aspect-ratio: 1;
    border: 2px solid var(--cdf-naranja);
    border-radius: 50%;
    background: color-mix(in srgb, #3c3c3b 85%, transparent);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

.carrusel__play::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    border-style: solid;
    border-width: 0.55em 0 0.55em 0.9em;
    border-color: transparent transparent transparent var(--cdf-crema);
    font-size: clamp(13px, 1.1vw, 18px);
    transform: translate(-50%, -50%);
}

.carrusel__play:is(:hover, :focus-visible) {
    transform: scale(1.08);
    background: #3c3c3b;
}

.carrusel__play:focus-visible {
    outline: 3px solid var(--cdf-crema);
    outline-offset: 3px;
    box-shadow: 0 0 0 7px #3c3c3b; /* se ve también sobre portadas claras */
}

.carrusel__imagen video {
    display: block;
    width: 100%;
    aspect-ratio: 1600 / 896;
    background: #1e1e1e;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

#home-carrusel.carrusel--scroll {
    overflow-x: clip;
}

.carrusel--scroll .carrusel__escena {
    position: sticky;
    top: var(--cabecera, 90px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - var(--cabecera, 90px));
    padding: clamp(28px, 5vh, 60px) 0 clamp(12px, 2.5vh, 32px); /* aire bajo el menú (más, Ivan 02-12-2026) y sobre el borde; js/home.js lo cuenta al medir */
}

.carrusel--scroll .carrusel {
    overflow: visible;
    scroll-snap-type: none;
    will-change: transform;
}

.carrusel--scroll .carrusel__diapositiva {
    /* --diapo-px lo pone js/home.js en escritorio: el ancho del contenido o lo que quepa en la pantalla */
    flex-basis: var(--diapo-px, min(var(--ancho-diapo), (100svh - var(--cabecera, 90px) - 420px) * 1.786));
    transition: opacity 0.5s ease;
}

.carrusel--scroll .carrusel__diapositiva:not(.is-activa) {
    opacity: 0.55;
}

.carrusel__guiones {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    margin-top: clamp(1.5rem, 3vw, 3rem);
}

.carrusel__guiones span {
    width: clamp(32px, 3.8vw, 50px);
    height: 8px;
    border-radius: 4px;
    background: var(--cdf-crema);
    transition: background-color 0.3s ease;
}

.carrusel__guiones .is-activo {
    background: var(--cdf-rojo);
}

.carrusel__titulo {
    margin: 2rem 0 1rem;
    color: var(--cdf-rojo);
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(19px, 1.6vw, 30px);
    text-transform: uppercase;
}

.carrusel__texto {
    max-width: 720px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 500;
    font-size: clamp(16px, 1.25vw, 24px);
    line-height: 1.3;
}

/* Astra subraya los enlaces del contenido: aquí no (el subrayado lo hace el círculo del +, y el botón del hero es una píldora) */
#primary .enlace-mas a,
#primary .tarjeta-trabajo__servicio a,
#primary .banda__texto a,
#primary .boton-linea {
    text-decoration: none;
}

/* Enlace con el círculo del + */
.enlace-mas a {
    display: inline-flex;
    align-items: center;
    gap: 0.7em;
    color: var(--cdf-rojo);
    font-weight: 700;
    font-size: clamp(16px, 1.25vw, 24px);
    text-decoration: none;
}

.enlace-mas a::after {
    content: "";
    flex: none;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: var(--cdf-rojo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%23E6E39E' stroke-width='3.4'/%3E%3C/svg%3E") no-repeat center / 55%;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.enlace-mas a:hover::after,
.enlace-mas a:focus-visible::after {
    transform: rotate(90deg);
}

.enlace-mas--solo a {
    font-size: 0;
}

.enlace-mas--solo a::after {
    width: 44px;
    height: 44px;
    border: 1px solid var(--cdf-rojo);
    background-color: var(--cdf-crema);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%23E64B37' stroke-width='3.4'/%3E%3C/svg%3E");
}

/* Botones */
/* Con el bloque y la clase: el ancho del contenido de la sección (en el grupo) no debe pisar su max-width */
.wp-block-buttons.botones-dobles {
    max-width: 1100px;
    margin: clamp(2.5rem, 5vw, 5rem) auto 0;
    gap: 1.5rem;
}

.botones-dobles .wp-block-button {
    flex: 1 1 300px;
}

.botones-dobles .wp-block-button__link {
    width: 100%;
    padding: 0.55em 1.5em;
    border: 3px solid;
    border-radius: 999px;
    font-weight: 700;
    font-size: clamp(16px, 1.2vw, 23px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Los botones de la home son el primario y el secundario («Contorno») de Astra, con su hover (27-11-2026) */
.botones-dobles .wp-block-button__link:hover,
.botones-dobles .wp-block-button__link:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(230, 75, 55, 0.25);
}

/* Hacemos */
.wp-block-image.imagen-bonitas {
    max-width: 660px;
    margin-top: clamp(2rem, 4vw, 4rem);
}

/* Así trabajamos */
.paso h3 {
    white-space: nowrap;
}

.pasos {
    counter-reset: paso;
    gap: 2rem;
}

.paso {
    counter-increment: paso;
    position: relative;
    padding-left: clamp(70px, 5.4vw, 104px);
}

.paso h3 {
    margin-bottom: 1rem;
    color: #111;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(24px, 2.1vw, 40px);
}

.paso--eureka h3 {
    color: var(--cdf-rojo);
}

.paso h3::before {
    content: counter(paso);
    position: absolute;
    top: -0.25em;
    left: 0;
    width: clamp(56px, 4.2vw, 80px);
    height: clamp(56px, 4.2vw, 80px);
    border: 4px solid var(--cdf-crema);
    border-radius: 50%;
    background: var(--cdf-rojo);
    color: var(--cdf-crema);
    font-style: normal;
    font-weight: 600;
    font-size: clamp(36px, 2.9vw, 56px);
    line-height: clamp(48px, 3.8vw, 72px);
    text-align: center;
}

.paso p {
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 500;
    line-height: 1.25;
}

/* Tarjetas de trabajos */
.tarjetas-trabajo {
    gap: clamp(1rem, 2.3vw, 45px) !important;
    padding: 0 clamp(1rem, 2.3vw, 45px);
}

.tarjeta-trabajo {
    --ojo: clamp(34px, 2.9vw, 56px); /* el del Portfolio (.tj__ojo); el + igual */
    --borde: clamp(14px, 1.6vw, 30px);
    --foto: 44.84cqw; /* alto de la foto en reposo: 892 × 400 */
    --baja: 100cqw; /* lo que baja la parte roja al pasar: más que su alto */
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    container-type: inline-size;
    isolation: isolate;
}

/* La foto ocupa toda la tarjeta, debajo de la parte roja (como en las tarjetas del Portfolio) */
.tarjeta-trabajo .wp-block-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
}

.tarjeta-trabajo .wp-block-image a,
.tarjeta-trabajo .wp-block-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.tarjeta-trabajo .wp-block-image img {
    object-fit: cover;
}

/* Tarjetas «El cliente», como las del Portfolio (.tj, Ivan, 02-12-2026). En reposo: la parte roja (velo al 92 %) tapa la
   foto por debajo, con el ojo en su borde y el + tras el servicio. Al pasar (o con el foco), toda la parte roja baja y
   sale con el ojo y el +; luego suben desde abajo el ojo a la izquierda (lleva al trabajo: el enlace del bloque de imagen,
   que se cambia desde el editor) y el + a la derecha (lleva al servicio) */
.tarjeta-trabajo::after {
    content: "";
    position: absolute;
    inset: var(--foto) 0 0;
    z-index: 1;
    background: color-mix(in srgb, var(--cdf-rojo) 92%, transparent);
    pointer-events: none;
}

/* Ojo en reposo, sobre el borde de la parte roja: decorativo; el clic pasa a la foto, que lleva al trabajo */
.tarjeta-trabajo::before {
    content: "";
    position: absolute;
    top: calc(var(--foto) - var(--ojo) / 2);
    left: var(--borde);
    z-index: 3;
    width: var(--ojo);
    height: var(--ojo);
    border-radius: 50%;
    background: var(--cdf-crema) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M5 20q15-15 30 0-15 15-30 0Z' fill='none' stroke='%23D14432' stroke-width='2.4'/%3E%3Ccircle cx='20' cy='20' r='5' fill='%23D14432'/%3E%3Cpath d='M12 11l-2-4M20 9V5M28 11l2-4' stroke='%23D14432' stroke-width='2'/%3E%3C/svg%3E") no-repeat center / 72%;
    pointer-events: none;
}

.tarjeta-trabajo > :not(.wp-block-image) {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.tarjeta-trabajo__servicio a {
    pointer-events: auto;
}

/* Velocidades del Portfolio: el velo baja en 0,5 s (.tj__velo) y el ojo, en 0,4 s y vuelve a subir de 0,41 a 1 s (ojo-se-va) */
.tarjeta-trabajo::after,
.tarjeta-trabajo > :not(.wp-block-image) {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tarjeta-trabajo::before {
    transition: transform 0.4s cubic-bezier(0.45, 0, 0.25, 1);
}

.tarjeta-trabajo:is(:hover, :focus-within)::before,
.tarjeta-trabajo:is(:hover, :focus-within)::after,
.tarjeta-trabajo:is(:hover, :focus-within) > :not(.wp-block-image) {
    transform: translateY(var(--baja));
}

/* Ojo que sube abajo a la izquierda: abierto encima y cerrado debajo, para el parpadeo */
.tarjeta-trabajo .wp-block-image a::before,
.tarjeta-trabajo .wp-block-image a::after {
    content: "";
    position: absolute;
    left: var(--borde);
    bottom: var(--borde);
    width: var(--ojo);
    height: var(--ojo);
    border-radius: 50%;
    background: var(--cdf-crema) no-repeat center / 72%;
    translate: 0 calc(100% + var(--borde) + 10px);
    transition: translate 0.59s cubic-bezier(0.45, 0, 0.25, 1);
}

.tarjeta-trabajo .wp-block-image a::before {
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M5 20q15-15 30 0-15 15-30 0Z' fill='none' stroke='%23D14432' stroke-width='2.4'/%3E%3Ccircle cx='20' cy='20' r='5' fill='%23D14432'/%3E%3Cpath d='M12 11l-2-4M20 9V5M28 11l2-4' stroke='%23D14432' stroke-width='2'/%3E%3C/svg%3E");
    transform-origin: 50% 55%;
}

.tarjeta-trabajo .wp-block-image a::after {
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M5 20q15 11 30 0' fill='none' stroke='%23D14432' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M11 25l-2 4M20 27v4M29 25l2 4' stroke='%23D14432' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* + que sube abajo a la derecha. Es del enlace del servicio, que ha bajado con la parte roja: lo compensa */
.tarjeta-trabajo__servicio a::before {
    content: "";
    position: absolute;
    right: var(--borde);
    bottom: var(--borde);
    width: var(--ojo);
    height: var(--ojo);
    border-radius: 50%;
    background: var(--cdf-crema) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%23E64B37' stroke-width='3.4'/%3E%3C/svg%3E") no-repeat center / 60%;
    translate: 0 calc(100% + var(--borde) + 10px);
    /* Al salir, misma duración y curva que el texto que sube: se compensan y el + baja recto y sale por abajo, como el ojo */
    transition: translate 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tarjeta-trabajo:is(:hover, :focus-within) .wp-block-image a::before,
.tarjeta-trabajo:is(:hover, :focus-within) .wp-block-image a::after {
    translate: 0 0;
    transition-delay: 0.41s;
}

.tarjeta-trabajo:is(:hover, :focus-within) .tarjeta-trabajo__servicio a::before {
    translate: 0 calc(-1 * var(--baja));
    transition: translate 0.59s cubic-bezier(0.45, 0, 0.25, 1) 0.41s; /* al entrar, como el ojo */
}

.tarjeta-trabajo:is(:hover, :focus-within) .wp-block-image a::before {
    animation: tarjeta-parpado 2.4s ease-in-out 1.1s infinite;
}

@keyframes tarjeta-parpado {
    0%,
    84%,
    100% {
        transform: scaleY(1);
        opacity: 1;
    }

    88%,
    92% {
        transform: scaleY(0.05);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tarjeta-trabajo::before,
    .tarjeta-trabajo::after,
    .tarjeta-trabajo > :not(.wp-block-image),
    .tarjeta-trabajo .wp-block-image a::before,
    .tarjeta-trabajo .wp-block-image a::after,
    .tarjeta-trabajo__servicio a::before {
        transition: none;
    }

    .tarjeta-trabajo:is(:hover, :focus-within) .wp-block-image a::before {
        animation: none;
    }
}

.tarjeta-trabajo .wp-block-image a:focus-visible {
    outline: 3px solid var(--cdf-crema);
    outline-offset: -3px;
}

/* Mosaicos de públicos: cada imagen lleva al Portfolio */
.publico__mosaico .wp-block-image a {
    display: block;
    overflow: hidden;
}

.publico__mosaico .wp-block-image img {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.publico__mosaico .wp-block-image a:hover img,
.publico__mosaico .wp-block-image a:focus-visible img {
    transform: scale(1.05);
}

/* Antes el ojo era el botón de ampliar de WordPress (por si alguna tarjeta vuelve a tener ampliación) */
.tarjeta-trabajo .wp-block-image .wp-lightbox-container button {
    top: auto !important;
    right: auto !important;
    bottom: calc(clamp(56px, 4.7vw, 90px) / -2);
    left: clamp(14px, 1.6vw, 30px);
    width: clamp(56px, 4.7vw, 90px);
    height: clamp(56px, 4.7vw, 90px);
    padding: 0;
    border-radius: 50%;
    opacity: 1;
    background: var(--cdf-crema) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M5 20q15-15 30 0-15 15-30 0Z' fill='none' stroke='%23E64B37' stroke-width='2.4'/%3E%3Ccircle cx='20' cy='20' r='5' fill='%23E64B37'/%3E%3C/svg%3E") no-repeat center / 70%;
    transition: transform 0.3s ease;
}

.tarjeta-trabajo .wp-lightbox-container button svg {
    display: none;
}

.tarjeta-trabajo .wp-lightbox-container button:hover,
.tarjeta-trabajo .wp-lightbox-container button:focus-visible {
    background-color: var(--cdf-crema);
    transform: scale(1.08);
}

.tarjeta-trabajo > :not(.wp-block-image) {
    margin: 0;
    padding: 0 clamp(14px, 1.6vw, 30px);
}

.tarjeta-trabajo__cliente {
    margin-top: calc(var(--foto) + clamp(38px, 3.6vw, 66px)) !important;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(14px, 1.3vw, 25px);
}

.tarjeta-trabajo__cita {
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(18px, 1.85vw, 36px); /* más pequeña: vídeo de Ricard, 12:33 (Ivan, 01-12-2026) */
    line-height: 1.15em;
}

.tarjeta-trabajo__servicio {
    margin-top: auto !important;
    padding-top: 1.5rem !important;
    padding-bottom: clamp(10px, 1vw, 18px) !important;
    text-align: right;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(16px, 2vw, 38px);
    line-height: 1.2;
}

/* Texto alineado a la derecha y el + en su propia columna, a la altura de la última línea: nunca debajo del texto */
.tarjeta-trabajo__servicio a {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.4em;
    text-decoration: none;
}

.tarjeta-trabajo__servicio a::after {
    content: "";
    flex: 0 0 auto;
    width: var(--ojo);
    height: var(--ojo);
    margin-bottom: -0.05em;
    border-radius: 50%;
    background: var(--cdf-crema) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%23E64B37' stroke-width='3.4'/%3E%3C/svg%3E") no-repeat center / 60%;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.tarjeta-trabajo__servicio a:hover::after,
.tarjeta-trabajo__servicio a:focus-visible::after {
    transform: rotate(90deg);
}

.simbolo-d {
    margin: clamp(3rem, 6vw, 6rem) auto;
}

/* El mismo aire arriba y abajo: el margen inferior de las imágenes del editor lo dejaba en 16 px (vídeo de Ricard, 13:48) */
.entry-content .wp-block-image.simbolo-d {
    margin-block: clamp(3rem, 6vw, 6rem);
}

.simbolo-d img {
    aspect-ratio: 230.84 / 246.19;
    height: auto;
    width: clamp(140px, 14vw, 270px);
}

/* Haremos */
.wp-block-image.insignia-valencia {
    max-width: clamp(130px, 11.5vw, 222px);
    margin-top: 2.5rem;
}

/* Trabajamos con: tres columnas separadas por una línea roja y un mosaico 2 × 2 abajo */
.publicos {
    flex-wrap: nowrap !important;
    gap: 0 !important;
}

.publicos > .publico {
    flex: 1 1 0 !important;
}

.publico {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 clamp(1rem, 2.5vw, 3rem) 0 clamp(60px, 5vw, 96px);
}

.publico + .publico {
    border-left: 2px solid var(--cdf-rojo);
}

/* Tras la línea vertical, la coma y el texto se separan de ella como en el diseño (unos 83 px a 1920) */
.publico + .publico {
    padding-left: calc(clamp(60px, 5vw, 96px) + clamp(1rem, 4.3vw, 83px));
}

.publico + .publico::before {
    left: clamp(1rem, 4.3vw, 83px);
}

.publico__mosaico {
    gap: 0 !important;
    width: 100%;
    max-width: 440px;
    margin-top: auto;
    padding-top: 2.5rem;
}

.publico__mosaico .wp-block-image {
    margin: 0;
    overflow: hidden;
}

.publico__mosaico img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.publico::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: clamp(44px, 3.6vw, 70px);
    aspect-ratio: 85 / 130;
    background: url(../img/coma.svg) no-repeat center / contain;
}

.publico h3 {
    padding-top: clamp(20px, 2.2vw, 44px);
    margin-bottom: 1.5rem;
    color: #111;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(24px, 2.1vw, 40px);
    line-height: 1.1;
}

.publico p {
    max-width: 320px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 500;
    line-height: 1.25;
}

/* Creatividad */
.creatividad {
    gap: 0 !important;
    margin: 0;
}

.creatividad__foto .wp-block-image {
    margin: 0;
}

/* El fondo de la foto es algo más claro que la sección: se funde por arriba y por la derecha */
.creatividad__foto img {
    display: block;
    width: 100%;
    mask-image: linear-gradient(to bottom, transparent, #000 12%), linear-gradient(to left, transparent, #000 14%);
    mask-composite: intersect;
}

.creatividad__texto {
    padding: clamp(2rem, 3vw, 3.5rem) clamp(1.5rem, 4vw, 78px) clamp(2rem, 3vw, 3rem) 1.5rem;
}

.creatividad__titulo {
    margin: 0 0 1rem;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(40px, 6.6vw, 127px);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.creatividad__define {
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 700;
    font-size: clamp(17px, 1.8vw, 34px);
    line-height: 1.2;
}

.creatividad__cita {
    position: relative;
    margin: 2.5rem 0 2rem;
    padding: 0;
    border: 0;
}

/* Comillas del diseño (comillas-cita-blancas del PSB): una al empezar y otra al final del último párrafo */
.creatividad__cita::before,
.creatividad__cita p:last-of-type::after {
    content: '';
    width: clamp(36px, 3.8vw, 73px);
    aspect-ratio: 59.77 / 36.79;
    background: url(../img/comillas-cita.svg) no-repeat center / contain;
}

.creatividad__cita::before {
    position: absolute;
    top: 0;
    left: calc(-1 * clamp(36px, 3.8vw, 73px) - 0.4em);
}

.creatividad__cita p:last-of-type::after {
    display: inline-block;
    margin-left: 0.4em;
    vertical-align: -0.2em;
}

.creatividad__cita::after {
    content: none;
}

/* Cita en el gris claro del diseño, cursiva 500; firma: nombre en blanco 600 y cargo en gris */
.creatividad__cita p {
    color: #C6C7C8;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(16px, 1.6vw, 30px);
    line-height: 1.2em;
}

.creatividad__cita cite {
    display: block;
    margin-top: 2rem;
    color: #C6C7C8;
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(15px, 1.6vw, 30px);
    line-height: 1.2em;
}

.creatividad__cita cite strong {
    color: #fff;
    font-weight: 600;
    font-size: 1.24em;
}

.creatividad__texto .wp-block-buttons {
    justify-content: flex-start;
}

/* Clientes */
.logos-clientes {
    gap: clamp(1.5rem, 3vw, 3rem) !important;
    align-items: center;
}

.logos-clientes .wp-block-image {
    margin: 0;
    text-align: center;
}

.logos-clientes img {
    width: 100%;
    max-width: 300px;
    transition: transform 0.3s ease;
}

.logos-clientes img:hover {
    transform: scale(1.05);
}

/* Opiniones */
#home-opiniones .titulo-seccion::before {
    content: "";
    display: block;
    width: clamp(44px, 3.6vw, 70px);
    aspect-ratio: 85 / 130;
    margin: 0 auto 1.5rem;
    background: url(../img/coma.svg) no-repeat center / contain;
}

.opiniones {
    gap: clamp(2rem, 4vw, 5rem);
}

#home-opiniones .opinion {
    margin: 0;
    padding: 0;
    border: 0;
}

#home-opiniones .opinion p {
    color: var(--ast-global-color-3);
    font-family: 'Montserrat Alternates', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: clamp(16px, 1.37vw, 26px);
    line-height: 1.5;
}

.opinion cite {
    display: block;
    margin-top: 1.5rem;
    color: #707070;
    font-style: italic;
    font-size: clamp(14px, 1vw, 18px);
}

.opinion cite strong {
    color: var(--cdf-rojo);
    font-style: normal;
    font-size: 1.4em;
}

/* Banda */
.banda__texto a {
    position: relative;
    font-weight: 700;
    font-size: clamp(26px, 4.45vw, 85px);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.banda__texto small {
    font-size: 0.6em;
}

.banda__texto a::after {
    content: "";
    position: absolute;
    top: -0.35em;
    right: -0.7em;
    width: 0.6em;
    aspect-ratio: 85 / 130;
    background: url(../img/coma.svg) no-repeat center / contain;
}

@media (width <=921px) {
    .pasos {
        flex-wrap: wrap !important;
    }

    .pasos .paso {
        flex-basis: calc(50% - 1rem) !important;
    }

    .creatividad {
        flex-wrap: wrap !important;
    }

    .creatividad__foto {
        flex-basis: 100% !important;
        max-width: 420px;
    }

    .creatividad__texto {
        flex-basis: 100% !important;
    }

    .logos-clientes {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (width <=768px) {
    #home-carrusel {
        --ancho-diapo: 86%;
    }

    .publicos {
        flex-wrap: wrap !important;
    }

    .publicos > .publico {
        flex-basis: 100% !important;
        padding-bottom: 2.5rem;
    }

    .publico + .publico {
        border-left: 0;
        border-top: 2px solid var(--cdf-rojo);
        padding-top: 2.5rem;
        padding-left: clamp(60px, 5vw, 96px);
    }

    .publico + .publico::before {
        top: 2.5rem;
        left: 0;
    }

    .tarjetas-trabajo {
        grid-template-columns: 1fr !important;
    }

    .logos-clientes {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (width <=544px) {
    .lema__grande {
        font-size: 15.5vw;
    }

    .lema__linea {
        font-size: 7.4vw;
    }

    .banda__texto a {
        font-size: 6.2vw;
        white-space: nowrap;
    }

    .pasos .paso {
        flex-basis: 100% !important;
    }

    .creatividad__cita::before {
        position: static;
        display: block;
        margin-bottom: 0.6em;
    }
}


/* Aparición al bajar (js/home.js): poco recorrido y curva suave */
.cdf-revela .revela {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--retraso, 0s), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--retraso, 0s);
}

.cdf-revela .revela.is-visto {
    opacity: 1;
    transform: none;
}
