/*
Theme Name:        Red Terrassa Bloques
Theme URI:         https://redterrassa.com
Description:       Tema de bloques propio de Red Terrassa. El diseño vive en las plantillas y los patrones; el contenido de cada página es solo texto e imágenes. Sin Nectarblocks.
Author:            Red Terrassa
Version:           0.5.54
Requires at least: 6.5
Requires PHP:      8.0
Update URI:        https://github.com/edugarlao/red-terrassa
Text Domain:       redterrassa-bloques
*/

/* Lo que theme.json no alcanza: carteles inclinados del hero, chips de barrios y poco más.
   Cada regla se justifica: es decoración o composición que el editor no ofrece. */

:root { --rt-radius-xl: 40px; --rt-radius-l: 32px; --rt-radius-m: 24px; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a:focus-visible, button:focus-visible, .wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--rt-teal);
	outline-offset: 3px;
}

/* Hero: tres carteles inclinados, con una composición estable. */
.rt-collage { position: relative; min-height: 560px; }
.rt-cartel {
	position: absolute;
	box-shadow: 0 18px 40px rgba(29, 29, 31, .25);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.rt-cartel--agenda { left: 0; top: 10px; width: min(300px, 64%); transform: rotate(-5deg); }
.rt-cartel--oferta { right: 0; top: 190px; width: min(300px, 66%); transform: rotate(4deg); }
.rt-cartel--voz { left: 8%; bottom: 0; width: min(330px, 72%); transform: rotate(-2deg); border-bottom-left-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .rt-cartel { transition: none; } }

/* Tarjetas de agenda: el día en grande */
.rt-dia { font-size: clamp(6rem, 10vw, 9.5rem); font-weight: 800; line-height: .8; letter-spacing: -.06em; margin: 0; }

/* Chips de barrio de distinto tamaño */
.rt-chips { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rt-chips .wp-block-button__link { white-space: nowrap; }

/* Ticket de oferta con muescas */
.rt-ticket { position: relative; }
.rt-ticket::before, .rt-ticket::after {
	content: ""; position: absolute; top: 50%; width: 28px; height: 28px; border-radius: 50%;
	background: var(--wp--preset--color--rt-red-deep);
}
.rt-ticket::before { left: -14px; }
.rt-ticket::after { right: -14px; }

/* Entradas del blog: el texto no pasa de una medida cómoda */
.rt-entrada .wp-block-post-content > * { max-width: 42rem; margin-left: auto; margin-right: auto; }
.rt-entrada .wp-block-post-content > .alignwide,
.rt-entrada .wp-block-post-content > .alignfull,
.rt-entrada .wp-block-post-content > figure { max-width: var(--wp--style--global--wide-size); }

/* Menú principal: píldoras; "Todo Terrassa" despliega una lista larga en dos columnas (solo al abrirse) */
.rt-menu-principal .wp-block-navigation-item__content { padding: .55rem 1rem; border-radius: 999px; }
.rt-menu-principal .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--rt-ink); color: var(--wp--preset--color--rt-white);
}
.rt-menu-principal .has-child:hover > .wp-block-navigation__submenu-container,
.rt-menu-principal .has-child:focus-within > .wp-block-navigation__submenu-container,
.rt-menu-principal .has-child > [aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px;
	min-width: min(560px, 92vw); width: min(560px, 92vw); border-radius: 24px; padding: 12px; right: 0; left: auto;
}
@media (max-width: 600px) {
	.rt-menu-principal .has-child:hover > .wp-block-navigation__submenu-container,
	.rt-menu-principal .has-child:focus-within > .wp-block-navigation__submenu-container { grid-template-columns: 1fr; }
}
/* El selector de idioma lo añade el plugin a todo bloque de navegación; en el pie no hace falta */
.rt-menu-pie .rt-idioma__item { display: none; }


/* Dentro de una entrada, los subtítulos son de lectura, no de portada */
.rt-entrada .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--titulo-3); line-height: 1.1; }
.rt-entrada .wp-block-post-content h3 { font-size: var(--wp--preset--font-size--lead); line-height: 1.2; }

/* Buscador del hero */
.rt-buscador { display: flex; gap: 8px; background: var(--wp--preset--color--rt-white); border-radius: 999px; padding: 6px; margin: 1.5rem 0 1rem; max-width: 38rem; }
.rt-buscador input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: var(--wp--preset--font-size--body); padding: .75rem 1.1rem; color: var(--wp--preset--color--rt-ink); border-radius: 999px; }
.rt-buscador input::placeholder { color: var(--wp--preset--color--rt-gray); }
.rt-buscador button { border: 0; border-radius: 999px; background: var(--wp--preset--color--rt-ink); color: var(--wp--preset--color--rt-white); font: inherit; font-weight: 600; padding: .75rem 1.5rem; cursor: pointer; }
.rt-buscador input:focus-visible, .rt-buscador button:focus-visible { outline: 3px solid var(--wp--preset--color--rt-teal); outline-offset: 2px; }
.rt-atajos .wp-block-button__link { padding: .45rem 1rem; font-weight: 600; }

/* Accesos a servicios: tarjeta entera clicable, icono por clase (rt-ico-bus, -cruz, -corazon, -cubiertos, -claqueta, -maleta, -libro, -sello) */
.rt-tile { position: relative; min-height: 200px; }
.rt-tile::before { content: ""; display: block; width: 44px; height: 44px; margin-bottom: 1.4rem; background: var(--wp--preset--color--rt-red-accessible); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.rt-tile h3 { margin: 0 0 .35rem; }
.rt-tile h3 a { color: inherit; text-decoration: none; }
.rt-tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 28px; }
.rt-tile:focus-within { outline: 3px solid var(--wp--preset--color--rt-teal); outline-offset: 3px; }
.rt-ico-bus::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='14' rx='3'/%3E%3Cpath d='M4 11h16'/%3E%3Ccircle cx='8' cy='19' r='1.6'/%3E%3Ccircle cx='16' cy='19' r='1.6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='14' rx='3'/%3E%3Cpath d='M4 11h16'/%3E%3Ccircle cx='8' cy='19' r='1.6'/%3E%3Ccircle cx='16' cy='19' r='1.6'/%3E%3C/svg%3E")}
.rt-ico-cruz::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6v6h6v6h-6v6H9v-6H3V9h6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6v6h6v6h-6v6H9v-6H3V9h6z'/%3E%3C/svg%3E")}
.rt-ico-corazon::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-4.5-9-9a5 5 0 0 1 9-3 5 5 0 0 1 9 3c-2 4.5-9 9-9 9z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-4.5-9-9a5 5 0 0 1 9-3 5 5 0 0 1 9 3c-2 4.5-9 9-9 9z'/%3E%3C/svg%3E")}
.rt-ico-cubiertos::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3v7a3 3 0 0 0 3 3v8M8 3v7M11 3v7a3 3 0 0 1-3 3M17 3c-2 2-3 5-3 8h3v10'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3v7a3 3 0 0 0 3 3v8M8 3v7M11 3v7a3 3 0 0 1-3 3M17 3c-2 2-3 5-3 8h3v10'/%3E%3C/svg%3E")}
.rt-ico-claqueta::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 9h18M8 5v4M13 5v4M18 5v4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 9h18M8 5v4M13 5v4M18 5v4'/%3E%3C/svg%3E")}
.rt-ico-maleta::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='12' rx='2'/%3E%3Cpath d='M9 8V6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='12' rx='2'/%3E%3Cpath d='M9 8V6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E")}
.rt-ico-libro::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 21V5M9 7h6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 21V5M9 7h6'/%3E%3C/svg%3E")}
.rt-ico-sello::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l4 4v14H7z'/%3E%3Cpath d='M15 3v4h4M10 12h6M10 16h6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l4 4v14H7z'/%3E%3Cpath d='M15 3v4h4M10 12h6M10 16h6'/%3E%3C/svg%3E")}

/* Franja «Hoy»: cifras del día (la genera el plugin principal, [redterrassa_hoy_cifras]) */
.rt-hoy { margin: 0; }
.rt-hoy .rt-hoy__dia { margin: 0 0 1rem; font-weight: 600; color: var(--wp--preset--color--rt-gray); }
.rt-hoy .rt-hoy__dia::first-letter { text-transform: uppercase; }
.rt-hoy .rt-hoy__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 17rem)); gap: 14px; }
.rt-hoy .rt-hoy__caja { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 24px; border-radius: 28px; text-decoration: none; color: inherit; background: var(--wp--preset--color--rt-white); }
.rt-hoy .rt-hoy__cifra { font-size: var(--wp--preset--font-size--titulo-3); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.rt-hoy .rt-hoy__que { font-size: var(--wp--preset--font-size--sm); }
.rt-hoy .rt-hoy__item:nth-child(1) .rt-hoy__caja { background: var(--wp--preset--color--rt-teal); color: var(--wp--preset--color--rt-white); }
.rt-hoy .rt-hoy__item:nth-child(2) .rt-hoy__caja { background: var(--wp--preset--color--rt-red-pale); }
.rt-hoy .rt-hoy__item:nth-child(3) .rt-hoy__caja { background: var(--wp--preset--color--rt-line); }
.rt-hoy .rt-hoy__item:nth-child(4) .rt-hoy__caja { background: var(--wp--preset--color--rt-ink); color: var(--wp--preset--color--rt-white); }
.rt-hoy .rt-hoy__cifra, .rt-hoy .rt-hoy__que { color: inherit; }
.rt-hoy .rt-hoy__caja { min-height: 0; }
.rt-hoy .rt-hoy__link:focus-visible { outline: 3px solid var(--wp--preset--color--rt-teal); outline-offset: 3px; }
.rt-hoy .rt-hoy__mas { margin: 1rem 0 0; position: static; }
.rt-hoy .rt-hoy__mas a { display: inline-block; padding: .55rem 1.2rem; border: 2px solid var(--wp--preset--color--rt-ink); border-radius: 999px; color: var(--wp--preset--color--rt-ink); text-decoration: none; font-weight: 600; }

.rt-hero h1 { margin-bottom: .35em; }

/* Colores fijos de cabecera, pie y títulos (20-nov): en producción se vieron en blanco sobre claro; no se deja a la herencia */
body { background-color: var(--wp--preset--color--rt-soft); color: var(--wp--preset--color--rt-ink); }
.rt-cabecera, .rt-cabecera a, .rt-cabecera .wp-block-site-title a, .rt-cabecera .wp-block-navigation-item__content,
.rt-cabecera .wp-block-navigation__responsive-container-open, .rt-cabecera .rt-idioma, .rt-cabecera .rt-idioma__opcion, .rt-cabecera .rt-idioma__codigo,
.rt-pie, .rt-pie a, .rt-pie .wp-block-site-title a, .rt-pie .wp-block-navigation-item__content { color: var(--wp--preset--color--rt-white) !important; }
.rt-cabecera .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content { color: var(--wp--preset--color--rt-white) !important; background: var(--wp--preset--color--rt-ink); }
.rt-cabecera .wp-block-navigation__responsive-container-open svg { fill: currentColor; }
.rt-cabecera .wp-block-search__button { background: var(--wp--preset--color--rt-ink); color: var(--wp--preset--color--rt-white) !important; }
.wp-block-post-title, .wp-block-heading { color: inherit; }
main .wp-block-post-title { color: var(--wp--preset--color--rt-ink); }
.rt-hoy .rt-hoy__mas { margin: 1.25rem 0 0 !important; position: static !important; transform: none !important; }
.rt-hoy .rt-hoy__list { margin-bottom: 0; }

/* Nectar Blocks (plugin que sigue activo) pone body { color: var(--light) } = blanco. Se fija el color en el contenedor del tema y los textos lo heredan. */
.wp-site-blocks { color: var(--wp--preset--color--rt-ink); }
.wp-site-blocks h1, .wp-site-blocks h2, .wp-site-blocks h3, .wp-site-blocks h4, .wp-site-blocks h5, .wp-site-blocks h6,
.wp-site-blocks p, .wp-site-blocks li, .wp-site-blocks span:not([class*="has-"]) { color: inherit; }

/* Nectar Blocks también fija el tamaño de h1-h3 (clamp(32px,4vw,48px)) con la misma fuerza que theme.json y gana por orden.
   «body h1» pesa un poco más que «h1» y sigue perdiendo frente a cualquier clase (.rt-cab__nombre, .rt-sec-ticket h3...). */
body h1 { font-size: var(--wp--preset--font-size--titulo-1); line-height: .86; letter-spacing: -.045em; font-weight: 800; }
body h2 { font-size: var(--wp--preset--font-size--titulo-2); line-height: .95; letter-spacing: -.04em; font-weight: 800; }
body h3 { font-size: var(--wp--preset--font-size--titulo-3); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; }

/* Hero: más aire para que los tres carteles no se pisen */
.rt-collage { min-height: 640px; }
.rt-cartel--oferta { top: 175px; }
.rt-cartel--voz { bottom: -24px; }
@media (max-width: 781px) { .rt-collage { min-height: 600px; } }

/* Título principal que añade el tema a las páginas que no lo traen */
body h1.rt-pagina-titulo { font-size: var(--wp--preset--font-size--titulo-2); line-height: .95; margin: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--30); }

/* =====================================================================================================================
   Ritmo de espacios (21-nov). Un solo juego de medidas para PC, tablet y móvil; todo se escala con clamp().
   - entre secciones de la portada:      --rt-gap-seccion
   - título de sección -> su contenido:  --rt-gap-titulo
   - relleno de las bandas de color:     --rt-pad-banda
   ===================================================================================================================== */
:root {
	--rt-gap-seccion: clamp(3rem, 7vw, 6rem);
	--rt-gap-titulo: clamp(1.25rem, 2.4vw, 1.75rem);
	--rt-pad-banda: clamp(1.5rem, 5vw, 4rem);
	--rt-radio-banda: clamp(1.75rem, 4vw, 2.5rem);
}
.wp-block-post-content > .rt-seccion + .rt-seccion { margin-block-start: var(--rt-gap-seccion); }
.wp-block-post-content > .rt-seccion:last-child { margin-block-end: var(--rt-gap-seccion); }
.rt-seccion h2 { margin-top: 0; margin-bottom: 0; }
.rt-seccion:not(.has-background) > h2:first-child { margin-bottom: var(--rt-gap-titulo); }
.rt-seccion:not(.has-background) > .wp-block-group:first-child { margin-bottom: var(--rt-gap-titulo); }
.rt-seccion:not(.has-background) > h2:first-child + p { margin-top: calc(-1 * var(--rt-gap-titulo) + .75rem); margin-bottom: var(--rt-gap-titulo); }
.rt-seccion.has-background { padding: var(--rt-pad-banda) !important; border-radius: var(--rt-radio-banda) !important; }

/* Hero: el titular se ajusta al ancho; en tablet y móvil las columnas se apilan y los carteles dejan de flotar */
.rt-hero h1 { font-size: clamp(2.75rem, 10vw, 9rem); }
@media (max-width: 1024px) {
	.rt-hero .wp-block-columns { flex-wrap: wrap !important; gap: 1.5rem !important; }
	.rt-hero .wp-block-column { flex-basis: 100% !important; }
	.rt-hero .rt-collage { min-height: 0; display: flex; flex-wrap: wrap; gap: 14px; margin-top: .5rem; }
	.rt-hero .rt-collage .rt-cartel { position: static; width: auto; flex: 1 1 14rem; transform: none; }
	.rt-hero .rt-collage .rt-cartel:hover { transform: none; }
}
.rt-hero .rt-atajos { margin-top: 0; }

/* Servicios: en móvil, dos por fila y más compactos */
@media (max-width: 600px) {
	.rt-servicios { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
	.rt-tile { min-height: 0; padding: 18px !important; border-radius: 22px !important; }
	.rt-tile::before { width: 34px; height: 34px; margin-bottom: .8rem; }
	.rt-tile .has-sm-font-size { font-size: .8125rem !important; }
	.rt-sec-tarjeta { min-height: 240px; padding: 22px; }
	.rt-hoy .rt-hoy__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Cabecera: hasta 1024 px el menú es el botón de hamburguesa (con más ancho caben las píldoras) */
@media (max-width: 1024px) {
	.rt-cabecera .wp-block-navigation__responsive-container-open { display: flex !important; }
	.rt-cabecera .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
	.rt-cabecera .wp-block-group.alignwide { flex-wrap: nowrap; gap: .75rem; }
}

/* Entradas: separación homogénea bajo la cabecera de la entrada y antes de la banda final */
.rt-entrada > * + * { margin-block-start: var(--rt-gap-titulo); }
.rt-entrada > .alignwide:last-child { margin-block-end: 0; }

/* Logotipo de la cabecera: nunca en dos líneas */
.rt-cabecera .wp-block-site-title, .rt-cabecera .wp-block-site-title a { white-space: nowrap; }
@media (max-width: 600px) { .rt-cabecera .wp-block-site-title { font-size: 1.35rem !important; } }

.rt-mini, .rt-mini * { text-decoration: none; }

/* ---- Ajustes de móvil y tablet (21-nov) ---- */
/* La agenda hacía «pantalla completa» con width:100vw y márgenes negativos, pensado para el tema antiguo: aquí se sale por la derecha. Se queda en el ancho del contenido, como las demás páginas. */
@media (max-width: 900px) {
	.rtag { width: auto !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
}
/* Red de seguridad: nada del contenido puede crear desplazamiento lateral */
.wp-site-blocks { overflow-x: clip; }
/* El aviso de cookies queda por encima de la barra inferior del móvil (la barra mide ~4,4 rem) */
@media (max-width: 760px) {
	.rt-cookies { bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Portada (cover) de las páginas convertidas: altura menor en tablet y móvil; esquinas redondeadas como el resto de bandas */
.wp-block-cover.alignwide { border-radius: var(--rt-radio-banda, 2rem); overflow: hidden; }
@media (max-width: 1024px) { .wp-block-cover.alignwide { min-height: 48vh !important; } }
@media (max-width: 600px) { .wp-block-cover.alignwide { min-height: 44vh !important; } }
.wp-block-cover .wp-block-cover__inner-container { color: var(--wp--preset--color--rt-white); }
/* Lista del blog: paginación */
.rt-blog-lista .wp-block-query-pagination { margin-top: var(--rt-gap-titulo, 1.5rem); gap: .5rem; }
.rt-blog-lista .wp-block-query-pagination a, .rt-blog-lista .wp-block-query-pagination .page-numbers { padding: .5rem 1rem; border-radius: 999px; background: var(--wp--preset--color--rt-white); text-decoration: none; font-weight: 600; }
.rt-blog-lista .wp-block-query-pagination .current { background: var(--wp--preset--color--rt-ink); color: var(--wp--preset--color--rt-white); }
.rt-blog-lista .wp-block-post-template { margin-top: var(--rt-gap-titulo, 1.5rem); }

/* Etiqueta pequeña sobre los titulares de sección (antes la daba Nectar con la clase nectar-font-label) */
.wp-site-blocks .nectar-font-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---- Contenido de páginas y entradas convertidas (21-nov) ---- */
/* Titulares dentro del contenido: tamaños de lectura, no de portada. «html body main h1» pesa más que el h1 de Nectar y de «body h1»
   y menos que cualquier clase, así los componentes de los plugins y las secciones de la portada conservan los suyos. */
html body main h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.04em; }
html body main h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -.03em; }
html body main h3 { font-size: var(--wp--preset--font-size--lead); line-height: 1.2; letter-spacing: -.01em; }
.rt-seccion h2 { font-size: var(--wp--preset--font-size--titulo-2); line-height: .95; }
.rt-seccion h3 { font-size: var(--wp--preset--font-size--titulo-3); line-height: 1.05; }
.rt-seccion.rt-hoy h2 { font-size: var(--wp--preset--font-size--titulo-3); }
/* Fotos de las entradas: nunca más altas que ~46 rem ni más anchas que su columna, y centradas */
.rt-revista-body .wp-block-image img, .rt-editorial .wp-block-image img { display: block; width: auto; max-width: 100%; max-height: 46rem; margin-inline: auto; height: auto; }
.rt-revista-body .wp-block-image, .rt-editorial .wp-block-image { margin-inline: auto; text-align: center; }

/* ---- Pie de página (patrón «Pie de página») ---- */
.rt-pie-bloque .wp-block-navigation { gap: .35rem; }
.rt-pie-bloque .wp-block-navigation__container { gap: .35rem; }
.rt-pie-bloque .wp-block-navigation-item__content { padding: .25rem 0; border-radius: 0; text-decoration: none; opacity: .88; }
.rt-pie-bloque .wp-block-navigation-item__content:hover, .rt-pie-bloque .wp-block-navigation-item__content:focus-visible { opacity: 1; text-decoration: underline; }
.rt-pie-bloque .wp-block-heading { margin-bottom: .6rem; font-size: var(--wp--preset--font-size--lead); line-height: 1.2; letter-spacing: 0; }
.rt-pie-bloque .rt-pie-copia { margin-top: var(--wp--preset--spacing--50); padding-top: var(--wp--preset--spacing--30); border-top: 1px solid rgba(255,255,255,.18); opacity: .8; }
.rt-pie-bloque .rt-sig, .rt-pie-bloque [class*="siguenos"] { margin-top: 1rem; }
.rt-pie-bloque a:focus-visible { outline-color: var(--wp--preset--color--rt-white); }
.wp-site-blocks > footer { margin-top: var(--rt-gap-seccion, 5rem); }

/* ---- Contraste (auditoría de accesibilidad, 21-nov) ---- */
.rt-hoy .rt-hoy__item:nth-child(1) .rt-hoy__caja, .rt-hoy .rt-hoy__item:nth-child(1) .rt-hoy__cifra, .rt-hoy .rt-hoy__item:nth-child(1) .rt-hoy__que,
.rt-hoy .rt-hoy__item:nth-child(4) .rt-hoy__cifra, .rt-hoy .rt-hoy__item:nth-child(4) .rt-hoy__que { color: var(--wp--preset--color--rt-white); }
/* Agenda: colores de categoría y rojo con más contraste sobre blanco */
.rtag { --red: #d9141b; --c-otros: #5d6068; --c-talleres: #8f5500; --c-visitas: #0b6b6b; --c-fiestas: #8a4a12; --c-palabra: #27664a; --c-expo: #4a5bc4; --c-gastro: #9a3434; --c-deporte: #337a1a; }
.rtag .is-today .num small { color: #fff; }
.rtag .kind span, .rtag .kind .src, .rtag .kind .own { filter: none; }
.rt-pie-bloque, .rt-pie-bloque a, .rt-pie-bloque .wp-block-navigation-item__content, .rt-pie-bloque .wp-block-site-title a, .rt-pie-bloque p, .rt-pie-bloque h3 { color: var(--wp--preset--color--rt-white) !important; }
@media (max-width: 781px) { .rt-pie-bloque .wp-block-columns { gap: 1.5rem; } }

/* Cabecera: texto oscuro (regla propia, independiente del pie) */
.rt-cabecera, .rt-cabecera a, .rt-cabecera .wp-block-site-title a, .rt-cabecera .wp-block-navigation-item__content,
.rt-cabecera .wp-block-navigation__responsive-container-open, .rt-cabecera .rt-idioma, .rt-cabecera .rt-idioma__opcion, .rt-cabecera .rt-idioma__codigo { color: var(--wp--preset--color--rt-ink) !important; }
.rt-cabecera .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content { color: var(--wp--preset--color--rt-white) !important; }

.rtag .is-today .num small, .rtag .cal .is-today small { color: #fff !important; }

/* Reserva el hueco de los botones de línea que pinta el script del mapa (evita que el horario salte al cargar). */
.rt-mapa-lineas__lineas { min-height: 3.6rem; }

/* Elementos de listados largos que aún no han tocado pantalla (ver assets/js/progresivo.js). */
.rt-dif { display: none !important; }

/* Revisión de utilidad y accesibilidad, 21-nov: información estable y legible.
   Correcciones pequeñas, sin bibliotecas nuevas ni cambios en datos o formularios. */
.rt-place, .rt-event-card, .rt-hood-card {
	animation: none !important;
	opacity: 1;
}
.rt-cabecera-dato__punto, .rt-portada-a .rt-banda__gota--activa { animation: none !important; }
.rt-cartel { transition: none; }
.rt-place:hover, .rt-hood-card:hover { padding-left: .35rem; }

/* Las etiquetas mantienen el contraste previsto; la herencia genérica del tema
   no debe sustituirlo por un color ilegible. */
.wp-site-blocks .rt-horarios__etiqueta { color: var(--rt-tono-encima, #fff) !important; }
.wp-site-blocks .rt-fx__boton--guardia,
.wp-site-blocks .rt-course-card--abierta .rt-course-card__flag { color: #fff !important; }

/* Un horario pasado sigue siendo información: se distingue por tono, sin borrarlo. */
.wp-site-blocks .rt-horarios .rt-hgrupo__horas li.is-pasada { opacity: 1 !important; color: #62646a; }
.wp-site-blocks .rt-horarios .rt-hgrupo__horas .is-pasada .rt-hgrupo__dest { color: inherit; }
.wp-site-blocks .rt-horarios .rt-hgrupo__horas li.is-proxima { color: var(--rt-tono-encima, #fff) !important; }
.rt-hgrupo__cuerpo:focus-visible { outline: 3px solid #0e6570; outline-offset: 3px; }
.rtag .dayh .num small { opacity: 1; }

/* Rojo de texto y de superficies con letra pequeña: contraste AA. */
.wp-site-blocks .rt-esc .rt-esc__negocios,
.wp-site-blocks .rt-ln .rt-ln__cabecera,
.wp-site-blocks .rt-ln .rt-ln__final,
.wp-site-blocks .rtq-btn--rojo { background: #c9141e; }
.rtc-mas summary, .rtc-prox em, .rtc a { color: #c9141e; }

/* Los filtros mantienen palabras completas y un área de pulsación cómoda. */
.rt-esc .rt-esc__chips { flex-wrap: wrap; overflow: visible; }
.rt-esc .rt-esc__chip { flex: 0 0 auto; white-space: nowrap; min-height: 44px; }
.rt-esc .rt-esc__barrio select { min-height: 44px; max-width: 100%; }
.rt-esc__barrio { flex-wrap: wrap; }

/* Puntero y teclado: tamaño mínimo en los selectores de capas del mapa. */
.rtc-panel input[type="checkbox"] { width: 24px; height: 24px; flex-shrink: 0; }
/* Desmarcar una línea cambia el borde, sin volver ilegible su número. */
.rt-mapa-lineas__boton[aria-pressed="false"] { opacity: 1 !important; border-style: dashed; }
.rt-mapa-lineas__boton[aria-pressed="true"] { outline: 2px solid #1d1d1f; outline-offset: 2px; }

/* A 320 px la lupa quedaba fuera de pantalla. Dos filas mantienen visibles
   el nombre, ambos idiomas, el menú y la búsqueda, sin encoger los controles. */
@media (max-width: 360px) {
	.rt-cabecera .wp-block-group.alignwide { flex-wrap: wrap !important; justify-content: space-between; gap: .5rem .75rem; }
	.rt-cabecera .wp-block-site-title { flex: 1 0 100%; font-size: 1.25rem !important; line-height: 1.2; }
	.rt-cabecera .wp-block-navigation { flex: 1; }
	.rt-cabecera .wp-block-search { flex: 0 0 auto; }
	.rt-sec-chips .rt-sec-chip { box-sizing: border-box; max-width: 100%; white-space: normal; overflow-wrap: break-word; text-wrap: balance; }
}

/* Quien pide movimiento reducido tampoco recibe zooms ni desplazamientos al apuntar.
   Los estados de menú abierto/cerrado y la carga diferida siguen funcionando. */
@media (prefers-reduced-motion: reduce) {
	.rt-place, .rt-event-card, .rt-hood-card, .rt-cartel, .rt-esc__enlace,
	.rt-indice__enlace, .rt-indice__nombre, .rt-indice__foto img { transition: none !important; }
	.rt-esc .rt-esc__enlace:hover, .rt-esc .rt-esc__enlace:focus-visible,
	.rt-indice__enlace:hover .rt-indice__nombre, .rt-indice__enlace:hover .rt-indice__foto img { transform: none !important; }
}

/* ===== Portada 21-nov (noche): hero a pantalla completa, zonas y noticias ===== */
.rt-hero.rt-seccion.has-background {
	border-radius: 0 !important;
	min-height: min(calc(100svh - 7rem), 60rem);
	display: flex; flex-direction: column; justify-content: center;
	padding-block: clamp(2rem, 6vw, 5rem) !important;
	padding-inline: max(1.25rem, calc((100% - 1360px) / 2)) !important;
}
.wp-block-post-content > .rt-hero { margin-block-start: 0; }
.rt-zona { padding-block: var(--rt-gap-seccion); }
.rt-zona--2 { background: var(--wp--preset--color--rt-white); }
.rt-zona > .rt-seccion + .rt-seccion { margin-block-start: var(--rt-gap-seccion); }
.rt-zona__etiqueta {
	display: flex; align-items: center; gap: .75rem; margin: 0 0 clamp(1.5rem, 3vw, 2.25rem) !important;
	font-size: var(--wp--preset--font-size--sm); font-weight: 700; color: #4b4d52; letter-spacing: 0;
}
.rt-zona__etiqueta::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--wp--preset--color--rt-red-accessible); flex: none; }
.rt-zona__etiqueta::after { content: ""; flex: 1; height: 1px; background: rgb(29 29 31 / 14%); }
.rt-zona--2 .rt-zona__etiqueta::before { background: var(--wp--preset--color--rt-teal); }
.rt-zona--3 .rt-zona__etiqueta::before { background: var(--wp--preset--color--rt-ink); }

.rt-nt-caja { height: 100%; padding: clamp(1.25rem, 3vw, 2rem); background: var(--wp--preset--color--rt-white); border-radius: 28px; border-top: 6px solid var(--wp--preset--color--rt-ink); }
.rt-nt-caja--entidades { border-top-color: var(--wp--preset--color--rt-teal); }
.rt-nt-caja h3 { margin: 0 0 .25rem; font-size: var(--wp--preset--font-size--titulo-3); line-height: 1.05; }
.rt-nt-caja > p { margin: 0 0 1rem; color: #4b4d52; }

/* «Hoy en Terrassa»: la caja medía el 100 % del alto de su celda más su relleno y se montaba sobre la fila de abajo (visto en el móvil, 21-nov). */
.rt-hoy .rt-hoy__item { display: flex; }
.rt-hoy .rt-hoy__caja { box-sizing: border-box; flex: 1 1 auto; height: auto; min-width: 0; }

/* ---- Píldora (2-dic-2026): entradas cortas de «Quién hay detrás», todo centrado y sin pantalla completa ---- */
.rt-pildora .rt-entrada { text-align: center; }
.rt-pildora .rt-entrada > .rt-solo-sencillas,
.rt-pildora .rt-entrada > .alignwide { max-width: 46rem; margin-inline: auto; }
.rt-pildora .wp-block-post-featured-image { max-width: 32rem; margin-inline: auto; }
.rt-pildora .wp-block-post-featured-image img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.rt-pildora .wp-block-post-terms, .rt-pildora .wp-block-post-title, .rt-pildora .wp-block-post-date { text-align: center; }
.rt-pildora .wp-block-post-content { max-width: 36rem; margin-inline: auto; }
.rt-pildora .wp-block-buttons { justify-content: center; }
.rt-pildora .wp-block-query .wp-block-post-template { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.rt-pildora .has-rt-red-soft-background-color { justify-content: center; text-align: center; }
.rt-pildora main .rt-siguenos { justify-content: center; text-align: center; border-inline-start: 0; }
.rt-pildora main .rt-siguenos__redes { justify-content: center; }
