/* ===========================================
   PERFORMANCE OPTIMIZATIONS & CRITICAL CSS
   =========================================== */

/* Preload critical fonts with font-display: swap */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* GPU acceleration for smooth animations */
.carousel-item,
.portfolio__project,
.modal,
.hamburger {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Contain layout for performance */
.header,
.profile,
.nav,
.carousel-container {
    contain: layout;
}

/* Defer non-critical CSS with containment */
.faq,
.contact-form {
    contain: style layout;
}

/*-------------- ACCESSIBILITY STYLES --------------*/

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    font-size: 14px;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Improved hamburger menu for accessibility */
.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Focus indicators for keyboard navigation */
*:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-color: #000;
        --text-color: #fff;
        --dark-color: #fff;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Lazy loading optimization */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Critical path optimization */
.above-fold {
    will-change: auto;
}

/*-------------- RESET & BASE STYLES --------------*/

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
html {
    scroll-padding-top: 20px; /* Offset para compensar el header fijo */
}
body{
    font-family: sans-serif;
    background-color: #f0f0f0;
    color: #101632dd;
    --bg-color: color-mix(in srgb, rgb(28, 195, 200) 50%, #fff);
    --faq-color: #fff;
    --dark-color: rgb(20, 129, 133);
    --text-color: #fff;
    --text-color2: #444;
    padding-top: 100px; /* Espacio para el header fijo con padding */
}
body,div, ul, nav,header,footer, a, li, label, p {
    margin: 0;
    padding: 0;
    position:sticky;
}

/* Ajuste para scroll con header fijo */
section[id], main[id], div[id] {
    scroll-margin-top: 40px; /* Alternativa para navegadores que no soportan scroll-padding-top */
}

/* Mejora para enlaces de navegación */
.header__nav-item a {
    transition: color 0.3s ease;
}
/*-------------- HEADER SECTION --------------*/
.header{
    background-color: #fffa;
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    container-type: inline-size;
    container-name: header;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    padding: 0 10px;
    min-height: 40px;
}
.header__open-nav-button{
    color: var(--dark-color);
    font-size: 3rem;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.header__open-nav-button:hover {
    background-color: rgba(20, 129, 133, 0.7);
}

.header__open-nav-button:active {
    background-color: rgba(20, 129, 133, 0.2);
}

.header__checkbox{
    display: none;
}
.header__close-nav-button{
    color: var(--dark-color);
    font-size: 3rem;
    font-weight: bold;
    position: fixed;
    right: 20px;
    top: 15px;
    z-index: 11;
    display: none;
    cursor: pointer;
}
.header__nav{
    display: none;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(3px);
    position: fixed;
    height: 50vh;
    width: auto;
    top: 0;
    right: 0;
    z-index: 9;
    padding-top: 90px; /* Espacio para no superponer el header */
}

.header__nav-list{
    display: flex;
    flex-direction: column;
    height: calc(100vh - 90px); /* Altura completa menos el header */
    margin: auto;
    padding-top: 0;
    justify-content: flex-start;
    padding: 25px;
    gap: 30px;
    backdrop-filter: blur(3px);
    background-color: transparent;
}
.header__checkbox:checked ~ .header__nav{
    display: flex;
    
}
.header__checkbox:checked ~ .header__open-nav-button{
    display: none;

}
.header__checkbox:checked ~ .header__close-nav-button{
    display: block;
    
}
.head__logo-container{
    display: flex;
    align-items: center;
    z-index: 11;
    flex: 0 0 auto; /* No crece, no se encoge, tamaño automático */
    
}
.header__logo{
    max-width: 100%;
    width: 150px;
    margin: 7px 5px;
    max-width: calc(100vw - 100px); /* Asegurar que no se superponga con el botón */
}
.header__nav-item{
    list-style: none;
}
.header__nav-item a {
    color: var(--dark-color);
    text-decoration: none;
    align-items: center;

}
.header__nav-item a:is(:hover,:active){
    text-decoration: underline;
}

/*-------------- HEADER QUERIES --------------*/

@container header (min-width: 760px){
    .header__nav {
        display: flex;
        position: static;
        height: auto;
        width: auto;
        max-width:fit-content;
        padding: 0;
        border-radius: 0;
        
    }
    .header__nav-list{
        flex-direction: row;
        height: auto;
        width: auto;
        gap: 20px;
        margin: 0px;
        padding: 0;
        justify-content: flex-end;
        background-color: transparent !important;
    }
    .header__open-nav-button{
        display: none;
    }
    .header__close-nav-button{
        display: none;
    }
    .head__logo-container{
        flex: 0 0 auto;
        justify-content: flex-start;
    }
    .header__logo{
        width: 180px;
        margin: 10px 0;
    }
    .header__nav{
        flex: 1;
        justify-content: flex-end;
        background-color: transparent !important;
    }
}

/*-------------- HEADER ENDS --------------*/

/*-------------- Geographic Description --------------*/
.geographic__description{
    color: var(da);
    margin: 0 0 12px 0;
    line-height: 1.4;
    max-width: 1200px;
    background-color: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 5px 5px 5px #0002;
    justify-content: center;
    place-items: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.lista__SIG{
    text-align: left;
    margin: 2px 0;
    line-height: 1.4;
}

/* Estilos base para faq__option2 */
.faq__option2 {
    background-color: var(--faq-color);
    margin: 10px;
    max-width: 800px;
    padding: 15px;
    max-height: 75px;
    overflow: hidden;
    display: block;
    transition: max-height 0.5s ease-in-out;
    border-radius: 8px;
    box-shadow: 5px 5px 10px 2px #0001;
    cursor: pointer;
}

/* Ocultar checkbox */
.faq__option2 input[type="checkbox"] {
    display: none;
}

/* Cuando el checkbox está marcado, cambiar el símbolo + por - */
.faq__option2 input[type="checkbox"]:checked + .faq__ask2::before {
    content: '-';
}

/* Cuando el checkbox está marcado, mostrar contenido con animación */
.faq__option2 input[type="checkbox"]:checked ~ .content2 {
    animation: aparecer 1s both;
}

/* Expandir el contenedor cuando el checkbox está marcado */
/* Fallback: usar :has() para navegadores modernos que lo soporten */
.faq__option2:has(input[type="checkbox"]:checked) {
    max-height: 1400px;
    transition: max-height 1.0s ease-in-out;
}

/* JavaScript fallback: clase para expandir */
.faq__option2.expanded {
    max-height: 1400px !important;
    transition: max-height 1.0s ease-in-out;
}
.img-containerRF2{
    display: flex;
    justify-content:start;
    align-items: center;
    margin: 2px 3px;
    padding: 8px;
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
}

.img-containerRF2 img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height:fit-content;
    object-fit:fill;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.img-containerRF2 img:hover {
    transform: scale(1.02);
}
.content2 {
    padding: 20px 25px;
    margin: 15px;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: var(--text-color2);
    border-radius: 10px;
}
.faq__ask2 {
    user-select: none;
    position: relative;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 2px;
    min-height: 50px;
    display: flex;
    align-items: center;
    line-height: 1.3;
    cursor: pointer;
}
.faq__ask2::marker {
    content: '';
}
.faq__ask2::before {
    content: '+';
    color: var(--dark-color);
    position: absolute;
    right: 0;
    font-weight: 900;
}

/*-------------- Geographic Description ENDS --------------*/

/*-------------- MAIN PROFILE --------------*/

.profile{
    container-name: profile;
    container-type: inline-size;
    margin-top: 20px;
}
.profile__wrapper{
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
    max-width: 1200px;
}


.profile__img-container{
    background-color: #fff;
    flex-direction: row;
    overflow: hidden;
    max-width:fit-content;
    padding: 12px;
    color: var(--text-color2);
    margin: 12px 0 12px 0;
    line-height: 1.4;
    box-shadow: 0px 0px 10px #0005;
}
.profile__img{
    max-width: 100%;
    width: 300px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.grid{
    display: flex;
    /*flex-wrap:wrap*/
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: auto;
    /*grid-template-rows: 200px 200px 200px;*/
}
.grid-item{
    display: grid;
    padding: 12px;
    place-items: center;
    width: 100%;
    box-sizing: border-box;
}
h1{
    color: var(--dark-color);
}
.profile__skills-container h2{
    color: var(--dark-color);
    margin-left: 40px;
}
.profile__skill{
    list-style: none;
    display: flex;
    margin: 15px;
    max-width: 800px;
    /*margin-left: 0;*/
    align-items: center;
}
.profile__skill-name{
    color: var(--dark-color);
    font-weight: bold;
}
.load-bar{
    border: 2px solid var(--dark-color);
    border-radius: 8px;
    color: #fff;
    padding: 2px;
    font-size: 12px;
    width: 70%;
    margin: 4px;
    margin-left: 25px;
}
.load-bar__bar{
    background-color: var(--dark-color);
    border-radius: 4px;
    padding: 4px 6px;
}
.bar--95{
    width: 95%;
}
.bar--75{
    width: 75%;
}
.bar--70{
    width: 70%;
}
.bar--65{
    width: 65%;
}
.bar--50{
    width: 50%;
}
.bar--45{
    width: 45%;
}
/*-------------- PROFILE SECTION --------------*/
@container profile (min-width:720px){
    .profile__wrapper{
        /*flex-direction: row;*/
        gap: 20px;
        padding: 20px;
        background-color: transparent;
        /*height: 50vh;*/
        margin: auto;
    }
    .grid{
        display: flex;
        flex-wrap:wrap;
        justify-content: center;
        gap: 12px;
        max-width: 900px;
        margin: auto;
        width: 100%;
        
    }
    .grid-item{
        display: grid;
        padding: 12px;
        place-items: center;
        font-size: clamp(.5rem, 1.5vw, 1rem);
    }
    .profile__data-container{
        background-color: #fff;
        display: flex;
        align-items: center;
        border-radius: 20px 20px 20px 20px;
        box-shadow: 0px 0px 10px #0005;
    }
    
    h1{
        margin-top: 0;
        font-style: 4rem;
        text-wrap: balance;
    }
    .profile__data {
        min-width: 520px;
    }
    .profile__img-container{
        /*max-height: initial;*/
        display: flex;
        border-radius: 12px;
        box-shadow: 5px 5px 5px #0002;
    }
    .profile__img {
        height: 80%;
        object-fit: cover;
        width: 220px;
        box-shadow: 5px 5px 15px #0005;
        /*max-width: initial;*/
    }
}

/*-------------- MAIN PROFESIONAL SERVICES --------------*/
.faq {
    margin: auto;
    
}

.faq__option {
    background-color: var(--faq-color);
    margin: 20px;
    padding: 15px;
    max-height: 80px;
    overflow: hidden;
    display: block;
    transition: max-height 0.5s ease-in-out;
    border-radius: 8px;
    box-shadow: 5px 5px 10px 2px #0002;
}
.faq__option:has(input[type="checkbox"]:checked) {
    max-height: 800px;
    transition: max-height 1.0s ease-in-out;
}
.faq__option:has(input[type="checkbox"]:checked) .content {
    animation: aparecer 1s both;
}

.content {
    padding: 20px 25px;
    margin: 15px;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: var(--text-color2);
    border-radius: 10px;
}
.faq__ask {
    user-select: none;
    position: relative;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 2px;
    min-height: 50px;
    display: flex;
    align-items: center;
    line-height: 1.3;
}
.faq__ask::marker {
    content: '';
}
.faq__ask::before {
    content: '+';
    color: var(--dark-color);
    position: absolute;
    right: 0;
    font-weight: 900;
}
input[type="checkbox"]{
    display: none;
}
.faq__option:has(input[type="checkbox"]:checked) .faq__ask::before {
    content: '-';
}

.faq__option b {
    background-color: var(--dark-color);
    padding: 3px;
    color: #fff;
    border-radius: 5px;
    margin: 5px;
}
.img-containerRF{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 10px;
    padding: 8px;
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
}

.img-containerRF img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}




.img-containerRF img:hover {
    transform: scale(1.02);
}
@keyframes aparecer {
    0% {
        opacity: 0;
        translate: 0 -20px;
    }
    50% {
        border-top:  1px solid transparent;
    }
    100% {
        opacity: 1;
        translate: 0 0;
        border-top: 1px solid var(--dark-color);
    }
}
@media screen and (min-width: 600px) {
    .faq {
        min-width: clamp(300px, 70%, 700px);
        margin: 40px;
    }
}
/*-------------- ENDS PROFESIONAL SERVICES --------------*/

/*-------------- PORTFOLIO SECTION --------------*/

.portfolio {
    background: linear-gradient(135deg, #f8f9fa 0%, #e2fbff 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: center;
    container-name: portfolio;
    container-type: inline-size;
    justify-content: flex-start;
    padding: 15px 10px;
    width: 95%;
    max-width: 1600px;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.portfolio__title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.portfolio__description {
    font-size: 1.2rem;
    color: var(--text-color2);
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

.portfolio__project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1300px;
    margin: auto;
    width: 100%;
    gap: 20px;
    padding: 20px;
}

.portfolio__project {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio__project:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.portfolio__project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.portfolio__project:hover .portfolio__project-image img {
    transform: scale(1.05);
}

.portfolio__project-name {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 15px 0 5px 0;
    padding: 0 15px;
}

.portfolio__project-brief {
    font-size: 1rem;
    color: var(--text-color2);
    margin: 0 0 15px 0;
    padding: 0 15px;
    flex-grow: 1;
}

/*-------------- PORTFOLIO MODAL STYLES --------------*/

.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.portfolio-modal__content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    padding: 0;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portfolio-modal__close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.portfolio-modal__close:hover {
    color: #000;
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

.portfolio-modal__header {
    padding: 30px;
    background: linear-gradient(135deg, var(--bg-color), var(--dark-color));
    color: white;
    text-align: center;
}

.portfolio-modal__header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
}

.portfolio-modal__header p {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

.portfolio-modal__body {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}

.portfolio-modal__image-container {
    flex: 2;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-modal__image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.portfolio-modal__details {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #f8f9fa;
}

.portfolio-modal__details h3 {
    margin: 0 0 20px 0;
    color: var(--dark-color);
    font-size: 1.8rem;
}

.portfolio-modal__navigation {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.portfolio-modal__nav-btn {
    padding: 12px 24px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 250px;
}

.portfolio-modal__nav-btn:hover {
    background: var(--bg-color);
    transform: translateY(-2px);
}

.portfolio-modal__nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/*-------------- PORTFOLIO RESPONSIVE QUERIES --------------*/

@container portfolio (min-width: 56.25rem){
    .portfolio__project-container{
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 25px;
    }
}

@container portfolio (min-width: 81.25rem){
    .portfolio__project-container{
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
}

/* Mobile responsive para modal */
@media (max-width: 768px) {
    .portfolio-modal__content {
        width: 98%;
        height: 95vh;
        margin: 1% auto;
    }
    
    .portfolio-modal__body {
        flex-direction: column;
    }
    
    .portfolio-modal__image-container {
        flex: 1;
        max-height: 50%;
    }
    
    .portfolio-modal__details {
        flex: 1;
        padding: 20px;
    }
    
    .portfolio-modal__navigation {
        padding: 15px;
    }
    
    .portfolio-modal__nav-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
/*-------------- MAPS CAROUSEL SECTION --------------*/

/* Estilos específicos para páginas de mapas interactivos */
.map-page-body {
    padding-top: 70px; /* Espacio para el header fijo */
}

.map-page-body .main-content {
    margin-top: 10px;
    padding: 20px;
}

.map-page-body .content-section {
    margin-bottom: 20px;
    align-self: center;
}

.map-page-body .map-container {
    position: relative;
    width: 100%;
    margin: 20px;

    border-radius: 8px;
    
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Asegurar que los mapas no se superpongan con el header */
.map-page-body #map {
    position: relative !important;
    z-index: 1 !important;
}

/* Estilos para mapas Kepler/Mapbox */
.map-page-body .kepler-gl {
    position: relative !important;
    z-index: 1 !important;
}

/* Contenedor principal de Kepler.gl */
.map-page-body #app,
.map-page-body #keplergl-0,
.map-page-body #keplergl-1,
.map-page-body #keplergl-2 {
    position: relative !important;
    height: calc(100vh - 100px) !important;
    min-height: 600px !important;
    width: 100% !important;
    margin-top: 80px !important; /* Mayor margen para evitar superposición */
    margin-bottom: 20px !important;
    display: block !important;
    visibility: visible !important;
    background: #f8f9fa; /* Fondo temporal para debug */
    border: 2px solid #007cad; /* Borde temporal para debug */
    overflow: visible !important;
}

.map-page-body #app > div {
    width: 100% !important;
    height: 100% !important;
}

/* Canvas de Mapbox dentro de Kepler */
.map-page-body .mapboxgl-canvas {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* DISABLED - Interferían con layout de Kepler

.map-page-body .kepler-gl__map-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    z-index: 1 !important;
}

.map-page-body .map-container,
.map-page-body [class*="map-container"] {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    background: #f0f0f0 !important;
}

END DISABLED */

/* Canvas WebGL de Mapbox */
.map-page-body canvas.mapboxgl-canvas {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Asegurar que el componente Kepler sea visible */
.map-page-body .kepler-gl * {
    visibility: visible !important;
}

/* KEPLER STYLES DISABLED - usando kepler-minimal.css en su lugar 

.map-page-body .kepler-gl__side-panel {
    z-index: 5 !important;
    max-width: 300px !important;
    width: 300px !important;
}

.map-page-body .kepler-gl__header {
    z-index: 10 !important;
    position: relative !important;
}

.map-page-body .kepler-gl__bottom-widget {
    position: absolute !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 8 !important;
    max-width: 200px !important;
    width: auto !important;
}

.map-page-body .kepler-gl__map-control {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 8 !important;
    width: auto !important;
    max-width: 150px !important;
}

END DISABLED KEPLER STYLES */

/* DISABLED - Layout flex que interfería con Kepler

.map-page-body .kepler-gl button,
.map-page-body .kepler-gl [class*="button"],
.map-page-body .kepler-gl [class*="control"] {
    width: auto !important;
    max-width: 200px !important;
    position: relative !important;
    z-index: 8 !important;
}

.map-page-body [class*="3d"],
.map-page-body [class*="polygon"],
.map-page_body [class*="map-control-button"] {
    width: auto !important;
    max-width: 120px !important;
    height: auto !important;
    max-height: 40px !important;
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 8 !important;
}

.map-page-body .kepler-gl {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
}

.map-page-body .kepler-gl__side-panel {
    order: 1 !important;
    flex: 0 0 300px !important;
}

.map-page-body .kepler-gl__main {
    order: 2 !important;
    flex: 1 !important;
    position: relative !important;
}

END DISABLED */

/* Forzar renderización del contenedor del mapa Mapbox */
.map-page-body .mapboxgl-map {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

/* Contenedor principal del mapa en Kepler */
.map-page-body [class*="map-container"] {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

/* Wrapper del viewport de Mapbox */
.map-page-body .mapboxgl-canvas-container {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

/* Controles de Mapbox */
.map-page-body .mapboxgl-ctrl-top-left,
.map-page_body .mapboxgl-ctrl-top-right,
.map-page-body .mapboxgl-ctrl-bottom-left,
.map-page-body .mapboxgl-ctrl-bottom-right {
    z-index: 2 !important;
}

/* Estilos específicos para QGIS2Web (OpenLayers) */
.map-page-body .ol-viewport {
    position: relative !important;
}

.map-page-body .ol-overlaycontainer-stopevent {
    z-index: 2 !important;
}

.map-page-body .ol-control {
    z-index: 3 !important;
}

.maps-carousel-section {
    padding: 5px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e2eaff 100%);
    text-align: center;
}

.maps-carousel-section h2 {
    margin-bottom: 15px;
    font-size: 2.5rem;
    color: var(--dark-color);
    font-weight: bold;
}

.section-description {
    max-width: 600px;
    margin: 0 auto 30px;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.carousel-container {
    position: relative;
    max-width: 1600px;
    margin: 0 auto 5px; /* Más margen inferior */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 15px;
    padding: 0 0 10px 0; /* Padding inferior para acomodar hover */
    height: auto;
    min-height: 450px;
}

.carousel-container::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 15px;
    right: 15px;
    bottom: 10px;
    border-radius: 15px;
    overflow: hidden;
    z-index: -1;
    
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    padding: 20px 20px 35px 20px; /* Más padding inferior para evitar cortes */
    min-height: 490px; /* Altura mínima para acomodar el hover */
}

.carousel-item {
    min-width: 320px;
    flex: 0 0 280px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

.carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.carousel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 90%;
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.carousel-item:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.card-overlay .icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.9);
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tech-badge {
    background: #007cad;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.card-content {
    padding: 20px;
    text-align: left;
}

.card-content h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-content p {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature {
    background: #f0f7ff;
    color: #007cad;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e0e7ff;
}

.carousel-control {
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #007cad;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background: #007cad;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 15px;
}

.carousel-control.next {
    right: 15px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    margin: 10px 0;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #007cad;
    transform: scale(1.2);
}

.indicator:hover {
    background: #005580;
}

/* Responsive design */
@media (max-width: 768px) {
    .carousel-item {
        min-width: 280px;
        flex: 0 0 180px;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        min-width: 250px;
        flex: 0 0 150px;
    }
    
    .maps-carousel-section {
        padding: 40px 10px;
    }
    
    .maps-carousel-section h2 {
        font-size: 2rem;
    }
}
/*.MapaWeb{
    display: flex;
    font-size: 2rem;
    margin-bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    background-color: #18233f;
    color: #fff;
}
.mapa {
    min-height: 50vh;
    margin: auto;
    margin-top: 5px;
    height: 100px;
    display: grid;
    width: 80%;
    transition: max-height .5s;
    border-radius: 8px;
    box-shadow: 5px 5px 10px 2px rgba(102, 102, 102, 0.533);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    container-name: map;
    container-type: inline-size;
}*/
/* Estilos mejorados para el control de capas personalizado */
.opacity-control {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 15px;
    margin: 10px;
    max-width: 300px;
    font-family: Arial, sans-serif;
}

.opacity-panel h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #007cad;
    padding-bottom: 8px;
}

.layer-controls {
    margin-bottom: 15px;
}

.layer-item {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    background: #f9f9f9;
}

.layer-header {
    margin-bottom: 8px;
}

.layer-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.layer-checkbox input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.layer-name {
    color: #333;
    font-size: 13px;
}

.opacity-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
    z-index: 1002;
}

.opacity-item label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    z-index: 1002;
}

.opacity-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opacity-item input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.opacity-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007cad;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.opacity-item input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007cad;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.opacity-value {
    font-size: 12px;
    font-weight: bold;
    color: #007cad;
    min-width: 35px;
    text-align: center;
}

.debug-info {
    border-top: 1px solid #eee;
    padding-top: 8px;
    color: #666;
}

#debug-status {
    font-weight: bold;
    color: #007cad;
}

/* Panel lateral para control de capas */
.sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-panel.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    background: #007cad;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.base-maps-section,
.overlay-section {
    margin-bottom: 25px;
}

.base-maps-section h4,
.overlay-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007cad;
    padding-bottom: 8px;
}

.base-map-item,
.layer-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.base-map-item:hover,
.layer-item:hover {
    background: #f0f7ff;
    border-color: #007cad;
}

.base-map-radio,
.layer-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 10px;
}

.base-map-radio input[type="radio"],
.layer-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.3);
    cursor: pointer;
}

.base-map-name,
.layer-name {
    color: #333;
    font-size: 14px;
    flex: 1;
}

.opacity-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    display: none;
}

.opacity-controls.active {
    display: block;
}

.opacity-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: block;
}

.opacity-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opacity-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cad;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.opacity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cad;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.opacity-value {
    font-size: 13px;
    font-weight: bold;
    color: #007cad;
    min-width: 40px;
    text-align: center;
    background: #e8f4f8;
    padding: 4px 8px;
    border-radius: 4px;
}

.connection-status {
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
}

#connection-status {
    font-weight: bold;
}

#connection-status.connected {
    color: #28a745;
}

#connection-status.error {
    color: #dc3545;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
}

/* Ajustar el contenido principal para dar espacio al sidebar */
.main-content {
    margin-left: 0;
    padding-top: 90px; /* Para el header fijo */
    z-index: 1002;
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Sección del mapa interactivo */
.map-section {
    padding: 40px 20px;
    background: #f8f9fa;
    text-align: center;
}

.map-section h2 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #333;
    font-weight: bold;
}

/* Estilos para el contenedor del mapa */
#map {
    width: 95%;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    height: 900px; /* Altura fija necesaria para Leaflet */
    min-height: 750px;
    overflow: hidden;
    max-width: 1600px;
    position: relative;
    z-index: 1;
}

/* Control de capas dentro del mapa - Ajustes de z-index MUY ALTOS */
.leaflet-control-layers-custom {
    background: white !important;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 0;
    width: 280px;
    max-height: 400px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    z-index: 999999 !important;
    position: relative !important;
}

.layers-panel-header {
    background: #007cad !important;
    color: white;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999999 !important;
    position: relative !important;
}

.layers-panel-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.2s;
    z-index: 999999 !important;
    position: relative !important;
}

.layers-panel-toggle:hover {
    background: rgba(255,255,255,0.2);
    z-index: 999999 !important;
}

.layers-panel-content {
    padding: 15px;
    display: block;
    z-index: 999999 !important;
    position: relative !important;
    background: white !important;
}

.layers-panel-content.collapsed {
    display: none;
}

/* Asegurar que todos los elementos del control estén por encima */
.base-maps-section,
.overlay-layers-section {
    margin-bottom: 20px;
    z-index: 999999 !important;
    position: relative !important;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
    z-index: 999999 !important;
    position: relative !important;
}

.base-map-item,
.overlay-layer-item {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #f9f9f9 !important;
    transition: all 0.2s;
    z-index: 999999 !important;
    position: relative !important;
}

.base-map-item:hover,
.overlay-layer-item:hover {
    background: #f0f7ff !important;
    border-color: #007cad;
}

.base-map-label,
.overlay-layer-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    margin-bottom: 8px;
    z-index: 999999 !important;
    position: relative !important;
    background: transparent !important;
}

.base-map-label input,
.overlay-layer-label input {
    margin-right: 8px;
    transform: scale(1.1);
    z-index: 999999 !important;
    position: relative !important;
}

.opacity-controls {
    padding-top: 8px;
    border-top: 1px solid #ddd;
    margin-top: 8px;
    display: none;
    z-index: 999999 !important;
    position: relative !important;
    background: #f9f9f9 !important;
}

.opacity-controls.active {
    display: block;
}

.opacity-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
    display: block;
    z-index: 999999 !important;
    position: relative !important;
}

.opacity-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999999 !important;
    position: relative !important;
}

.opacity-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    z-index: 999999 !important;
    position: relative !important;
}

.opacity-value {
    font-size: 11px;
    font-weight: bold;
    color: #007cad;
    min-width: 32px;
    text-align: center;
    background: #e8f4f8;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 999999 !important;
    position: relative !important;
}

.connection-status {
    padding: 8px 10px;
    background: #f5f5f5 !important;
    border-radius: 4px;
    text-align: center;
    margin-top: 10px;
    font-size: 11px;
    z-index: 999999 !important;
    position: relative !important;
}

.connection-status.connected {
    background: #d4edda !important;
    color: #155724;
}

.connection-status.error {
    background: #f8d7da !important;
    color: #3e0f14;
}

/* Ajuste específico para controles de Leaflet - valores máximos */
.leaflet-control {
    z-index: 999999 !important;
}

.leaflet-top .leaflet-control {
    z-index: 999999 !important;
}

.leaflet-control-container {
    z-index: 999999 !important;
}

.leaflet-top {
    z-index: 999999 !important;
}

/* Asegurar que las capas del mapa tengan z-index menor */
.leaflet-tile-pane {
    z-index: 1 !important;
}

.leaflet-overlay-pane {
    z-index: 2 !important;
}

.leaflet-marker-pane {
    z-index: 3 !important;
}

.leaflet-popup-pane {
    z-index: 700 !important;
}

/*-------------- CONTACT SECTION --------------*/

.form {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    container-name: form;
    container-type: inline-size;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.contact__info {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
}

.contact__description {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact__details {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact__icon {
    font-size: 1.5rem;
}

.contact__text {
    font-weight: 500;
    color: var(--dark-color);
}

.form__form {
    padding: 30px;
    max-width: 800px;
    width: 100%;
    display: grid;
    gap: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.form__input-container {
    display: flex;
    flex-direction: column;
}

.form__input-container label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.form__input-container :is(input, textarea, select) {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    background-color: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form__input-container :is(input, textarea, select):focus {
    outline: none;
    border-color: var(--dark-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

.form__input-container textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form__input-container select {
    cursor: pointer;
}

.submit-btn {
    padding: 18px 30px;
    background: linear-gradient(45deg, var(--dark-color), #7b68ee);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form__message, .form__error {
    margin-top: 20px;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    animation: slideIn 0.5s ease;
}

.form__message {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.form__error {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
}

.message__content, .error__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.message__icon, .error__icon {
    font-size: 2rem;
}

.message__title, .error__title {
    font-size: 1.3rem;
    margin: 0;
}

.message__text, .error__text {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form__title {
    font-size: 3rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
}

/*-------------- CONTACT QUERIES --------------*/

@container form (min-width: 56.25rem){
    .form__form {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
        "name lastname"
        "email phone"
        "tipo tipo"
        "message message"
        "button button";
        gap: 25px;
        padding: 40px;
    }
    
    /* Orden específico: Nombre | Apellido */
    .form__nombre {
        grid-area: name;
    }
    .form__apellido {
        grid-area: lastname;
    }
    
    /* Segunda fila: Email | Teléfono */
    .form__email {
        grid-area: email;
    }
    .form__telefono {
        grid-area: phone;
    }
    
    /* Tercera fila: Tipo de Consulta (ancho completo) */
    .form__tipo {
        grid-area: tipo;
    }
    
    /* Cuarta fila: Mensaje (ancho completo) */
    .form__mensaje {
        grid-area: message;
    }
    
    /* Quinta fila: Botón Enviar (ancho completo) */
    .form__submit {
        grid-area: button;
    }

    .contact__details {
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .contact__details {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .contact__item {
        padding: 12px 18px;
    }
    
    .form__title {
        font-size: 2.5rem;
    }
    
    .contact__description {
        font-size: 1.1rem;
    }
}

/*-------------- QUERY POPUP STYLES --------------*/

/* Estilos para los popups de consulta de datos */
.query-popup {
    font-family: Arial, sans-serif;
    max-width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.layer-section {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.layer-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.layer-title {
    color: #007cad;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #007cad;
}

.feature-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
}

.feature-info h4 {
    color: #333;
    font-size: 13px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.attributes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.attributes-table tr:nth-child(even) {
    background-color: #f0f7ff;
}

.attr-key {
    font-weight: bold;
    color: #555;
    padding: 4px 8px 4px 0;
    vertical-align: top;
    width: 40%;
    border-bottom: 1px solid #ddd;
}

.attr-value {
    color: #333;
    padding: 4px 0;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
}

.no-data {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.loading {
    color: #007cad;
    text-align: center;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 6px;
    border: 1px solid #007cad;
    font-weight: bold;
}

/* Personalizar el popup de Leaflet */
.leaflet-popup-content-wrapper {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid #ccc;
}

.leaflet-popup-content {
    margin: 15px;
    line-height: 1.4;
}

.leaflet-popup-tip {
    background: white;
    border: 1px solid #ccc;
}

/*-------------- FOOTER SECTION --------------*/

footer {
    padding: 40px;
    text-align: center;
    background-color: var(--dark-color);
    color: #fffd;
    font-size: 18px;
}
