:root {
    --alto-header: 100px;

    /* Colores de la marca */
    --verde: #028c42;
    --verde-oscuro: #026b33;
    --azul: #1b2a4a;
    --amarillo: #EEC846;
    --rojo: #BF514B;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: auto;
    scroll-padding-top: var(--alto-header);
}

body {
    margin: 0;
    font-family: sans-serif;
    padding-top: var(--alto-header);
}

/* ICONOS (Material Symbols)
   Se reserva su caja de 1em para que, mientras la fuente carga, el nombre del
   icono (keyboard_arrow_down") no ocupe sitio como si fuera texto. */
.material-symbols-outlined {
    display: inline-block;
    width: 1em;
    height: 1em;
    overflow: hidden;
    white-space: nowrap;
}

/* CABECERA */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--alto-header);
    box-sizing: border-box;
    background: white;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 0 30px 0 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

header img {
    display: block;
    width: 110px;
    height: auto;
    margin-left: 30px;
}

header .marca {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

header .marca-texto {
    display: block;
    width: 105px;
    flex: 0 0 105px;
    white-space: nowrap;
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: green;
    line-height: 1;
    padding-top: 6px;
}

header nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 16px;
    margin: 0;
    padding: 0;
}

/* MENU DESPLEGABLE */

.item-desplegable {
    position: relative;
}

.btn-desplegable {
    display: inline-flex;
    align-items: center;
}

.btn-desplegable .flecha-desplegable {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    line-height: 18px;
    font-size: 18px;
    overflow: hidden;
    white-space: nowrap;
    transition: transform 0.3s;
}

.submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 170px;
    margin: 0;
    padding: 8px 0;
    flex-direction: column;
    gap: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.submenu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.submenu li {
    padding: 8px 20px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s;
}

.item-desplegable.abierto .submenu {
    opacity: 1;
    visibility: visible;
}

.item-desplegable.abierto .flecha-desplegable {
    transform: rotate(180deg);
}

.item-desplegable.abierto .submenu li {
    opacity: 1;
    transform: translateY(0);
}

.item-desplegable.abierto .submenu li:nth-child(1) {
    transition-delay: 0.05s;
}

.item-desplegable.abierto .submenu li:nth-child(2) {
    transition-delay: 0.15s;
}

header nav ul a {
    text-decoration: none;
    color: #4866c8;
    font-size: 0.95rem;
    position: relative;
    font-weight: 600;
}

header nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--verde);
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    transition: 0.3s;
}

header nav a:hover::after {
    width: 100%;
}

header nav .enlace-activo>a::after {
    width: 100%;
}

/* BOTONES DE CABECERA */

.botones-header {
    display: flex;
    gap: 10px;
}

header .botones-header a {
    text-decoration: none;
    color: white;
    border-radius: 7px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    padding: 8px;
    flex-wrap: nowrap;
    gap: 2px;
    white-space: nowrap;
}

.botones-header .material-symbols-outlined {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    line-height: 18px;
    font-size: 18px;
    overflow: hidden;
    white-space: nowrap;
}

.botones-header a:first-child,
.botones-header a:last-child {
    margin: 0;
}

.botones-header a:first-child {
    background-color: var(--verde);
}

.botones-header a:last-child {
    background-color: #fbc802;
    color: var(--azul);
}

.botones-header a:first-child:hover {
    background-color: #3a6851;
}

.botones-header a:last-child:hover {
    background-color: #b69b31;
}

.botones-header a:active {
    position: relative;
    top: 1px;
    box-shadow: inset 0 1px 3px black;
}

/* 
   INICIO: HERO
    */

.hero-index {
    --alto-info: 140px;
    position: relative;
    height: 84vh;
    overflow: hidden;
}

.hero-index .img-hero {
    position: relative;
    inset: 0;
    height: 100%;
    overflow: hidden;
}

.carrusel-hero {
    position: absolute;
    inset: 0;
}

.carrusel-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.carrusel-hero img.activa {
    opacity: 1;
}

.contenido-hero {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: 0 6% var(--alto-info);
    color: white;
    background: linear-gradient(to right,
            rgba(27, 42, 74, 0.85) 0%,
            rgba(27, 42, 74, 0.5) 45%,
            transparent 75%);
    pointer-events: none;
}

.contenido-hero h1 {
    margin: 0;
    max-width: 600px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1;
    text-transform: uppercase;
}

.contenido-hero p {
    margin: 0;
    max-width: 480px;
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    line-height: 1.5;
    color: #e8edf5;
}


.hero-index .info-hero {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    box-sizing: border-box;
    min-height: var(--alto-info);
    padding: 40px 20px 24px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background: linear-gradient(to top,
            rgba(27, 42, 74, 0.9) 0%,
            rgba(27, 42, 74, 0.55) 55%,
            transparent 100%);
}

.item-contador {
    display: flex;
    align-items: center;
    gap: 15px;
}

.circulo-icono {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.circulo-icono .material-symbols-outlined {
    font-size: 32px;
    color: white;
}

.circulo-verde {
    background-color: var(--verde);
}

.circulo-amarillo {
    background-color: #fbc802;
}

.circulo-azul {
    background-color: #2f80ed;
}

.circulo-rojo {
    background-color: #d64545;
}

.dato-contador {
    text-align: left;
}

.dato-contador .numero {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.dato-contador p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #e8edf5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* ANIMACIONES DEL HERO */

@keyframes entrada-izquierda {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes entrada-abajo {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.contenido-hero h1,
.contenido-hero p {
    animation: entrada-izquierda 1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.contenido-hero p {
    animation-delay: 0.15s;
}


.hero-index .info-hero {
    animation: entrada-abajo 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s both;
}

/* 
   INICIO: ACTIVIDADES
    */

.seccion-explora {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px 40px;
    gap: 20px;
}

.cabecera-seccion {
    width: 30%;
}

.etiqueta-seccion {
    color: var(--verde);
    font-weight: 600;
    margin: 0 0 8px;
}

.cabecera-seccion h2,
.cabecera-destacados h2 {
    color: var(--azul);
    font-size: 1.5rem;
    margin: 0 0 8px;
}

.descripcion-seccion {
    color: #555;
    max-width: 500px;
    margin: 0;
    font-size: 1rem;
}

.tarjeta-explora {
    position: relative;
    width: 30%;
    height: 180px;
    text-decoration: none;
    color: white;
    border-radius: 10px;
    overflow: hidden;
}

.img-tarjeta-explora {
    position: absolute;
    inset: 0;
    background-color: lightgray;
    background-size: cover;
    background-position: center;
}

.img-tarjeta-explora img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icono-explora {
    width: 40px;
    height: 40px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 50%;
    margin: 0 0 20px;
    background-color: white;

    display: grid;
    place-items: center;
    flex-shrink: 0;
}


.info-tarjeta-explora {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    background: linear-gradient(to bottom,
            transparent,
            #000000d9);
}


.texto-tarjeta-explora {
    flex: 1 1 0;
    min-width: 0;
}

.info-tarjeta-explora>.flecha {
    flex-shrink: 0;
}

.texto-tarjeta-explora h3 {
    font-size: 1rem;
    margin: 0 0 4px;
}

.texto-tarjeta-explora p {
    margin: 0 0 20px;
}

/* ANIMACIONES DE ENTRADA */

.seccion-explora.animacion-entrada>.cabecera-seccion,
.seccion-explora.animacion-entrada>.carrusel-eventos,
.seccion-destacados.animacion-entrada>.cabecera-destacados,
.seccion-destacados.animacion-entrada>.carrusel-proyectos-inicio {
    opacity: 0;
    transition:
        opacity 1.25s cubic-bezier(.22, 1, .36, 1),
        transform 1.45s cubic-bezier(.22, 1, .36, 1);
}

.seccion-explora.entrada-izquierda>.cabecera-seccion,
.seccion-explora.entrada-izquierda>.carrusel-eventos {
    transform: translate3d(-30px, 0, 0);
}

.seccion-destacados.entrada-derecha>.cabecera-destacados,
.seccion-destacados.entrada-derecha>.carrusel-proyectos-inicio {
    transform: translate3d(30px, 0, 0);
}

.seccion-explora.animacion-entrada.es-visible>.cabecera-seccion,
.seccion-explora.animacion-entrada.es-visible>.carrusel-eventos,
.seccion-destacados.animacion-entrada.es-visible>.cabecera-destacados,
.seccion-destacados.animacion-entrada.es-visible>.carrusel-proyectos-inicio {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.seccion-actualidad.revelar-noticias .tarjeta-noticia {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 1.15s ease,
        transform 1.35s cubic-bezier(.22, 1, .36, 1);
}

.seccion-actualidad.revelar-noticias .tarjeta-noticia.es-visible {
    opacity: 1;
    transform: translateY(0);
}

.seccion-actualidad.revelar-noticias .tarjeta-noticia:nth-child(1) {
    transition-delay: .1s;
}

.seccion-actualidad.revelar-noticias .tarjeta-noticia:nth-child(2) {
    transition-delay: .32s;
}

.seccion-actualidad.revelar-noticias .tarjeta-noticia:nth-child(3) {
    transition-delay: .54s;
}

.seccion-actualidad.revelar-noticias .tarjeta-noticia:nth-child(4) {
    transition-delay: .76s;
}

/* CARRUSEL DE EVENTOS */

#proximos-eventos .carrusel-eventos {
    position: relative;
    flex: 1;
    min-width: 0;
}

#proximos-eventos .lista-eventos {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 20px) / 2);
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

#proximos-eventos .lista-eventos::-webkit-scrollbar {
    display: none;
}

#proximos-eventos .lista-eventos .tarjeta-explora {
    width: 100%;
    height: 230px;
    scroll-snap-align: start;
}

#proximos-eventos .texto-tarjeta-explora {
    min-width: 0;
}

#proximos-eventos .texto-tarjeta-explora h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

#proximos-eventos .controles-eventos {
    position: absolute;
    inset: 50% -17px auto;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

#proximos-eventos .flecha-eventos {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: white;
    background-color: transparent;
    cursor: pointer;
    pointer-events: auto;
}

#proximos-eventos .flecha-eventos:disabled {
    opacity: .35;
    cursor: default;
}

#proximos-eventos .controles-eventos[hidden],
#proximos-eventos .aviso-eventos[hidden] {
    display: none;
}

/* 
   INICIO: AREAS Y TERRITORIOS
    */

.bloque-areas-territorios {
    position: relative;
    padding: 36px 40px 50px;
}

.mundo-marco {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
    min-height: 650px;
    margin: 0 auto;
    border: 1px solid #e2e9e4;
    border-radius: 30px;
    overflow: hidden;
    background-color: #fbf9f3;
    background-image:
        linear-gradient(135deg,
            rgba(255, 255, 255, .55),
            rgba(255, 255, 255, .2)),
        url("../multimedia/inicio/textura.png");
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 35px rgba(27, 42, 74, .045);
}

.mundo-marco::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 6px;
    background: linear-gradient(to right,
            var(--rojo) 0 33.333%,
            var(--amarillo) 33.333% 66.666%,
            var(--verde) 66.666% 100%);
}

.mundo-escena {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 650px;
    padding: 34px clamp(25px, 3vw, 48px) 55px;
}

.mundo-cabecera {
    position: relative;
    z-index: 3;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}


.mundo-cabecera h2 {
    margin: 0 0 12px;
    color: var(--azul);
    font-size: clamp(1.8rem, 3.1vw, 2.7rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.mundo-cabecera>p:last-child {
    max-width: 65ch;
    margin: 0 auto;
    color: #526158;
    font-size: 15px;
    line-height: 1.65;
}

/* ILUSTRACIONES FLOTANTES */

.mundo-flotantes {
    position: relative;
    width: 100%;
    max-width: 1270px;
    height: 430px;
    margin: 15px auto 0;
}

.mundo-area {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: clamp(135px, 14.3vw, 205px);
    text-align: center;
    text-decoration: none;
    color: var(--azul);
    transition: z-index 0s;
}

.area-convivencia {
    left: 2%;
    top: -18%;
}

.area-educacion {
    left: 23%;
    top: 0;
}

.area-igualdad {
    left: 42%;
    top: 2%;
}

.area-participacion {
    left: 60%;
    top: 0;
}

.area-juventud {
    left: 80%;
    top: -18%;
}

.area-cultura {
    left: 8%;
    top: 58%;
}

.area-sensibilizacion {
    left: 31%;
    top: 55%;
}

.area-cooperacion {
    left: 56%;
    top: 65%;
}

.area-epts {
    left: 78%;
    top: 53%;
}

.mundo-area .material-symbols-outlined.mundo-area-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 2;
    font-size: clamp(115px, 8.5vw, 150px);
    line-height: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    scale: 1;
    filter: drop-shadow(0 8px 10px rgba(27, 42, 74, .10));
    font-variation-settings:
        "FILL" 1,
        "wght" 400,
        "GRAD" 0,
        "opsz" 48;
    animation: flotar-ilustracion 6s ease-in-out infinite alternate;
    transition:
        scale .55s cubic-bezier(.22, 1, .36, 1),
        filter .45s ease;
}

.mundo-area:nth-child(2n) .mundo-area-icono {
    animation-delay: -2.5s;
}

.mundo-area:nth-child(3n) .mundo-area-icono {
    animation-duration: 7.5s;
    animation-delay: -4s;
}

@keyframes flotar-ilustracion {
    from {
        transform: translateY(5px);
    }

    to {
        transform: translateY(-10px);
    }
}

.mundo-area-nombre {
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    padding: 7px 13px;
    border: 1px solid rgba(220, 230, 220, .8);
    border-radius: 999px;
    background: rgba(255, 255, 255, .87);
    color: var(--azul);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 5px 14px rgba(27, 42, 74, .06);
    backdrop-filter: blur(8px);
    transition:
        background-color .3s,
        color .3s,
        transform .4s cubic-bezier(.22, 1, .36, 1);
}

.mundo-area-descripcion {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 5;
    box-sizing: border-box;
    width: min(245px, 75vw);
    padding: 15px 17px;
    border: 1px solid #e2e9e4;
    border-radius: 13px;
    background: #fff;
    color: #526158;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
    box-shadow: 0 14px 35px rgba(27, 42, 74, .15);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    pointer-events: none;
    transition:
        opacity .3s ease,
        transform .5s cubic-bezier(.22, 1, .36, 1),
        visibility .3s;
}

.mundo-area:nth-child(n+5) .mundo-area-descripcion {
    top: auto;
    bottom: 52px;
    transform: translate(-50%, 8px);
}

.mundo-area:hover,
.mundo-area:focus-visible {
    z-index: 15;
    outline: none;
}

.mundo-area:hover .mundo-area-icono,
.mundo-area:focus-visible .mundo-area-icono {
    animation-play-state: paused;
    scale: 1.13;
    filter: drop-shadow(0 16px 18px rgba(27, 42, 74, .18));
}

.mundo-area:hover .mundo-area-nombre,
.mundo-area:focus-visible .mundo-area-nombre {
    background: var(--verde);
    color: #fff;
    transform: translateY(-3px);
}

.mundo-area:hover .mundo-area-descripcion,
.mundo-area:focus-visible .mundo-area-descripcion {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.mundo-area:focus-visible .mundo-area-nombre {
    outline: 3px solid var(--amarillo);
    outline-offset: 3px;
}

/* MAPA INTERACTIVO */

.mundo-mapa-lienzo {
    position: relative;
    width: min(100%, 980px);
    margin: 8px auto 0;
}

.mundo-mapa-imagen {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 20px rgba(27, 42, 74, .12));
}

.mundo-destino {
    position: absolute;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 11%;
    height: 12%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
}

/* HOVERS DEL MAPA - POSICIONES ACTUALIZADAS */

.destino-bizkaia {
    left: 22.6%;
    top: 22.2%;
}

.destino-gipuzkoa {
    left: 33%;
    top: 26.95%;
}

.destino-alava {
    left: 21.6%;
    top: 39.4%;
}

.destino-gambia {
    left: 63.6%;
    top: 44%;
}

.destino-guinea {
    left: 65.9%;
    top: 54.4%;
}


.mundo-destino::before {
    content: "";
    width: 38px;
    height: 38px;
    border: 2px solid var(--amarillo);
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    opacity: 0;
    transform: scale(.75);
    transition:
        opacity .3s ease,
        transform .5s cubic-bezier(.22, 1, .36, 1);
}

.mundo-destino span {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    padding: 9px 15px;
    border-radius: 9px;
    background: var(--azul);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(27, 42, 74, .18);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    pointer-events: none;
    transition:
        opacity .3s ease,
        transform .4s cubic-bezier(.22, 1, .36, 1),
        visibility .3s;
}

.mundo-destino:hover::before,
.mundo-destino:focus-visible::before {
    opacity: 1;
    transform: scale(1.15);
}

.mundo-destino:hover span,
.mundo-destino:focus-visible span {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.mundo-destino:focus-visible {
    outline: 3px solid var(--verde);
    outline-offset: 3px;
}

/* NAVEGACION DE ESCENAS */

.mundo-pasos {
    display: none;
    position: absolute;
    z-index: 30;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    gap: 7px;
    padding: 6px;
    border: 1px solid #e1e9e2;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 24px rgba(27, 42, 74, .1);
    backdrop-filter: blur(10px);
}

.mundo-paso {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #526158;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .3s, color .3s;
}

.mundo-paso-punto {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a9b9ad;
    transition: background-color .3s, transform .3s;
}

.mundo-paso.es-activo {
    background: #e9f4ed;
    color: var(--verde-oscuro);
}

.mundo-paso.es-activo .mundo-paso-punto {
    background: var(--verde);
    transform: scale(1.2);
}

.mundo-paso:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 2px;
}

.bloque-areas-territorios.mundo-enhanced {
    height: 215vh;
    box-sizing: border-box;
}

.mundo-enhanced .mundo-marco {
    position: sticky;
    top: calc(var(--alto-header) + 8px);
    height: calc(100svh - var(--alto-header) - 24px);
    min-height: 0;
}

.mundo-enhanced .mundo-escena {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(22px) scale(.985);
    transition:
        opacity 1.2s ease,
        transform 1.45s cubic-bezier(.22, 1, .36, 1),
        visibility 0s linear 1.45s;
}

.mundo-enhanced .mundo-escena.es-activa {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition:
        opacity 1.25s ease,
        transform 1.45s cubic-bezier(.22, 1, .36, 1),
        visibility 0s;
}

.mundo-enhanced .mundo-flotantes {
    height: calc(100% - 145px);
    min-height: 0;
}

.mundo-enhanced .mundo-mapa-lienzo {
    width: min(83%, 820px);
    transform: translateY(-75px);
}

.mundo-enhanced .mundo-pasos {
    display: flex;
}

/* COLORES DE LAS AREAS */

.material-symbols-outlined.icono-area {
    display: block;
    font-size: 26px;
}

.iareaCONVI {
    color: #13496B;
}

.iareaIGU {
    color: #E01483;
}

.iareaPART {
    color: #F4A261;
}

.iareaJUV {
    color: #EF402C;
}

.iareaCULT {
    color: #E2C37D;
}

.iareaSENSI {
    color: #936B41;
}

.iareaEDU {
    color: #C5192D;
}

.iareaCOOP {
    color: #1495B8;
}

.iareaEPTS {
    color: #4CA146;
}

/* 
   INICIO: PROYECTOS DESTACADOS
    */

.seccion-destacados {
    padding: 30px 40px 40px;
}

.cabecera-destacados {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.enlace-ver-todos {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--verde);
    font-weight: 600;
    white-space: nowrap;
}

.tarjetas-destacados {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.carrusel-proyectos-inicio {
    position: relative;
    min-width: 0;
}

#lista-ultimos-proyectos {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

#lista-ultimos-proyectos::-webkit-scrollbar {
    display: none;
}

#lista-ultimos-proyectos .tarjeta-proyecto {
    min-width: 0;
    scroll-snap-align: start;
}

#lista-ultimos-proyectos .img-tarjeta-proyecto {
    height: 190px;
    overflow: hidden;
}

#lista-ultimos-proyectos .img-tarjeta-proyecto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carrusel-proyectos-inicio .controles-proyectos {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.carrusel-proyectos-inicio .controles-proyectos[hidden] {
    display: none;
}

.carrusel-proyectos-inicio .controles-proyectos button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: white;
    color: var(--azul);
    box-shadow: 0 2px 8px #0003;
    cursor: pointer;
    pointer-events: auto;
}

.carrusel-proyectos-inicio .controles-proyectos button:disabled {
    opacity: .35;
    cursor: default;
}

/* TARJETAS DE PROYECTOS */

.tarjeta-proyecto {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
}

.img-tarjeta-proyecto {
    height: 150px;
    border-radius: 10px;
    margin-bottom: 12px;
    background-color: lightgray;
}

.etiquetas-proyecto {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.etiqueta {
    font-size: 12px;
    font-weight: 600;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: #2f80ed;
    border: 2px solid transparent;
}

.etiqueta-convivencia {
    background-color: #13496B;
    color: white;
}

.etiqueta-igualdad {
    background-color: #E01483;
    color: white;
}

.etiqueta-participacion-ciudadana {
    background-color: #F4A261;
    color: white;
}

.etiqueta-juventud {
    background-color: #EF402C;
    color: white;
}

.etiqueta-cultura {
    background-color: #59BA48;
    color: white;
}

.etiqueta-sensibilizacion {
    background-color: #936B41;
    color: white;
}

.etiqueta-educacion {
    background-color: #C5192D;
    color: white;
}

.etiqueta-cooperacion {
    background-color: #27BFE6;
    color: white;
}

.etiqueta-epts {
    background-color: #4CA146;
    color: white;
}

.etiqueta-lugar {
    background-color: white;
    border-color: lightgray;
    color: #444;
}

.tarjeta-proyecto h3 {
    color: var(--azul);
    margin: 0 0 6px;
    font-size: 16px;
}

.tarjeta-proyecto p {
    color: #555;
    font-size: 14px;
    margin: 0 0 14px;
}

.boton-ver-proyecto {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    gap: 6px;
    text-decoration: none;
    color: white;
    background-color: var(--verde);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 7px;
}

.boton-ver-proyecto:hover {
    background-color: #3a6851;
}

/* 
   INICIO: ACTUALIDAD
    */

.tarjetas-actualidad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.seccion-actualidad .tarjeta-noticia {
    min-width: 0;
}

.seccion-actualidad .tarjeta-noticia:first-child {
    grid-row: span 3;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.seccion-actualidad .tarjeta-noticia:first-child .img-noticia {
    width: 100%;
    height: clamp(220px, 24vw, 340px);
    aspect-ratio: auto;
    border-radius: 0;
    overflow: hidden;
}

.seccion-actualidad .tarjeta-noticia:first-child .texto-noticia {
    padding: 20px;
}

.seccion-actualidad .tarjeta-noticia:first-child h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 10px;
}

.seccion-actualidad .tarjeta-noticia:not(:first-child) {
    align-items: center;
}

.seccion-actualidad .tarjeta-noticia:not(:first-child) .img-noticia {
    width: 115px;
    height: 115px;
}

.seccion-actualidad .tarjeta-noticia:not(:first-child) .texto-noticia {
    min-width: 0;
}

.tarjeta-noticia {
    flex: 1;
    min-width: 260px;
    display: flex;
    gap: 15px;
    border: 1px solid lightgray;
    border-radius: 10px;
    padding: 12px;
}

.img-noticia {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: lightgray;
}

.img-noticia img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.fecha-noticia {
    color: var(--verde);
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 4px;
}

.tarjeta-noticia h3 {
    color: var(--azul);
    font-size: 15px;
    margin: 0 0 4px;
}

.tarjeta-noticia p {
    color: #555;
    font-size: 13px;
    margin: 0 0 8px;
}

.seccion-actualidad .texto-noticia>p:not(.fecha-noticia) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.enlace-leer-mas {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--verde);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.seccion-actualidad,
.seccion-transparencia {
    padding: 30px 40px 40px;
}

.seccion-transparencia .cabecera-seccion {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    width: auto;
    margin-bottom: 30px;
}

/* TRANSPARENCIA DEL INICIO */

.contenido-transparencia {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.lista-transparencia {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    flex: 2;
    min-width: 320px;
}

.lista-transparencia li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    border-radius: 6px;
}

.lista-transparencia li a:hover h4 {
    color: #E9C46A;
    text-decoration: underline;
}

.lista-transparencia li a:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 5px;
}

.icono-transparencia {
    color: var(--verde);
    font-size: 24px;
}

.lista-transparencia h4 {
    color: var(--azul);
    margin: 0 0 4px;
    font-size: 14px;
}

.lista-transparencia p {
    color: #555;
    font-size: 13px;
    margin: 0;
}

/* NEWSLETTER DEL INICIO */

.newsletter {
    flex: 1;
    min-width: 260px;
}

.titulo-newsletter {
    color: var(--azul);
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px;
}

.texto-newsletter {
    color: #555;
    font-size: 13px;
    margin: 0 0 14px;
}


.form-newsletter {
    display: flex;
    gap: 8px;
    position: relative;
}


.form-newsletter input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dbe4de;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    color: var(--azul);
    color-scheme: light;
}

.form-newsletter input::placeholder {
    color: #777777;
    opacity: 1;
}

.form-newsletter input:focus {
    outline: none;
    border-color: var(--verde);
}

.form-newsletter button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    color: white;
    background-color: var(--verde);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 16px;
    border-radius: 7px;
}

.form-newsletter button:hover {
    background-color: #3a6851;
}

.form-newsletter .material-symbols-outlined {
    font-size: 18px;
}


/* BURBUJA DE AVISO DE SUSCRIPCIÓN */

.aviso-newsletter {
    position: absolute;
    z-index: 100;
    top: calc(100% + 12px);
    right: 0;

    width: max-content;
    max-width: min(320px, calc(100vw - 32px));
    box-sizing: border-box;

    padding: 12px 15px;

    background: #FAF2F2;
    color: #983D38;
    border: 1px solid var(--rojo);
    border-radius: 11px;

    font: 600 13px/1.5 system-ui, sans-serif;
    text-align: left;
    overflow-wrap: anywhere;

    box-shadow: 0 8px 25px rgb(27 42 74 / 16%);
    pointer-events: none;
}

.aviso-newsletter[hidden] {
    display: none;
}

.aviso-newsletter::before {
    content: "";
    position: absolute;

    top: -7px;
    right: 28px;

    width: 12px;
    height: 12px;

    background: #FAF2F2;
    border-left: 1px solid var(--rojo);
    border-top: 1px solid var(--rojo);

    transform: rotate(45deg);
}


/* Mantener el aviso de suscripción por encima del footer */

.pagina-inicio .hero-index~.seccion-transparencia {
    position: relative;
    z-index: 2;
}

/* FOOTER GLOBAL */

footer {
    background-color: var(--azul);
    color: white;
    padding: 40px 35px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-items: center;
    gap: 30px;
}

.footer-marca {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.footer-marca img {
    width: 150px;
    height: auto;
}

.footer-nombre {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-slogan {
    margin: 2px 0 0;
    font-size: 13px;
    color: #cfd6e6;
}

.footer-contacto,
.footer-legal,
.footer-social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.footer-contacto,
.footer-legal {
    align-items: flex-start;
    text-align: left;
}

.footer-contacto li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.footer-contacto a {
    color: #cfd6e6;
    text-decoration: none;
}

.footer-legal {
    gap: 20px;
}

.footer-legal a {
    color: #cfd6e6;
    text-decoration: none;
}

.footer-social {
    flex-direction: row;
    justify-content: center;
    gap: 14px;
    font-size: 1.4rem;
}

.footer-social a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: #E9C46A;
}

/* 
   BLOG: PORTADA
    */

.pagina-blog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 32px 70px;
    color: var(--azul);
}

.pagina-blog [hidden] {
    display: none !important;
}

.pagina-blog .cabecera-blog {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--azul);
}

.pagina-blog .cabecera-blog h1 {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0 0 8px;
}

.pagina-blog .cabecera-blog p {
    margin: 0 0 8px;
}

.pagina-blog .boton-buscar-blog {
    appearance: none;
    color-scheme: light;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: var(--azul);
    border: 1px solid #dbe4de;
    border-radius: 50%;
    cursor: pointer;
    transition:
        background-color .3s ease,
        color .3s ease,
        box-shadow .3s ease,
        transform .3s ease;
}

.pagina-blog .boton-buscar-blog:hover,
.pagina-blog .boton-buscar-blog[aria-expanded="true"] {
    background-color: #edf7f0;
    color: var(--verde);
    box-shadow: 0 4px 16px rgba(2, 140, 66, .12);
}

.pagina-blog .boton-buscar-blog:hover {
    transform: scale(1.05);
}

.pagina-blog .panel-busqueda-blog {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    margin-top: 0;
    padding: 0 22px;
    background: #f6f9f7;
    border-radius: 10px;
    pointer-events: none;
    transition:
        max-height .45s cubic-bezier(.22, 1, .36, 1),
        opacity .3s ease,
        transform .4s ease,
        margin-top .4s ease,
        padding .4s ease,
        visibility .45s;
}

.pagina-blog .panel-busqueda-blog.abierto {
    max-height: 260px;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    margin-top: 20px;
    padding: 22px;
    pointer-events: auto;
}

.pagina-blog .panel-busqueda-blog label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.pagina-blog .campo-busqueda-blog {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #dbe4de;
    border-radius: 8px;
}

.pagina-blog .campo-busqueda-blog input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font: inherit;
    background-color: #ffffff;
    color: var(--azul);
    color-scheme: light;
}

.pagina-blog .campo-busqueda-blog button {
    border: none;
    background: transparent;
    color: var(--verde);
    font-weight: 600;
    cursor: pointer;
}

.pagina-blog .portada-blog {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 30px;
    padding: 35px 0;
    border-bottom: 1px solid #dbe4de;
}

.pagina-blog .noticias-secundarias {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.pagina-blog .noticia-blog {
    min-width: 0;
}

.pagina-blog .enlace-noticia-blog {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.pagina-blog .imagen-noticia-blog {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f1f3f2;
    border-radius: 8px;
}

.pagina-blog .meta-noticia-blog {
    font-size: 12px;
    font-weight: 600;
    color: var(--verde);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pagina-blog .noticia-blog h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--azul);
}

.pagina-blog .noticia-blog p {
    margin: 0;
    color: #555;
    font-size: .95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.pagina-blog .enlace-noticia-blog:hover h3 {
    color: var(--verde);
}

.pagina-blog .noticia-principal .noticia-blog p {
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

.pagina-blog .noticias-secundarias .noticia-blog p {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.pagina-blog .noticia-principal h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.pagina-blog .noticia-principal .imagen-noticia-blog {
    aspect-ratio: 16 / 10;
}

.pagina-blog .noticias-secundarias .imagen-noticia-blog {
    aspect-ratio: 16 / 7;
}

.pagina-blog .noticias-secundarias h3 {
    font-size: 1.1rem;
}

.pagina-blog .archivo-blog,
.pagina-blog .resultados-blog {
    padding-top: 35px;
}

.pagina-blog .cabecera-archivo-blog h2,
.pagina-blog .resultados-blog h2 {
    font-size: 1.7rem;
    margin: 0 0 25px;
}

.pagina-blog .lista-noticias-blog {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 20px;
}

.pagina-blog .lista-noticias-blog .noticia-blog {
    padding-bottom: 20px;
    border-bottom: 1px solid #dbe4de;
}

.pagina-blog #ver-mas-noticias {
    margin: 30px auto 0;
    border: none;
    cursor: pointer;
}

.pagina-blog #aviso-blog {
    color: #555;
}

/* 
   BLOG: ENTRADA INDIVIDUAL
    */

.pagina-entrada {
    max-width: 1100px;
    margin: 0 auto;
    padding: 35px 30px 70px;
    color: var(--azul);
}

.pagina-entrada [hidden] {
    display: none !important;
}

.pagina-entrada .navegacion-entrada {
    margin-bottom: 35px;
}

.pagina-entrada .navegacion-entrada a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--verde);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.pagina-entrada .navegacion-entrada a:hover {
    text-decoration: underline;
}

.pagina-entrada .cabecera-entrada {
    max-width: 850px;
    margin: 0 auto 30px;
}

.pagina-entrada .categoria-entrada {
    color: var(--verde);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px;
}

.pagina-entrada .cabecera-entrada h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.13;
    letter-spacing: -1px;
    margin: 0 0 20px;
    overflow-wrap: break-word;
}

.pagina-entrada .fecha-publicacion-entrada {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 14px;
    margin: 0;
}

.pagina-entrada .figura-entrada {
    margin: 0 auto 40px;
    max-width: 1000px;
    text-align: center;
}

.pagina-entrada .figura-entrada img {
    display: block;
    width: 100%;
    height: clamp(220px, 42vw, 520px);
    object-fit: cover;
    object-position: center;
    margin: 0 auto;
    border-radius: 10px;
}

.pagina-entrada .figura-entrada video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 10px;
    background-color: #000;
    margin: 0 auto;
}


.pagina-entrada .contenido-entrada {
    max-width: 760px;
    margin: 0 auto;
    color: #333;
    font-size: 1.08rem;
    line-height: 1.85;
    overflow-wrap: break-word;
}

.pagina-entrada .contenido-entrada p {
    margin: 0 0 1.5rem;
}

.pagina-entrada .contenido-entrada h2,
.pagina-entrada .contenido-entrada h3 {
    color: var(--azul);
    line-height: 1.3;
    margin: 2rem 0 1rem;
}

.pagina-entrada .contenido-entrada img,
.pagina-entrada .contenido-entrada video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 25px auto;
    border-radius: 8px;
}

.pagina-entrada .contenido-entrada figure {
    margin: 30px 0;
}

.pagina-entrada .contenido-entrada figcaption {
    color: #777;
    font-size: 13px;
    text-align: center;
}

.pagina-entrada .contenido-entrada a {
    color: var(--verde);
    overflow-wrap: anywhere;
}

.pagina-entrada .contenido-entrada blockquote {
    margin: 30px 0;
    padding: 12px 25px;
    border-left: 4px solid var(--verde);
    background: #f6f9f7;
    font-style: italic;
}

.pagina-entrada .contenido-entrada table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.pagina-entrada .contenido-entrada td,
.pagina-entrada .contenido-entrada th {
    padding: 10px;
    border: 1px solid #dbe4de;
}

.pagina-entrada .proyecto-relacionado-entrada {
    max-width: 760px;
    margin: 45px auto 0;
    padding: 25px;
    border-radius: 10px;
    background: #f6f9f7;
}

.pagina-entrada .proyecto-relacionado-entrada h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.pagina-entrada .proyecto-relacionado-entrada p {
    margin: 0 0 20px;
}


/* 
   BOTON VOLVER ARRIBA
    */

.boton-volver-arriba {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 90;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--verde);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px);
    transition:
        background .2s,
        opacity .35s ease,
        transform .45s cubic-bezier(.22, 1, .36, 1),
        visibility .35s;
}

.boton-volver-arriba.es-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.boton-volver-arriba:hover {
    background: var(--verde-oscuro);
    transform: translateY(-3px);
}

.boton-volver-arriba:focus-visible {
    outline: 3px solid var(--azul);
    outline-offset: 3px;
}

.boton-volver-arriba .material-symbols-outlined {
    font-size: 25px;
}

/* 
   TRANSPARENCIA
    */

.pagina-transparencia {
    color: var(--azul);
}

/* PRESENTACION */

.transparencia-hero {
    max-width: 850px;
    padding: 16px 0 28px;
}

.transparencia-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin: 10px 0 20px;
}

.transparencia-hero>p:not(.etiqueta-seccion) {
    max-width: 75ch;
    color: #526158;
    line-height: 1.75;
    margin: 0 0 12px;
}

/* INDICE */

.transparencia-indice {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0;
    margin-bottom: 14px;
    border-top: 1px solid #dbe4de;
    border-bottom: 1px solid #dbe4de;
}

.transparencia-indice a {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--azul);
    background: #fff;
    border: 1px solid #dbe4de;
    border-radius: 7px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}

.transparencia-indice a:hover,
.transparencia-indice a:focus-visible {
    background-color: #FBF7E7;
    border-color: var(--amarillo);
    color: var(--azul);
}

/* SECCIONES */

.transparencia-seccion {
    padding: 42px 0;
    border-bottom: 1px solid #e3e8e5;
    scroll-margin-top: 110px;
}

.transparencia-cabecera {
    max-width: 780px;
    margin-bottom: 24px;
}

.transparencia-numero {
    color: var(--verde);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0 0 10px;
}

.transparencia-cabecera h2 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    line-height: 1.3;
    margin: 0 0 12px;
}

.transparencia-cabecera>p:not(.transparencia-numero) {
    color: #526158;
    line-height: 1.7;
}

/* DOCUMENTOS */

.transparencia-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.transparencia-documento {
    padding: 26px;
    background: #fff;
    border: 1px solid #dbe4de;
    border-radius: 10px;
}

.transparencia-documento>.material-symbols-outlined {
    display: block;
    color: var(--verde);
    font-size: 30px;
    margin-bottom: 16px;
}

.transparencia-documento h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
}

.transparencia-documento>p {
    color: #526158;
    line-height: 1.6;
    margin: 0 0 14px;
}

.transparencia-documento .transparencia-estado {
    font-size: .85rem;
    color: #6c746f;
    margin-top: 20px;
    margin-bottom: 0;
}

.transparencia-enlace {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--verde);
    font-weight: 700;
    text-decoration: none;
    margin-top: 12px;
}

.transparencia-enlace:hover {
    text-decoration: underline;
}

/* TABLA */

.transparencia-tabla-contenedor {
    overflow-x: auto;
    border: 1px solid #dbe4de;
    border-radius: 10px;
}

.transparencia-tabla {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    text-align: left;
}

.transparencia-tabla caption {
    padding: 16px;
    text-align: left;
    font-weight: 700;
}

.transparencia-tabla th,
.transparencia-tabla td {
    padding: 16px;
    border-top: 1px solid #FBF7E7;
}

.transparencia-tabla th {
    background: #FBF7E7;
    font-size: .9rem;
}

.transparencia-tabla a,
.transparencia-tabla a:visited {
    color: var(--rojo);
    text-decoration: none;
    transition: color .2s ease;
}

.transparencia-tabla a:hover,
.transparencia-tabla a:focus-visible {
    text-decoration: underline;
}

.transparencia-vacia {
    color: #6c746f;
    text-align: center;
    padding: 30px 16px !important;
}

.transparencia-nota {
    color: #68736d;
    font-size: .9rem;
    line-height: 1.6;
}

/* ENTIDADES COLABORADORAS */

.transparencia-colaboradoras {
    padding: 42px 0 20px;
    scroll-margin-top: 110px;
}

.carrusel-colaboradoras {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 12px 0;
    mask-image: linear-gradient(to right,
            transparent,
            black 5%,
            black 95%,
            transparent);
}

.pista-colaboradoras {
    display: flex;
    width: max-content;
    animation: desplazar-colaboradoras 35s linear infinite;
    will-change: transform;
}

.grupo-colaboradoras {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 20px;
    flex-shrink: 0;
}

.logo-colaboradora {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 110px;
    padding: 18px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #dbe4de;
    border-radius: 10px;
    flex-shrink: 0;
}

.logo-colaboradora img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .8;
    transition:
        filter .3s ease,
        opacity .3s ease,
        transform .3s ease;
}

.logo-colaboradora:hover img {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.04);
}

.carrusel-colaboradoras:hover .pista-colaboradoras,
.carrusel-colaboradoras:focus-within .pista-colaboradoras {
    animation-play-state: paused;
}

@keyframes desplazar-colaboradoras {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* CTA DE CONTACTO */

.transparencia-contacto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 30px;
    margin-top: 38px;
    background: #FBF7E7;
    border-left: 4px solid var(--amarillo);
    border-radius: 8px;
}

.transparencia-contacto h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.transparencia-contacto p:last-child {
    max-width: 65ch;
    line-height: 1.6;
    color: #526158;
}

.transparencia-boton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 7px;
    background: var(--verde);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.transparencia-boton:hover {
    background: #006e38;
}

/* Evita que las animaciones generen scroll
   horizontal sin bloquear el scroll vertical */

html,
body {
    overflow-x: clip;
}

/* =
   HAALY PULAR | BURBUJA Y PANEL DE PRIVACIDAD
   = */

.haaly-cookies,
.haaly-cookies *,
.haaly-cookies *::before,
.haaly-cookies *::after {
    box-sizing: border-box;
}

.haaly-cookies {

    position: fixed;
    z-index: 9999;

    width: 48px;
    height: 48px;

    pointer-events: none;

    /* Deslizamiento suave hasta el borde */
    transition:
        left .85s cubic-bezier(.22, 1, .36, 1),
        top .85s cubic-bezier(.22, 1, .36, 1),
        opacity .24s ease,
        transform .24s ease;
}

.haaly-cookies button,
.haaly-cookies input,
.haaly-cookies summary {
    font-family: inherit;
}


/* POSICION FIJA DESPUES DEL CONSENTIMIENTO */

.haaly-cookies--fija {
    top: auto;
    left: auto;
    right: 25px;
    bottom: 83px;
}


/* 
   BURBUJA FLOTANTE
    */

.haaly-cookies__burbuja {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 12px;
    border: none;
    border-radius: 50%;
    background: #9D7E67;
    color: white;
    box-shadow: 0 6px 18px #1842223d;

    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;

    transition:
        background .2s ease,
        box-shadow .2s ease;
}

.haaly-cookies__burbuja:hover {
    background: #275d35;
    box-shadow: 0 8px 22px 45884B;
}

.haaly-cookies__burbuja svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* 
   PANEL DE COOKIES
    */

.haaly-cookies__panel {
    position: fixed;

    width: min(390px, calc(100vw - 32px));
    max-height: calc(100dvh - 24px);

    padding: 21px;
    overflow: auto;

    pointer-events: auto;

    border: 1px solid #dfe9e0;
    border-radius: 22px;

    background: rgba(247, 250, 248, .98);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow: 0 18px 56px rgba(17, 45, 27, .2);

    color: #223149;
    font-size: 14px;
    line-height: 1.55;

    scrollbar-width: thin;
}

.haaly-cookies [hidden] {
    display: none !important;
}

/* 
   CABECERA
    */

.haaly-cookies__cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.haaly-cookies__distintivo {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #408747;
}

.haaly-cookies__panel h2 {
    margin: 0 0 9px;

    color: var(--azul);

    font-size: clamp(19px, 4.8vw, 22px);
    line-height: 1.2;
    font-weight: 800;
}

.haaly-cookies__intro {
    margin: 0 0 17px;

    color: #4f5f58;
    font-size: 13px;
}

/* 
   BOTONES ACEPTAR Y RECHAZAR
    */

.haaly-cookies__acciones {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.haaly-cookies__acciones button,
.haaly-cookies__guardar {
    min-height: 43px;
    padding: 9px 12px;

    border: 1px solid #408747;
    border-radius: 11px;

    background: #408747;
    color: white;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition: background .2s ease;
}

.haaly-cookies__acciones button:hover,
.haaly-cookies__guardar:hover {
    background: #275d35;
}

.haaly-cookies__secundario,
.haaly-cookies__volver {
    display: block;

    width: 100%;
    min-height: 41px;

    margin-top: 9px;
    padding: 8px 12px;

    border: 1px solid #d3e5d6;
    border-radius: 11px;

    background: white;
    color: #275d35;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.haaly-cookies__secundario:hover,
.haaly-cookies__volver:hover {
    background: #eaf4ed;
}

/* 
   BOTON CERRAR
    */

.haaly-cookies__cerrar {
    width: 31px;
    height: 31px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #e7f1e9;
    color: #275d35;

    font-size: 21px;
    cursor: pointer;
}

/* 
   OPCIONES DE CONFIGURACION
    */

.haaly-cookies__opcion {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
    margin-bottom: 9px;
    padding: 11px;

    border: 1px solid #dce9df;
    border-radius: 11px;

    background: rgba(255, 255, 255, .75);
}

.haaly-cookies__opcion strong {
    display: block;
    color: #213c2b;
}

.haaly-cookies__opcion small {
    display: block;
    margin-top: 3px;

    color: #5c6c63;
    font-size: 11px;
    line-height: 1.45;
}

.haaly-cookies__etiqueta {
    flex-shrink: 0;

    font-size: 11px;
    font-weight: 700;
    color: #408747;
}

.haaly-cookies__opcion input[type="checkbox"] {
    flex-shrink: 0;

    width: 21px;
    height: 21px;
    margin: 0;

    accent-color: #408747;
    cursor: pointer;
}

.haaly-cookies__guardar {
    width: 100%;
}

/* 
   INFORMACION ADICIONAL
    */

.haaly-cookies__detalles {
    padding-top: 12px;
    margin-top: 13px;

    border-top: 1px solid #dce9df;

    color: #526359;
    font-size: 12px;
}

.haaly-cookies__detalles summary {
    color: #275d35;
    font-weight: 700;
    cursor: pointer;
}

.haaly-cookies__detalles p {
    margin: 8px 0 0;
}

.haaly-cookies__detalles a {
    color: #275d35;
}

/* 
   ACCESIBILIDAD
    */

.haaly-cookies button:focus-visible,
.haaly-cookies a:focus-visible,
.haaly-cookies summary:focus-visible,
.haaly-cookies input:focus-visible {
    outline: 3px solid var(--amarillo);
    outline-offset: 3px;
}

@keyframes cookies-entrada {
    from {
        opacity: 0;
        transform: translateY(35px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.haaly-cookies--pendiente .haaly-cookies__panel:not([hidden]) {
    animation: cookies-entrada .85s cubic-bezier(.22, 1, .36, 1) both;
}

/* 
   HAALY PULAR | REDES SOCIALES FLOTANTES
    */

.haaly-redes,
.haaly-redes * {
    box-sizing: border-box;
}

.haaly-redes {
    --redes-azul: var(--azul);
    --redes-verde: #408747;

    position: fixed;
    z-index: 9998;

    width: 48px;
    height: 48px;

    right: 25px;
    bottom: 141px;
}

/* BOTON PRINCIPAL */

.haaly-redes__boton {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--redes-azul);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    cursor: pointer;
    touch-action: manipulation;
    transition:
        background .2s ease,
        box-shadow .2s ease;
}

.haaly-redes__boton:hover {
    background: #30466f;
    box-shadow: 0 6px 16px rgba(27, 42, 74, .25);
}

.haaly-redes__boton svg {
    grid-area: 1 / 1;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* CAMBIO DE ICONO */

.haaly-redes__cerrar,
.haaly-redes--abiertas .haaly-redes__abrir {
    display: none;
}

.haaly-redes--abiertas .haaly-redes__cerrar {
    display: block;
}

/* COLUMNA DESPLEGABLE */


/* COLUMNA DESPLEGABLE */

.haaly-redes__lista {
    position: absolute;
    max-height: max(0px, calc(100dvh - 209px));
    right: 0;
    bottom: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 48px;
    padding: 0 0 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px);
    transition:
        opacity .38s ease,
        transform .52s cubic-bezier(.16, 1, .3, 1),
        visibility 0s linear .52s;
}

.haaly-redes__lista::-webkit-scrollbar {
    display: none;
}

/* DESPLEGADO */

.haaly-redes--abiertas .haaly-redes__lista {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
        opacity .38s ease,
        transform .52s cubic-bezier(.16, 1, .3, 1),
        visibility 0s;
}


/* CIRCULOS DE REDES SOCIALES */

.haaly-redes__enlace {
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dce8df;
    border-radius: 50%;
    background: #fff;
    color: var(--redes-verde);
    font-size: 19px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(27, 42, 74, .10);
    opacity: 0;
    transform: translateY(18px) scale(.88);
    transition:
        opacity .34s ease,
        transform .48s cubic-bezier(.16, 1, .3, 1),
        background .2s ease,
        color .2s ease;

}


/* APARICION ESCALONADA */

.haaly-redes--abiertas .haaly-redes__enlace {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: calc(var(--orden) * 55ms);
}

/* HOVER */

.haaly-redes__enlace:hover {
    background: var(--redes-verde);
    color: white;
}

/* ICONOS DE CADA RED */

.haaly-redes__enlace i,
.haaly-redes__enlace svg {
    width: 19px;
    height: 19px;
    font-size: 19px;
}

/* ACCESIBILIDAD */

.haaly-redes__boton:focus-visible,
.haaly-redes__enlace:focus-visible {
    outline: 3px solid var(--amarillo);
    outline-offset: 3px;
}

/* TEXTOS JUSTIFICADOS | PROYECTOS Y ACTIVIDADES */

/* Fichas de proyectos */
.contenido-ficha .resumen-proyecto,
.contenido-ficha .descripcion-proyecto,
.contenido-ficha .bloques-detalle p,
.contenido-ficha #acciones-proyecto li,

/* Fichas de actividades */
.contenido-actividad .descripcion-actividad,

/* Tarjetas de proyectos */
.tarjeta-proyecto p,

/* Noticias completas */
.pagina-entrada .contenido-entrada p,
.pagina-entrada .contenido-entrada li,

/* Tarjetas de noticias */
.pagina-blog .noticia-blog p,

/* Noticias de la portada */
.tarjeta-noticia .texto-noticia p:not(.fecha-noticia) {
    text-align: justify;
    hyphens: auto;
}


/*  RESERVA DE ESPACIO MIENTRAS EL JS PINTA LAS TARJETAS 
   Sin esto, el pie de página "salta" cuando llegan las noticias o los proyectos.
   Solo actúa mientras el contenedor está vacío y desaparece al llenarse. */

#lista-ultimos-proyectos:not(:has(> *)) {
    min-height: 340px;
}

#ultimas-noticias:not(:has(> *)) {
    min-height: clamp(380px, 40vw, 540px);
}

.pagina-blog .portada-blog:not([hidden]):not(:has(article)) {
    min-height: clamp(300px, 40vw, 440px);
}

.pagina-blog #lista-noticias-blog:not([hidden]):not(:has(article)) {
    min-height: clamp(300px, 28vw, 380px);
}


/*  TRANSICIÓN SUAVE ENTRE PÁGINAS 
   Fundido al navegar con el menú; la cabecera se mantiene fija durante el cambio.
   Los navegadores que no lo admiten simplemente lo ignoran. */

@view-transition {
    navigation: auto;
}

header {
    view-transition-name: cabecera;
}

@media (prefers-reduced-motion: reduce) {

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none;
    }
}