/* ==========================================================================
   MAPA INTERACTIVO DE HOTELES - LEAFLET
   Diseñado para De Luna Hotels
   ========================================================================== */

/* ==========================================================================
   CONTENEDOR PRINCIPAL DEL MAPA
   ========================================================================== */

.global-map-interactive {
    margin-bottom: var(--separation-section-desktop);
}

#interactive-map {
    width: 100%;
    height: 65vh;
    z-index: 1;
    background: var(--secondary-color);
}

/* ==========================================================================
   MARKERS DE LEAFLET
   ========================================================================== */

.leaflet-marker-icon {
    object-fit: contain;
    width: 32px !important;
    height: 32px !important;
}

/* ==========================================================================
   POPUPS DEL HOTEL
   ========================================================================== */

/* Contenedor del popup */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.leaflet-popup-content {
    width: 380px !important;
    margin: 0;
    padding: 0;
    font-family: manrope, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Flecha del popup */
.leaflet-popup-tip {
    background: #ffffff;
}

/* ==========================================================================
   LAYOUT DEL HOTEL EN EL POPUP
   ========================================================================== */

/* Layout horizontal del hotel en el popup */
.interactive-map__hotel {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: row;
    gap: 0;
    width: 100%;
    min-height: 180px;
    overflow: hidden;
}

/* Contenedor de la imagen del hotel */
.interactive-map__hotel__image {
    width: 45%;
    padding: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    align-self: stretch;
    overflow: hidden;
}

/* Imagen del hotel dentro del contenedor */
.interactive-map__hotel__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    padding: 0;
}

/* Contenido textual del hotel */
.interactive-map__hotel__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 12px;
    width: 55%;
    align-self: stretch;
}

/* ==========================================================================
   TEXTOS DEL POPUP
   ========================================================================== */

/* Nombre del hotel */
.interactive-map__hotel__content__name {
    font-family: bogy, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 20px;
    color: var(--primary-color);
    line-height: 1.3;
    margin: 0;
    display: block;
}

/* Dirección del hotel */
.interactive-map__hotel__content__address {
    font-size: 13px;
    color: rgba(38, 38, 38, 0.7);
    line-height: 1.4;
    margin: 0;
    display: block;
}

/* ==========================================================================
   CONTENEDOR DE BOTONES (Reservar + Ver más)
   ========================================================================== */

.interactive-map__hotel__content__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

/* ==========================================================================
   BOTON DE RESERVA
   ========================================================================== */

.interactive-map__hotel__content__link {
    font-weight: 700;
    font-size: 11px;
    padding: 6px 12px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border-radius: 30px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.interactive-map__hotel__content__link:hover {
    background: var(--primary-color);
    color: #ffffff !important;
    text-decoration: none;
}

/* ==========================================================================
   BOTON VER MAS
   ========================================================================== */

.interactive-map__hotel__content__link--view-more {
    border: none;
    border-radius: 0;
    padding: 0;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: none;
    color: var(--primary-color) !important;
    background: transparent;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.interactive-map__hotel__content__link.interactive-map__hotel__content__link--view-more:hover {
    background: transparent;
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
}

/* ==========================================================================
   CLUSTERS (Agrupación de markers)
   ========================================================================== */

/* Estilos base de clusters */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
}

.marker-cluster span {
    line-height: 30px;
    color: #ffffff;
    font-size: 14px;
}

/* Cluster pequeño (menos de 10 hoteles) */
.marker-cluster-small {
    background-color: var(--primary-color-opacity);
}

.marker-cluster-small div {
    background-color: var(--primary-color);
}

/* Cluster mediano (10-99 hoteles) */
.marker-cluster-medium {
    background-color: rgba(38, 38, 38, 0.3);
}

.marker-cluster-medium div {
    background-color: rgba(38, 38, 38, 0.7);
}

/* Cluster grande (100+ hoteles) */
.marker-cluster-large {
    background-color: var(--secondary-color);
}

.marker-cluster-large div {
    background-color: var(--primary-color);
}

.marker-cluster-large span {
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE: TABLET / MOBILE (< 992px)
   ========================================================================== */

@media (max-width: 991px) {

    .global-map-interactive {
        margin-bottom: var(--separation-section-mobile);
    }

    /* Reducir altura del mapa en móvil */
    #interactive-map {
        height: 350px;
    }

    /* Reducir ancho del popup */
    .leaflet-popup-content {
        width: 240px !important;
    }

    /* Layout vertical en móvil */
    .interactive-map__hotel {
        flex-direction: column;
        gap: 0;
        min-height: auto;
    }

    /* Imagen ocupa todo el ancho */
    .interactive-map__hotel__image {
        width: 100%;
        height: 140px;
        padding: 8px;
    }

    /* Contenido ocupa todo el ancho */
    .interactive-map__hotel__content {
        width: 100%;
        padding: 10px;
    }

    /* Ajustar tamaño del nombre */
    .interactive-map__hotel__content__name {
        font-size: 14px;
    }

    /* Ajustar tamaño de dirección */
    .interactive-map__hotel__content__address {
        font-size: 12px;
    }

    /* Ajustar botones */
    .interactive-map__hotel__content__actions {
        gap: 8px;
    }

    .interactive-map__hotel__content__link {
        font-size: 10px;
        padding: 5px 10px;
    }

    .interactive-map__hotel__content__link--view-more {
        font-size: 10px;
    }
}

/* ==========================================================================
   RESPONSIVE: DESKTOP GRANDE (> 1920px)
   ========================================================================== */

@media (min-width: 1921px) {

    /* Aumentar altura del mapa */
    #interactive-map {
        height: 600px;
    }

    /* Popup más grande */
    .leaflet-popup-content {
        width: 450px !important;
    }

    /* Hotel más alto */
    .interactive-map__hotel {
        min-height: 220px;
    }

    /* Textos más grandes */
    .interactive-map__hotel__content__name {
        font-size: 18px;
    }

    .interactive-map__hotel__content__address {
        font-size: 14px;
    }

    .interactive-map__hotel__content__link {
        font-size: 12px;
        padding: 8px 16px;
    }

    .interactive-map__hotel__content__link--view-more {
        font-size: 13px;
    }
}
