/* ===== ESTILOS PARA CARRUSEL CON MAPA SUPERPUESTO - VERSIÓN TRANSPARENTE ===== */

/* Contenedor principal del hero */
.hero-section {
    height: 100vh;
    overflow: hidden;
}

/* Estilos para las imágenes del carrusel de fondo */
.carousel-bg-image {
    height: 100vh;
    object-fit: cover;
    filter: brightness(0.6);
    /* Oscurecer más para que el mapa resalte */
}

/* Overlay del mapa superpuesto - SIN fondo blanco */
.map-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Contenido del mapa con tamaño ajustado para layout de columnas */
.map-overlay .map-section-auto {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.3) !important;
    /* Fondo semi-transparente */
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    width: 95vw !important;
    /* Usar la mayoría del viewport */
    max-width: 1200px !important;
    /* Máximo razonable */
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 2rem;
}

/* Contenedor principal con tamaño controlado */
.map-overlay .container-fluid {
    background: transparent !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
}

/* Asegurar que las columnas no tengan restricciones */
.map-overlay .row {
    height: auto !important;
    overflow: visible !important;
}

.map-overlay .col-lg-6 {
    height: auto !important;
    overflow: visible !important;
}

/* Panel de botones con fondo semi-transparente */
.map-overlay .districts-info-panel {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Títulos con mejor contraste */
.map-overlay h2 {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.map-overlay h6 {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Botones de distrito con mejor estilo */
.map-overlay .district-btn-auto {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.map-overlay .district-btn-auto:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.map-overlay .district-btn-auto.active {
    background: rgba(12, 113, 58, 0.8) !important;
    border-color: rgba(12, 113, 58, 1) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(12, 113, 58, 0.5);
}

/* El mapa se adapta al contenedor de la columna */
.map-overlay .maparea-auto {
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
    width: 100% !important;
    /* Se adapta al contenedor */
    height: auto !important;
    /* Mantiene proporción */
    max-width: 800px !important;
    /* Máximo el tamaño original */
    display: block !important;
    object-fit: contain !important;
    /* Mantener proporciones exactas */
}

/* Asegurar que img-fluid no interfiera */
.map-overlay .img-fluid {
    width: 100% !important;
    height: auto !important;
    max-width: 800px !important;
}

/* Contenedor del mapa centrado en su columna */
.map-overlay .map-container-auto {
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    text-align: center !important;
    /* Centrar el mapa */
}

/* Panel de información del distrito */
.map-overlay .district-info-card {
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-overlay .district-info-card .card {
    background: transparent !important;
    border: none;
}

.map-overlay .district-info-card .card-header {
    background: rgba(12, 113, 58, 0.8) !important;
    border: none;
    color: white;
}

.map-overlay .district-info-card .card-body {
    color: white;
    background: transparent;
}

/* Controles del carrusel */
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    z-index: 15;
    width: 5%;
}

.hero-section .carousel-indicators {
    z-index: 15;
    bottom: 2rem;
}

/* Responsive - layout de columnas en móvil se vuelve vertical */
@media (max-width: 768px) {
    .map-overlay .map-section-auto {
        width: 95vw !important;
        padding: 1rem;
    }

    .map-overlay .row {
        flex-direction: column !important;
    }

    .map-overlay .col-lg-5,
    .map-overlay .col-lg-7 {
        width: 100% !important;
        margin-bottom: 1rem;
    }

    .map-overlay .maparea-auto {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .map-overlay .districts-info-panel {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .map-overlay .district-btn-auto {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .map-overlay .quick-access h6 {
        font-size: 0.9rem;
    }
}

/* ===== ESTILOS PARA SISTEMA DE BOTONES FLOTANTES ===== */

/* Contenedor principal para botones flotantes */
.map-overlay .map-section-floating {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    width: 95vw !important;
    max-width: 1400px !important;
    height: auto !important;
    max-height: 90vh !important;
    overflow: visible !important;
    padding: 2rem;
}

/* Panel de información para botones flotantes */
.map-overlay .districts-info-panel h4 {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.map-overlay .districts-info-panel .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.map-overlay .districts-info-panel h6 {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Botones de la lista lateral */
.map-overlay .district-list-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.map-overlay .district-list-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.map-overlay .district-list-btn.active {
    background: rgba(12, 113, 58, 0.8) !important;
    border-color: rgba(12, 113, 58, 1) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(12, 113, 58, 0.5);
}

/* Responsive para botones flotantes */
@media (max-width: 768px) {
    .map-overlay .map-section-floating {
        width: 95vw !important;
        padding: 1rem;
        max-height: 95vh !important;
    }

    .map-overlay .row {
        flex-direction: column !important;
    }

    .map-overlay .col-lg-4,
    .map-overlay .col-lg-8 {
        width: 100% !important;
        margin-bottom: 1rem;
    }

    .map-overlay .districts-info-panel {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .map-overlay .district-list-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}