/* General */
/* fonts loaded via <link> in head for performance */

:root {
    --primary-blue: #4c6aba;
    --primary-orange: #ec8461;
    --light-blue: #e8eef7;
    --light-orange: #fdf0ec;
    --white: #ffffff;
    --text-dark: #333333;
    --shadow: 0 4px 6px rgba(76, 106, 186, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

/* Encabezado */
header {
    background: linear-gradient(90deg, #4D6BBA 0%, #94D4A1 100%);
    color: #FFFFFF;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

header .logo img {
    width: 140px !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: 60px !important;
    display: block;
}

header .logo h1 {
    /* This rule is no longer needed as the h1 tag has been removed from index.html */
    display: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #C3D2EB; /* Secundario IV */
}

.fichas-carousel .ficha {
    text-align: center;
    padding: 20px;
}

.fichas-carousel img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.fichas-carousel h3 {
    font-size: 1.5rem;
    margin-top: 10px;
    color: #333;
}

.fichas-carousel p {
    font-size: 1rem;
    color: #555;
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Fallback si el vídeo no carga */
    background: linear-gradient(-45deg, #4D6BBA, #94D4A1, #ec8461, #fdf0ec);
    /* Full-bleed: anulamos estilos de section genérico */
    margin: 0;
    padding: 0;
    max-width: none;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Ajuste de altura en móvil para evitar bandas negras */
@media (max-width: 768px) {
    .hero {
        height: 70vh; /* fallback */
        height: 70svh; /* viewport pequeño real en móviles */
        min-height: 70svh;
    }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Burbujas animadas sutiles en el fondo */
/* Video de fondo en hero */
.hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero-video-blur {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: blur(45px) saturate(112%);
    transform: scale(1.3);
    z-index: 0;
    display: none; /* Solo visible en móvil cuando hay vídeo local */
}
.hero-video-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    min-width: 100%;
    min-height: 100%;
    transform: translateZ(0);
    z-index: 0;
    display: none; /* se activa si hay vídeo local */
    background: transparent !important;
    background-color: transparent !important;
}
@media (max-width: 768px) {
    .hero-video-el {
        object-fit: cover; /* Ocupa todo sin márgenes visibles */
        object-position: center center;
        transform: none; /* sin zoom ni traslación */
        left: 0;
        right: 0;
        top: 0;
        bottom: 0; /* anulamos el inset del estilo base con valores explícitos */
        width: 100%;
        height: 100%;
        /* quitamos clip/mask para evitar cortes duros */
        clip-path: none;
        -webkit-mask-image: none;
        mask-image: none;
        -webkit-mask-size: initial;
        -webkit-mask-repeat: initial;
        mask-size: initial;
        mask-repeat: initial;
    }
    #heroVideoBg.hero-video-blur {
        display: block;
    }
    /* Efecto de marco con blur en los bordes sin añadir márgenes reales */
    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        -webkit-backdrop-filter: blur(10px) saturate(112%);
        backdrop-filter: blur(10px) saturate(112%);
        /* Enmascara el centro para que sólo se aprecie el blur en los bordes */
        -webkit-mask: radial-gradient(ellipse at center, transparent 62%, black 70%);
        mask: radial-gradient(ellipse at center, transparent 62%, black 70%);
        z-index: 1;
    }
}
.hero-video #heroPlayer,
.hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 177.78vmin; /* 100 * (16/9) */
    height: 100vmin;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* Capa de oscurecimiento para legibilidad */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.45) 100%);
    z-index: 1;
}

/* Capa de fader para transiciones suaves entre segmentos */
.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    transition: opacity 220ms ease;
    pointer-events: none;
}
.hero-overlay.is-fading::after {
    opacity: 0.65; /* oscurece brevemente para suavizar el salto */
}

.hero-logo-svg {
    width: 420px;
    max-width: 98vw;
    margin-bottom: 2.7rem;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInLogo 1.2s 0.1s forwards;
    display: block;
    margin-left: auto;
    margin-right: auto;
    z-index: 2;
    position: relative;
}

@media (max-width: 600px) {
    .hero-logo-svg {
        width: 260px;
        margin-bottom: 0.9rem; /* acerca el botón al logo en móvil pequeño */
    }
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color:white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 300;
    color: #FFFFFF;
}

.hero .btn {
    background-color: #EB5C3D; /* Secundario I */
    color: #FFFFFF; /* Contraste */
    padding: 12px 30px;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.hero .btn:hover {
    background-color: #ECB470; /* Secundario V */
}

.hero-content {
    text-align: center; /* Centra todos los elementos dentro de Hero */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2; /* por encima del overlay */
}

.hero-logo {
    width: 400px; /* Tamaño del logo */
    height: auto; /* Mantiene la proporción */
    margin-bottom: 30px; /* Espaciado debajo del logo */
}

@keyframes fadeInLogo {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Secciones */
section {
    padding: 40px 20px;
    margin: 20px auto;
    background-color: #FFFFFF; /* Contraste */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px; /* Ancho ajustado */
}

section h2 {
    font-size: 2rem;
    color: #4D6BBA; /* Principal */
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

section p {
    font-size: 1rem;
    text-align: justify;
    margin-bottom: 20px;
    font-weight: 300;
}

section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

section ul li {
    padding: 15px;
    background-color: #C3D2EB; /* Secundario IV */
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #333;
    flex: 1 1 calc(33% - 40px); /* Tres columnas en pantallas grandes */
    max-width: 300px;
}

/* Botón de llamada a la acción */
.cta {
    text-align: center;
}

.cta .btn {
    background-color: #94D4A1; /* Secundario II */
    color: #FFFFFF; /* Contraste */
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta .btn:hover {
    background-color: #EB8FB2; /* Secundario III */
}

/* Pie de página */
footer {
    background-color: #4D6BBA; /* Principal */
    color: #FFFFFF; /* Contraste */
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    margin-top: 40px;
}

footer a {
    color: #C3D2EB; /* Secundario IV */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Estilos para la sección de contacto y donaciones */
.contacto-section {
    padding: 4rem 2rem;
    background-color: #f5f5f5;
}

.contacto-container {
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.contacto-info {
    padding: 2rem;
    text-align: center;
}

.contacto-info h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

.donaciones {
    margin-top: 2rem;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.donacion-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.donacion-opcion {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.donacion-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-blue);
    margin: 0 auto 10px;
}
.donacion-icon i {
    font-size: 24px;
    color: var(--primary-blue);
}

.membresia-info {
    margin-top: 1rem;
    color: #444;
    text-align: center;
}

.donacion-opcion h4 {
    margin: 0 0 10px 0;
    text-align: center;
}
.donacion-opcion p {
    margin: 0;
    text-align: center;
}

/* Aclaración de donaciones puntuales */
.donacion-aclaracion {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    align-items: start;
    padding: 12px 14px;
    background: #fff8f4;
    border: 1px solid #ffd9c9;
    border-radius: 8px;
}
.donacion-aclaracion i {
    color: #EB5C3D;
    font-size: 1.1rem;
    line-height: 1.2;
}
.donacion-aclaracion p {
    margin: 0;
    color: #5a463f;
}

@media (max-width: 480px) {
    .donacion-opciones {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .donacion-opcion { padding: 1.1rem; }
    .donacion-icon { width: 48px; height: 48px; }
    .donacion-icon i { font-size: 20px; }
}

.donacion-opcion h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.formulario-contacto {
    display: none;
}

.contacto-directo {
    margin-top: 2rem;
    text-align: center;
}

.contact-social {
    margin-top: 1rem;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}
.contact-social a {
    color: #4D6BBA;
    font-size: 1.4rem;
    transition: color 0.2s ease;
}
.contact-social a:hover {
    color: #3d5a9d;
}
.contact-social.orange a {
    color: var(--primary-orange);
}
.contact-social.orange a:hover {
    color: #d9734f;
}
.contact-note {
    display: block;
    margin-top: 0.75rem;
    color: #666;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #34495e;
}

/* Responsive design para la sección de contacto */
@media (max-width: 768px) {
    .contacto-container {
        grid-template-columns: 1fr;
    }
    
    .donacion-opciones {
        grid-template-columns: 1fr;
    }
}

/* Disposición 2x2 para botones de contacto en móvil */
@media (max-width: 600px) {
    #contacto .contacto-directo .resource-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    #contacto .contacto-directo .resource-button {
        width: 100%;
        justify-content: center;
    }
}

/* Estilos para el carrusel de héroes */
.carousel-section {
    padding: 4rem 2rem;
    background-color: #fff;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-description {
    text-align: center;
    max-width: 800px;
    margin: 1rem auto 3rem;
    color: #666;
    font-size: 1.1rem;
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
}

.carousel {
    margin: 0;
    position: relative;
}

/* Estilos para las fichas */
.ficha {
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    margin: 0 10px;
}

.ficha:hover {
    transform: translateY(-5px);
}

.ficha-imagen {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.ficha-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ficha:hover .ficha-imagen img {
    transform: scale(1.05);
}

.ficha-contenido {
    padding: 20px;
}

.ficha-contenido h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.edad {
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.mutacion-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #fff3e6;
    color: #ff6b00;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.ciudad {
    font-size: 1rem;
    color: #666;
}

/* Estilos para los controles de Slick */
.slick-prev,
.slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    border-radius: 0;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
}

.slick-prev {
    left: -60px;
}

.slick-next {
    right: -60px;
}

.slick-prev:hover,
.slick-next:hover {
    background-color: transparent;
    transform: translateY(-50%) scale(1.1);
    box-shadow: none;
}

.slick-prev i,
.slick-next i {
    font-size: 30px;
    color: #4D6BBA;
    transition: color 0.3s ease;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
}

.slick-prev:hover i,
.slick-next:hover i {
    color: #3d5a9d;
}

/* Estilos para los puntos de navegación */
.slick-dots {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.slick-dots li {
    margin: 0;
}

.slick-dots li button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ccc;
    opacity: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.slick-dots li button:before {
    display: none;
}

.slick-dots li.slick-active button {
    background: #4D6BBA;
    opacity: 1;
    transform: scale(1.2);
}

/* Ajustes responsivos para los botones */
@media (max-width: 1200px) {
    .carousel-container {
        padding: 0 50px;
    }
    
    .slick-prev {
        left: -50px;
    }
    
    .slick-next {
        right: -50px;
    }
}

@media (max-width: 992px) {
    .carousel-container {
        padding: 0 40px;
    }
    
    .slick-prev {
        left: -40px;
    }
    
    .slick-next {
        right: -40px;
    }
    
    .slick-prev,
    .slick-next {
        width: 35px;
        height: 35px;
    }
    
    .slick-prev i,
    .slick-next i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        padding: 0 30px;
    }
    
    .slick-prev {
        left: -30px;
    }
    
    .slick-next {
        right: -30px;
    }
    
    .slick-prev,
    .slick-next {
        width: 30px;
        height: 30px;
    }
    
    .slick-prev i,
    .slick-next i {
        font-size: 16px;
    }
}

/* Ajustes específicos para algunas imágenes */
.ficha[data-nombre="JUDITH"] .ficha-imagen img,
.ficha[data-nombre="NOAH"] .ficha-imagen img {
    object-position: center 25%;
}

.ficha[data-nombre="ADRIANA"] .ficha-imagen img,
.ficha[data-nombre="MIQUEL"] .ficha-imagen img {
    object-position: center 35%;
}

.ficha[data-nombre="JOEL"] .ficha-imagen img,
.ficha[data-nombre="BRAIS"] .ficha-imagen img {
    object-position: center 40%;
}

.ficha[data-nombre="DARIO"] .ficha-imagen img,
.ficha[data-nombre="ARES"] .ficha-imagen img {
    object-position: center 45%;
}

.ficha[data-nombre="PABLO"] .ficha-imagen img,
.ficha[data-nombre="ODEI"] .ficha-imagen img {
    object-position: center 50%;
}

.ficha[data-nombre="NEREA"] .ficha-imagen img,
.ficha[data-nombre="MARIA"] .ficha-imagen img {
    object-position: center 55%;
}

/* Estilos para la sección del mapa */
.mapa-section {
    background-color: var(--light-blue);
    padding: 3rem 0 2rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.mapa-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    text-shadow: 2px 2px 4px rgba(76, 106, 186, 0.1);
    position: relative;
    z-index: 2;
}

.mapa-description {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.mapa-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    z-index: 1;
}

#map {
    height: 450px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(76, 106, 186, 0.15);
    border: 2px solid var(--white);
    position: relative;
    z-index: 1;
    background-color: #f8f9fa;
}

/* Estilos para la leyenda del mapa */
.mapa-leyenda {
    background: white;
    padding: 12px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 0.9rem;
    color: var(--color-text);
    z-index: 1000;
    border: 1px solid #e9ecef;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    padding: 4px 0;
}

.leyenda-item:first-child {
    margin-top: 0;
}

.leyenda-item:last-child {
    margin-bottom: 0;
}

.leyenda-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.leyenda-item:first-child i {
    color: #4C6ABA; /* Color primario */
}

.leyenda-item:last-child i {
    color: #EC8461; /* Color secundario */
}

.leyenda-item span {
    font-weight: 500;
}

@media (max-width: 768px) {
    .mapa-leyenda {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .leyenda-item {
        gap: 6px;
        margin: 4px 0;
    }

    .leyenda-item i {
        font-size: 1rem;
    }
}

/* Marcadores personalizados */
.hero-marker {
    background-color: var(--primary-orange);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(236, 132, 97, 0.3);
    transition: all 0.3s ease;
}

.hero-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(236, 132, 97, 0.5);
}

.hero-marker i {
    color: var(--white);
    font-size: 1.2rem;
}

/* Popups personalizados */
.hero-popup {
    border-radius: 15px !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: var(--shadow) !important;
}

.hero-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-blue) 100%);
    border-radius: 15px;
    padding: 0;
    border: 2px solid var(--primary-blue);
}

.hero-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.popup-content {
    padding: 15px;
}

.popup-header {
    background: var(--primary-blue);
    color: var(--white);
    padding: 15px;
    border-radius: 13px 13px 0 0;
}

.popup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.popup-title i {
    color: var(--primary-orange);
    font-size: 1.5rem;
}

.popup-title h4 {
    color: var(--white);
    margin: 0;
    font-size: 1.2rem;
}

.popup-superpoder {
    background: var(--primary-orange);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 5px;
}

.popup-body {
    padding: 15px;
    background: var(--white);
    border-radius: 0 0 13px 13px;
}

.popup-body p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-body i {
    color: var(--primary-blue);
    width: 20px;
    text-align: center;
}

/* Controles del mapa */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
    background-color: var(--white) !important;
    color: var(--primary-blue) !important;
    border: 2px solid var(--primary-blue) !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
    background-color: var(--primary-blue) !important;
    color: var(--white) !important;
}

/* Responsive */
@media (max-width: 768px) {
    /* Forzar cobertura total en móvil */
    .hero-video #heroPlayer,
    .hero-video iframe {
        width: 200vmin;
        height: 112.5vmin;
    }
    .mapa-section {
        padding: 2rem 0 1.5rem 0;
    }

    .mapa-section h2 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .mapa-description {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        padding: 0 1rem;
    }

    #map {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .mapa-section {
        padding: 1.5rem 0 1rem 0;
    }

    .mapa-section h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .mapa-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    #map {
        height: 250px;
    }
}

/* Estilos para los marcadores del mapa */
.marker-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: inherit;
    border-radius: inherit;
}

.ciudad-marker {
    background-color: #4C6ABA; /* Color primario sólido */
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 3px solid white;
    transition: all 0.3s ease;
    opacity: 1;
}

.ciudad-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    background-color: #3D5AA9; /* Color primario más oscuro al hover */
}

.ciudad-marker i {
    font-size: 22px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ciudad-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: #EC8461; /* Color secundario sólido */
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    padding: 0 6px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    opacity: 1;
}

.niño-marker {
    background-color: #EC8461; /* Color secundario sólido */
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 3px solid white;
    transition: all 0.3s ease;
    opacity: 1;
}

.niño-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    background-color: #D9734F; /* Color secundario más oscuro al hover */
}

.niño-marker i {
    font-size: 20px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .ciudad-marker {
        width: 36px;
        height: 36px;
        border-width: 2px;
    }

    .ciudad-marker i {
        font-size: 20px;
    }

    .ciudad-badge {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
        padding: 0 4px;
        border-width: 2px;
    }

    .niño-marker {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }

    .niño-marker i {
        font-size: 18px;
    }
}

/* Estilos para las secciones por año */
.año-section {
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.año-section:last-child {
    margin-bottom: 0;
}

.año-titulo {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.año-titulo i {
    color: var(--color-secondary);
}

/* Estilos para los popups */
.custom-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    padding: 0;
    overflow: hidden;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    width: 100% !important;
}

.popup-content {
    padding: 0;
}

.popup-header {
    background-color: var(--color-primary);
    color: white;
    padding: 15px;
    text-align: center;
    border-bottom: 3px solid var(--color-secondary);
}

.popup-header h4 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-subtitle {
    display: block;
    font-size: 0.9rem;
    margin-top: 5px;
    opacity: 0.9;
}

.popup-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.niños-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.niño-item {
    background-color: white;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.niño-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, transparent, rgba(76, 106, 186, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.niño-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--color-primary);
}

.niño-item:hover::after {
    opacity: 1;
}

.niño-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.niño-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.niño-header h5 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.niño-item:hover .niño-header h5 {
    color: var(--color-secondary);
}

.niño-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.niño-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.niño-info i {
    color: var(--color-primary);
    width: 16px;
    text-align: center;
    transition: color 0.3s ease;
}

.niño-item:hover .niño-info i {
    color: var(--color-secondary);
}

.mutacion-badge {
    background-color: var(--color-secondary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.niño-item:hover .mutacion-badge {
    background-color: var(--color-primary);
    transform: scale(1.05);
}

/* Estilos para el popup de detalles */
.niño-popup .popup-header {
    background-color: var(--color-secondary);
    padding: 15px;
}

.niño-popup .popup-body {
    padding: 20px;
}

.niño-popup .niño-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.niño-popup .historia {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .niño-item {
        padding: 10px;
    }

    .niño-header h5 {
        font-size: 1rem;
    }

    .niño-info p {
        font-size: 0.85rem;
    }

    .mutacion-badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }

    .niño-popup .popup-body {
        padding: 15px;
    }

    .niño-popup .niño-info {
        padding: 12px;
    }

    .niño-popup .historia {
        font-size: 0.9rem;
        padding: 12px;
    }
}

/* Estilos para la sección de información sobre IQSEC2 */
.enfermedad-section {
    background-color: var(--light-blue);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.enfermedad-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background-image: url('../assets/images/LOGOTIPO-AEIQSEC2-VERTICAL.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.05;
    z-index: 0;
}

.enfermedad-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 2rem auto 0;
    text-align: center;
}

.enfermedad-texto {
    width: 100%;
}

.enfermedad-descripcion {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.enfermedad-caracteristicas {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin: 0 auto 2rem;
    max-width: 900px;
}

.enfermedad-caracteristicas h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.caracteristicas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: left;
}

.caracteristica-grupo {
    background: var(--light-blue);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.caracteristica-grupo:hover {
    transform: translateY(-5px);
}

.caracteristica-grupo h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.caracteristica-grupo h4 i {
    color: var(--primary-orange);
}

.caracteristica-grupo ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

.caracteristica-grupo li {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    padding-left: 0;
    position: relative;
}

.caracteristica-grupo li::before {
    content: none !important;
}

.enfermedad-recursos {
    margin-top: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.enfermedad-recursos h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.recursos-descripcion {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.recursos-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn i {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #3d5a9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 106, 186, 0.2);
}

.btn-secondary {
    background-color: var(--primary-orange);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #d9734f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 132, 97, 0.2);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .enfermedad-section::before {
        width: 300px;
        height: 300px;
    }

    .caracteristicas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .enfermedad-caracteristicas {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .enfermedad-section {
        padding: 3rem 0;
    }

    .enfermedad-section::before {
        width: 200px;
        height: 200px;
    }

    .enfermedad-descripcion {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .enfermedad-caracteristicas {
        padding: 1.5rem;
        margin: 0 1rem 2rem;
    }

    .caracteristica-grupo {
        padding: 1.2rem;
    }

    .caracteristica-grupo h4 {
        font-size: 1.1rem;
    }

    .caracteristica-grupo li {
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .recursos-buttons {
        gap: 1rem;
    }
}

.ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ficha-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.mutacion-tag {
    background-color: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.02em;
}

.ficha-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ficha-info p {
    margin: 0;
    color: var(--color-text);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ficha-info i {
    color: var(--color-primary);
}

.ficha-historia {
    margin: 0.75rem 0;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ficha-detalles {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.ficha-detalles p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ficha-detalles i {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .ficha-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mutacion-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        max-width: 100%;
        text-align: center;
    }

    .ficha-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Estilos para la sección de IQSEC2 */
.iqsec2-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text);
}

.intro-text p {
    margin-bottom: 25px;
    line-height: 1.8;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.feature-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-icon {
    width: 90px;
    height: 90px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

.feature-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.feature-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
}

.feature-card ul li {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    padding-left: 0;
    position: relative;
}



.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Estilos para la sección de recursos */
.resources-section {
    background: var(--light-blue);
    border-radius: 15px;
    padding: 40px;
    margin-top: 60px;
    text-align: center;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.resources-section h3 {
    color: var(--primary-blue);
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.resources-section p {
    color: var(--text-dark);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Estilos para la sección de links de interés */
.links-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
    border-radius: 15px;
    padding: 40px;
    margin-top: 40px;
    text-align: center;
    border: none;
    box-shadow: 0 4px 15px rgba(76, 106, 186, 0.2);
}

.links-section h3 {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.links-section p {
    color: var(--white);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    opacity: 0.95;
}

.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.link-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    color: var(--white);
}

.link-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.link-item h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.link-item p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

.link-item i {
    margin-right: 8px;
    font-size: 1.2rem;
    opacity: 0.8;
}

.resource-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.resource-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-orange);
    color: var(--white);
    padding: 1.2rem 2.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
}

.resource-button:hover {
    background: #e0724d;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(236, 132, 97, 0.3);
}

.resource-button i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.resource-button:hover i {
    transform: scale(1.1);
}

/* Unificación de estilos de botones (consistencia visual) */
.btn,
.resource-button,
.hero .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 12px 22px;
    font-weight: 600;
    transition: background-color 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:hover,
.resource-button:hover,
.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

.btn:active,
.resource-button:active,
.hero .btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .resource-button,
    .hero .btn {
        transition: background-color 0.2s ease;
    }
    .btn:hover,
    .resource-button:hover,
    .hero .btn:hover,
    .btn:active,
    .resource-button:active,
    .hero .btn:active {
        transform: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 1rem;
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .grid-container {
        gap: 15px;
        padding: 0 15px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-card i {
        font-size: 1.8rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card ul li {
        font-size: 0.9rem;
    }

    .resources-section {
        padding: 20px;
        margin: 30px 15px 0;
    }

    .resources-section h3 {
        font-size: 1.2rem;
    }

    .resource-button {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }
}

/* Estilos para los iconos del mapa */
.map-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ciudad-icon {
    background-color: #3498db;
    width: 40px;
    height: 40px;
}

.ciudad-icon .icon-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid #3498db;
}

.niño-icon {
    background-color: #FF6B35;
    width: 30px;
    height: 30px;
    font-size: 1rem;
}

.custom-icon {
    background: none;
    border: none;
}

/* Estilos para los popups del mapa */
.mapa-popup {
    padding: 15px;
    max-width: 350px;
}

.mapa-popup h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.ciudad-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
}

.pacientes-lista {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.pacientes-lista::-webkit-scrollbar {
    width: 6px;
}

.pacientes-lista::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pacientes-lista::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.paciente-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

.paciente-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.paciente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.paciente-header strong {
    color: #333;
    font-size: 1.1rem;
}

.edad {
    color: #666;
    font-size: 0.9rem;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
}

.mutacion-tag {
    display: inline-block;
    background: #e8f4fc;
    color: #3498db;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 5px 0;
}

.superpoder {
    color: #FF6B35;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 5px;
    padding-left: 5px;
    border-left: 3px solid #FF6B35;
}

.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

/* Estilo personalizado para los marcadores */
.custom-marker {
    background: none;
    border: none;
}

.marker-heart {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(76, 106, 186, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.marker-heart i {
    color: var(--white);
    font-size: 20px;
}

.marker-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(76, 106, 186, 0.2);
}

.mapa-popup {
    text-align: center;
    padding: 0.5rem;
}

.mapa-popup h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.pacientes-lista {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.paciente-item {
    padding: 0.5rem;
    background: var(--light-blue);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.paciente-item strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.25rem;
}

.paciente-item .mutacion {
    color: var(--text-dark);
    font-size: 0.85rem;
    font-style: italic;
}

/* Estilo para el popup de Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(76, 106, 186, 0.15);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0.8rem 1rem;
}

.leaflet-popup-tip {
    background: var(--white);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .marker-heart {
        width: 35px;
        height: 35px;
    }

    .marker-heart i {
        font-size: 18px;
    }

    .marker-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .paciente-item {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .marker-heart {
        width: 30px;
        height: 30px;
    }

    .marker-heart i {
        font-size: 16px;
    }

    .marker-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .paciente-item {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
}

/* Estilos para el Overlay de Detalles de Superhéroe */
.superhero-detail-overlay {
    display: none; /* Oculto por defecto, controlado por JS al hacer clic */
    position: fixed;
    z-index: 2000; /* Asegura que esté por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Habilitar scroll si el contenido es largo */
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.superhero-detail-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    position: relative;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); /* Sombra para el efecto de sobresalir */
    animation: popOut 0.3s ease-out forwards; /* Animación de entrada */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.superhero-detail-content .close-detail {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.superhero-detail-content .close-detail:hover,
.superhero-detail-content .close-detail:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.superhero-detail-content .detail-image {
    width: 100%;
    max-width: 300px; /* Tamaño máximo para la imagen ampliada */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    object-position: center; /* Por defecto, se puede sobrescribir si es necesario */
}

.superhero-detail-content .detail-name {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.superhero-detail-content .detail-story {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 15px;
}

.superhero-detail-content .detail-city-mutation-age {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
}

/* Animación de entrada */
@keyframes popOut {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .superhero-detail-content {
        width: 95%;
        padding: 20px;
    }

    .superhero-detail-content .detail-name {
        font-size: 1.8rem;
    }

    .superhero-detail-content .detail-story {
        font-size: 1rem;
    }
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: #FFFFFF;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #C3D2EB;
}

/* Ajustes específicos para móvil */
@media (max-width: 768px) {
    .hero {
        height: 60vh; /* fallback */
        height: 60svh; /* small viewport height */
        min-height: 60svh;
    }
    @supports (height: 100dvh) {
        .hero {
            height: 60dvh;
            min-height: 60dvh;
        }
    }
    .hero-content { padding: 0 16px 18vh; justify-content: flex-end; }
    .hero-title { display: none; }
    .hero-subtitle { margin-bottom: 1.25rem; }
    .hero .btn { margin-top: 0.75rem; }
    .carousel-container {
        padding: 0 16px;
    }
    .ficha-imagen {
        height: 220px;
    }
    nav ul {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    nav ul li a {
        font-size: 0.95rem;
    }
    .video-section { margin-top: 80px; }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 10px;
    }
    .carousel-section {
        padding: 2rem 1rem;
    }
    .ficha-imagen {
        height: 180px;
    }
}

/* Correcciones para móvil: evitar overflow horizontal y mejorar el menú */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    /* Evitar que las flechas del carrusel provoquen desplazamiento horizontal */
    .slick-prev { left: 0; }
    .slick-next { right: 0; }

    /* Links de interés: acolchado más pequeño y una sola columna */
    .links-section { padding: 20px; }
    .links-container { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .carousel-container { padding: 0 12px; }
}

/* Video embebido responsivo */
.video-section {
    margin-top: 90px;
}
.video-section h3 {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 16px;
}
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Botón hamburguesa */
.hamburger {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Estado activo: convertir hamburguesa en X */
.hamburger { position: relative; z-index: 1001; }
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    header {
        gap: 8px;
    }
    .hamburger { display: block; }
    nav#main-nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(90deg, #4D6BBA 0%, #94D4A1 100%);
        padding: 10px 16px;
        display: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    }
    nav#main-nav.open { display: block; }
    nav#main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* Reubicación del botón hamburguesa y del menú en móvil */
@media (max-width: 768px) {
    header { position: relative; }
    .hamburger {
        position: absolute;
        top: 12px;
        right: 12px;
        display: block;
    }
    nav#main-nav { top: 100%; }
}

/* Ajustes finales para móvil (hero y CTA) */
@media (max-width: 768px) {
    .hero {
        height: 50vh; /* fallback */
        height: 50svh; /* small viewport height */
        min-height: 50svh;
    }
    @supports (height: 100dvh) {
        .hero { height: 50dvh; min-height: 50dvh; }
    }
    .hero-title, .hero-subtitle { display: none; }
    .hero-content {
        padding: 12px 16px 0; /* margen superior para despegar del header */
        justify-content: flex-start;
        display: flex;
        flex-direction: column;
        align-items: center; /* centra logo y CTA */
        gap: 12px; /* separación consistente entre logo y CTA */
        position: relative;
    }
    /* CTA siempre visible en móvil */
    .hero .btn.hero-btn {
        position: relative; /* debajo del logo dentro del hero */
        left: auto;
        bottom: auto;
        transform: none;
        margin-top: 0.75rem;
        z-index: 2; /* por encima del overlay */
        border-radius: 9999px;
        padding: 12px 22px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    }
}

/* Misión de la asociación */
.mission-section {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.mission-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}
.mission-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 24px;
}
.pillar-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pillar-card:hover { transform: translateY(-6px); box-shadow: 0 10px 24px rgba(0,0,0,0.1); }
.pillar-icon {
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
    background: var(--light-blue);
}
.pillar-icon i { font-size: 30px; color: var(--primary-blue); }
.pillar-card h3 { color: var(--primary-blue); margin: 6px 0 10px; font-size: 1.2rem; }
.pillar-card p { margin: 0; color: #555; line-height: 1.6; }

@media (max-width: 768px) {
    .mission-pillars { grid-template-columns: 1fr; }
}

/* Comité científico */
.comite-section { background: var(--light-blue); }
.comite-intro { max-width: 800px; margin: 0 auto 22px; text-align: center; }
.comite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}
.comite-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    text-align: center;
}
.comite-icon { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: var(--light-blue); }
.comite-icon i { font-size: 28px; color: var(--primary-blue); }
.comite-nombre { margin: 8px 0 6px; font-size: 1.2rem; color: var(--primary-blue); }
.comite-rol { margin: 0 0 4px; color: #555; font-weight: 500; }
.comite-centro { margin: 0; color: #666; }
.comite-note { display: block; margin-top: 12px; color: #666; text-align: center; }

/* Sección IQSEC2 en los Medios */
.medios-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.medios-intro {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    color: #555;
}

.medios-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Vídeos */
.medios-videos h3,
.medios-articulos h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.medios-videos h3 i {
    color: #EB5C3D;
}

.medios-articulos h3 i {
    color: var(--primary-blue);
}

.medios-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 100%; /* Permite que ocupe todo el ancho disponible */
}

.medio-video-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.medio-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.video-wrapper-media {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.medio-video-info {
    padding: 1.25rem;
}

.medio-video-info h4 {
    margin: 0 0 0.75rem;
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
}

.medio-fecha {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.medio-fecha i {
    color: var(--primary-orange);
}

.medio-descripcion {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Artículos de prensa */
.medios-articulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.medio-articulo-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.medio-articulo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--primary-blue);
}

.articulo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 8px;
}

.articulo-medio {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.articulo-fecha {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.articulo-fecha i {
    color: var(--primary-blue);
}

.medio-articulo-item h4 {
    margin: 0 0 0.75rem;
    color: var(--primary-blue);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}

.articulo-extracto {
    margin: 0 0 1rem;
    color: #555;
    line-height: 1.6;
    flex-grow: 1;
}

.articulo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
}

.medio-articulo-item:hover .articulo-link {
    gap: 10px;
}

.articulo-link i {
    font-size: 0.85rem;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .medios-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .medios-articulos-grid {
        grid-template-columns: 1fr;
    }
    
    .medios-videos h3,
    .medios-articulos h3 {
        font-size: 1.3rem;
    }
    
    .articulo-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .medio-video-item,
    .medio-articulo-item {
        transition: none;
    }
    
    .medio-video-item:hover,
    .medio-articulo-item:hover {
        transform: none;
    }
}
