/* HERO */
.hero {
    position: relative;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--tinta);
}

.hero-imagen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform-origin: 55% 45%;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-imagen {
        animation: hero-ken-burns 24s ease-in-out infinite alternate;
    }
}

@keyframes hero-ken-burns {
    from { transform: scale(1) translate(0, 0); }
    to { transform: scale(1.06) translate(-0.8%, -0.8%); }
}

.hero-velo {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-velo-horizontal {
    background: linear-gradient(to right, rgba(234, 231, 218, 0.95) 0%, rgba(234, 231, 218, 0.8) 50%, rgba(234, 231, 218, 0.3) 100%);
}

.hero-velo-vertical {
    background:
        url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='%238B1A1A' fill-opacity='0.12'/%3E%3C/svg%3E"),
        linear-gradient(to bottom, rgba(234, 231, 218, 0.6) 0%, transparent 50%, rgba(234, 231, 218, 0.7) 100%);
}

.hero-contenedor {
    position: relative;
    max-width: var(--max-contenido);
    margin: 0 auto;
    padding: 9rem 1rem 6rem;
    width: 100%;
}

@media (min-width: 768px) {
    .hero-contenedor {
        padding: 11rem 2rem 8rem;
    }
}

.hero-contenido {
    max-width: 48rem;
}

.hero-titulo {
    font-family: var(--fuente-serif);
    font-weight: 700;
    font-size: 3rem;
    line-height: 1.05;
    margin: 2rem 0 1.5rem;
}

@media (min-width: 768px) {
    .hero-titulo {
        font-size: 4.5rem;
    }
}

.hero-titulo em {
    font-style: italic;
}

.hero-descripcion {
    font-size: 1.125rem;
    color: var(--tinta-suave);
    max-width: 40rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .hero-descripcion {
        font-size: 1.25rem;
    }
}

.hero-botones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hero-botones {
        flex-direction: row;
    }
}

.hero-stats {
    margin-top: 4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    color: var(--tinta-suave);
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-stat-num {
    font-family: var(--fuente-serif);
    font-weight: 700;
    font-size: 2.5rem;
}

.hero-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-stat-sep {
    display: inline-block;
    width: 1px;
    height: 2.5rem;
    background: rgba(26, 26, 26, 0.2);
    transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-stats.pre-entrar .hero-stat-sep {
        transform: scaleY(0);
    }
    .hero-stats.en-vista .hero-stat-sep {
        animation: hero-sep-crecer 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
    }
    .hero-stats.en-vista .hero-stat-sep:nth-of-type(2) {
        animation-delay: 0.75s;
    }
}

@keyframes hero-sep-crecer {
    from { transform: scaleY(0); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
}

.hero-descubrir {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(26, 26, 26, 0.7);
    transition: color 0.2s;
}

.hero-descubrir:hover {
    color: var(--granate);
}

.hero-descubrir span {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: var(--letra-ancha);
}

.hero-descubrir i {
    animation: rebote 1.8s infinite;
}

@keyframes rebote {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* VALORES */
.valores {
    position: relative;
    background: var(--fondo);
    padding: 6rem 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .valores {
        padding: 8rem 0;
    }
}

.valores::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 600' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke-width='1.2'%3E%3Cpath d='M0 120 C200 80 400 180 600 140 C700 120 750 150 800 130' stroke='%238B1A1A' stroke-opacity='0.09'/%3E%3Cpath d='M0 200 C150 240 350 180 550 220 C700 250 780 220 800 240' stroke='%238B1A1A' stroke-opacity='0.08'/%3E%3Cpath d='M0 300 C250 280 450 340 650 300 C750 280 790 310 800 300' stroke='%23B59E76' stroke-opacity='0.14'/%3E%3Cpath d='M0 400 C200 440 400 380 600 420 C720 440 790 420 800 430' stroke='%233DBFB8' stroke-opacity='0.10'/%3E%3Cpath d='M0 490 C150 470 350 510 550 490 C700 470 790 500 800 490' stroke='%238B1A1A' stroke-opacity='0.08'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.valores .contenedor,
.valores-linea-superior {
    position: relative;
    z-index: 1;
}

.valores-linea-superior {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--granate), var(--arena), var(--turquesa));
    z-index: 2;
}

.valores-rejilla {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .valores-rejilla {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tarjeta-valor {
    position: relative;
    background: var(--blanco);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(181, 158, 118, 0.2);
    transition: box-shadow 0.3s, transform 0.3s;
    overflow: hidden;
}

.tarjeta-valor:hover {
    box-shadow: var(--sombra-fuerte);
    transform: translateY(-4px);
}

.tarjeta-valor-foto {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.85;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.tarjeta-valor:hover .tarjeta-valor-foto {
    opacity: 1;
    transform: scale(1.04);
}

.tarjeta-valor-velo {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.55) 45%,
        rgba(255, 255, 255, 0.92) 80%,
        rgba(255, 255, 255, 0.98) 100%
    );
}

.tarjeta-valor--turquesa .tarjeta-valor-velo {
    background: linear-gradient(
        180deg,
        rgba(224, 246, 244, 0.15) 0%,
        rgba(255, 255, 255, 0.55) 45%,
        rgba(255, 255, 255, 0.93) 80%,
        rgba(255, 255, 255, 0.98) 100%
    );
}

.tarjeta-valor--granate .tarjeta-valor-velo {
    background: linear-gradient(
        180deg,
        rgba(246, 228, 228, 0.20) 0%,
        rgba(255, 255, 255, 0.58) 45%,
        rgba(255, 255, 255, 0.93) 80%,
        rgba(255, 255, 255, 0.98) 100%
    );
}

.tarjeta-valor--arena .tarjeta-valor-velo {
    background: linear-gradient(
        180deg,
        rgba(242, 234, 216, 0.20) 0%,
        rgba(255, 255, 255, 0.58) 45%,
        rgba(255, 255, 255, 0.93) 80%,
        rgba(255, 255, 255, 0.98) 100%
    );
}

.tarjeta-valor-titulo,
.tarjeta-valor-descripcion {
    position: relative;
}

@media (prefers-reduced-motion: no-preference) {
    .tarjeta-valor.pre-entrar {
        opacity: 0;
        transform: translateY(28px);
    }
    .tarjeta-valor.en-vista {
        animation: tarjeta-valor-entrar 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .tarjeta-valor:nth-child(1).en-vista { animation-delay: 0s; }
    .tarjeta-valor:nth-child(2).en-vista { animation-delay: 0.12s; }
    .tarjeta-valor:nth-child(3).en-vista { animation-delay: 0.24s; }

    @keyframes tarjeta-valor-entrar {
        from { opacity: 0; transform: translateY(28px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

.tarjeta-valor-numero {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--fuente-serif);
    font-style: italic;
    font-size: 3.75rem;
    color: rgba(212, 197, 165, 0.7);
    line-height: 1;
}

.tarjeta-valor-icono {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    color: var(--blanco);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--sombra-suave);
    transition: transform 0.3s;
}

.tarjeta-valor:hover .tarjeta-valor-icono {
    transform: scale(1.05);
}

.tarjeta-valor-titulo {
    font-family: var(--fuente-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--tinta);
    margin-bottom: 1rem;
}

.tarjeta-valor-descripcion {
    color: var(--tinta-medio);
    line-height: 1.7;
}

/* ASOCIACIONES */
.asociaciones {
    position: relative;
    background-color: var(--fondo);
    background-image:
        linear-gradient(
            180deg,
            rgba(234, 231, 218, 0.82) 0%,
            rgba(234, 231, 218, 0.72) 45%,
            rgba(234, 231, 218, 0.94) 100%
        ),
        url('/static/images/fondos/axarquia-frigiliana.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .asociaciones {
        padding: 8rem 0;
    }
}

.asociaciones .contenedor {
    position: relative;
    z-index: 1;
}

.asociaciones-encabezado {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .asociaciones-encabezado {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.asociaciones-rejilla {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .asociaciones-rejilla {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .asociaciones-rejilla {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tarjeta-asoc {
    background: var(--blanco);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(181, 158, 118, 0.3);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}

.tarjeta-asoc:hover {
    box-shadow: var(--sombra-fuerte);
    transform: translateY(-4px);
}

.tarjeta-asoc-cabecera {
    position: relative;
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    overflow: hidden;
    background-color: var(--color-acento, var(--granate));
}

.tarjeta-asoc-foto {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.tarjeta-asoc:hover .tarjeta-asoc-foto {
    transform: scale(1.05);
}

.tarjeta-asoc-velo {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--color-acento, var(--granate)) 92%, transparent) 0%,
        color-mix(in srgb, var(--color-acento, var(--granate)) 55%, transparent) 45%,
        color-mix(in srgb, var(--color-acento, var(--granate)) 20%, transparent) 100%
    );
}

.tarjeta-asoc-patron {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: radial-gradient(circle at 30% 30%, white 1px, transparent 1px);
    background-size: 24px 24px;
}

.tarjeta-asoc-escudo {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: var(--blanco);
    box-shadow: var(--sombra-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
}

.tarjeta-asoc-escudo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tarjeta-asoc-escudo i {
    color: var(--tinta);
    font-size: 1.25rem;
}

.tarjeta-asoc-meta {
    position: relative;
    color: var(--blanco);
}

.tarjeta-asoc-municipio {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: var(--letra-ancha);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

.tarjeta-asoc-municipio i {
    margin-right: 0.25rem;
}

.tarjeta-asoc-nombre {
    font-family: var(--fuente-serif);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
}

.tarjeta-asoc-cuerpo {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tarjeta-asoc-descripcion {
    font-size: 0.875rem;
    color: var(--tinta-medio);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tarjeta-asoc .enlace-secundario {
    margin-top: auto;
}

/* MAPA */
.mapa-seccion {
    position: relative;
    background: var(--blanco);
    padding: 6rem 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .mapa-seccion {
        padding: 8rem 0;
    }
}

.mapa-seccion::before {
    content: "";
    position: absolute;
    top: 3rem;
    right: -90px;
    width: 380px;
    height: 380px;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='48' fill='none' stroke='%238B1A1A' stroke-width='0.5' stroke-opacity='0.22'/%3E%3Ccircle cx='50' cy='50' r='34' fill='none' stroke='%23B59E76' stroke-width='0.5' stroke-opacity='0.32'/%3E%3Cpolygon points='50,4 45,48 50,52 55,48' fill='%238B1A1A' fill-opacity='0.28'/%3E%3Cpolygon points='50,96 45,52 50,48 55,52' fill='%238B1A1A' fill-opacity='0.16'/%3E%3Cpolygon points='96,50 52,45 48,50 52,55' fill='%238B1A1A' fill-opacity='0.2'/%3E%3Cpolygon points='4,50 48,45 52,50 48,55' fill='%238B1A1A' fill-opacity='0.2'/%3E%3Cg stroke='%23B59E76' stroke-width='1' stroke-opacity='0.4'%3E%3Cline x1='78.5' y1='21.5' x2='72.4' y2='27.6'/%3E%3Cline x1='78.5' y1='78.5' x2='72.4' y2='72.4'/%3E%3Cline x1='21.5' y1='78.5' x2='27.6' y2='72.4'/%3E%3Cline x1='21.5' y1='21.5' x2='27.6' y2='27.6'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='2' fill='%238B1A1A' fill-opacity='0.45'/%3E%3Ctext x='50' y='14' text-anchor='middle' font-family='Georgia, serif' font-size='8' font-weight='700' fill='%238B1A1A' fill-opacity='0.5'%3EN%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.mapa-seccion .contenedor {
    position: relative;
    z-index: 1;
}

@media (max-width: 640px) {
    .mapa-seccion::before {
        width: 220px;
        height: 220px;
        top: 1.5rem;
        right: -60px;
    }
}

.mapa-contenedor {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--sombra-media);
    background:
        radial-gradient(circle at 30% 20%, rgba(61, 191, 184, 0.12), transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(139, 26, 26, 0.12), transparent 55%),
        linear-gradient(160deg, var(--fondo) 0%, var(--crema) 100%);
    border: 1px solid rgba(181, 158, 118, 0.25);
}

.mapa-contenedor::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(181, 158, 118, 0.35) 1px, transparent 1.4px),
        radial-gradient(circle at 70% 70%, rgba(139, 26, 26, 0.28) 1px, transparent 1.4px);
    background-size: 28px 28px, 42px 42px;
    opacity: 0.4;
    pointer-events: none;
}

#mapa-leaflet {
    position: relative;
    width: 100%;
    height: 420px;
    background: transparent;
}

@media (min-width: 768px) {
    #mapa-leaflet {
        height: 560px;
    }
}

#mapa-leaflet.leaflet-container {
    background: transparent;
    font-family: var(--fuente-sans);
    outline: none;
}

#mapa-leaflet .leaflet-interactive {
    filter: drop-shadow(0 12px 24px rgba(139, 26, 26, 0.18));
    transition: filter 0.3s ease;
}

#mapa-leaflet .leaflet-interactive:hover,
#mapa-leaflet .leaflet-interactive:focus {
    filter: drop-shadow(0 16px 32px rgba(139, 26, 26, 0.25));
}

.mapa-cargando {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(236, 233, 220, 0.85);
    color: var(--tinta);
    font-size: 0.875rem;
    backdrop-filter: blur(2px);
    z-index: 500;
}

.mapa-cargando .spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 0;
    background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 12a8 8 0 1 1-6-7.75A6 6 0 0 0 17 12z' fill='%238B1A1A'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: luna-orbita 2.4s linear infinite;
}

@keyframes luna-orbita {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

.mapa-panel-toggle {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 660;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(181, 158, 118, 0.35);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mapa-panel-toggle:hover {
    background: var(--blanco);
    box-shadow: 0 12px 30px rgba(26, 26, 26, 0.14);
}

.mapa-panel-toggle:focus-visible {
    outline: 2px solid var(--turquesa-oscuro);
    outline-offset: 2px;
}

.mapa-panel-toggle-barras,
.mapa-panel-toggle-barras::before,
.mapa-panel-toggle-barras::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--tinta);
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.mapa-panel-toggle-barras {
    position: relative;
}

.mapa-panel-toggle-barras::before,
.mapa-panel-toggle-barras::after {
    content: "";
    position: absolute;
    left: 0;
}

.mapa-panel-toggle-barras::before {
    top: -6px;
}

.mapa-panel-toggle-barras::after {
    top: 6px;
}

.mapa-panel-toggle[aria-expanded="true"] .mapa-panel-toggle-barras {
    background: transparent;
}

.mapa-panel-toggle[aria-expanded="true"] .mapa-panel-toggle-barras::before {
    top: 0;
    transform: rotate(45deg);
    background: var(--granate);
}

.mapa-panel-toggle[aria-expanded="true"] .mapa-panel-toggle-barras::after {
    top: 0;
    transform: rotate(-45deg);
    background: var(--granate);
}

.mapa-panel {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 650;
    width: min(19rem, calc(100% - 2.5rem));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(181, 158, 118, 0.35);
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(26, 26, 26, 0.12);
    padding: 1.1rem 1.1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: calc(100% - 2.5rem);
    overflow: hidden;
    transform: translateX(calc(-100% - 1.5rem));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.mapa-panel[data-abierto="true"] {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.mapa-panel-cabecera {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 3.25rem;
    padding-bottom: 0.6rem;
    min-height: 2.75rem;
    border-bottom: 1px solid rgba(181, 158, 118, 0.3);
}

.mapa-panel-etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: var(--letra-ancha);
    color: var(--turquesa-oscuro);
    margin: 0;
}

.mapa-panel-titulo {
    font-family: var(--fuente-serif);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tinta);
    margin: 0;
    line-height: 1.2;
}

.mapa-panel-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.mapa-panel-enlace {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.5rem;
    border-radius: 0.625rem;
    color: var(--tinta);
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.mapa-panel-enlace:hover,
.mapa-panel-enlace:focus-visible {
    background: rgba(234, 231, 218, 0.7);
    transform: translateX(2px);
    outline: none;
}

.mapa-panel-icono {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-acento, var(--granate)) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-acento, var(--granate)) 35%, transparent);
}

.mapa-panel-icono img {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
    opacity: 0.85;
}

.mapa-panel-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.mapa-panel-nombre {
    font-family: var(--fuente-sans);
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--tinta);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapa-panel-municipio {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--tinta-medio);
}

.mapa-panel-escudo {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.mapa-panel-escudo-vacio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--arena-oscuro);
    font-size: 0.75rem;
}

@media (max-width: 640px) {
    .mapa-panel {
        top: auto;
        bottom: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        padding: 0.85rem 0.85rem 0.5rem;
    }

    .mapa-panel-lista {
        max-height: 10rem;
    }

    .mapa-panel-nombre {
        font-size: 0.8125rem;
    }
}

/* FINANCIACIÓN */
.financiacion {
    position: relative;
    background: var(--granate);
    color: var(--blanco);
    padding: 6rem 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .financiacion {
        padding: 8rem 0;
    }
}

.financiacion::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 36px;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 36' preserveAspectRatio='none'%3E%3Cpath d='M0,0 H1440 V18 C1200,36 960,4 720,18 C480,32 240,0 0,16 Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

.financiacion-patron {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 20% 30%, #B59E76 1px, transparent 1px),
        radial-gradient(circle at 70% 70%, #8B1A1A 1px, transparent 1px);
    background-size: 40px 40px, 60px 60px;
}

.financiacion-halo {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 9999px;
    filter: blur(48px);
}

.financiacion-halo-granate {
    top: -8rem;
    right: -8rem;
    background: var(--degradado-granate);
    opacity: 0.3;
}

.financiacion-halo-turquesa {
    bottom: -8rem;
    left: -8rem;
    background: var(--degradado-turquesa);
    opacity: 0.25;
}

.financiacion-halo-arena {
    top: 33%;
    left: 50%;
    transform: translateX(-50%);
    width: 31rem;
    height: 31rem;
    background: var(--degradado-arena);
    opacity: 0.15;
}

@media (prefers-reduced-motion: no-preference) {
    .financiacion-halo-granate {
        animation: halo-respirar 9s ease-in-out infinite;
    }
    .financiacion-halo-turquesa {
        animation: halo-respirar 11s ease-in-out infinite;
        animation-delay: -3s;
    }
    .financiacion-halo-arena {
        animation: halo-respirar-centro 13s ease-in-out infinite;
        animation-delay: -6s;
    }
}

@keyframes halo-respirar {
    0%, 100% { opacity: var(--halo-opacidad-min, 0.18); transform: scale(0.95); }
    50% { opacity: var(--halo-opacidad-max, 0.34); transform: scale(1.08); }
}

@keyframes halo-respirar-centro {
    0%, 100% { opacity: 0.1; transform: translateX(-50%) scale(0.95); }
    50% { opacity: 0.22; transform: translateX(-50%) scale(1.06); }
}

.financiacion-contenido {
    position: relative;
    text-align: center;
}

.financiacion-titulo {
    color: var(--blanco);
    max-width: 48rem;
    margin: 0 auto 2rem;
}

.financiacion-texto {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    max-width: 48rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .financiacion-texto {
        font-size: 1.125rem;
    }
}

.financiacion strong {
    color: var(--blanco);
}
