@font-face {
  font-family: MontserratBold;
  src: url('./assets/font/Montserrat-Arabic Bold.ttf');
}

@font-face {
  font-family: Montserrat;
  src: url('./assets/font/Montserrat-Arabic Regular.ttf');
}

html, body {
    background-image: url('./assets/img/fondo.png');
    background-size:contain;  
    background-repeat: repeat;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden
}

.logo {
    width: 30vw;
    margin: 0;
    padding: 0;
    height: auto;
    margin-left: 10px;
    margin-right: 0;
}

/* Contenedor principal */
.container-fluid {
    height: 100%;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    flex-direction: column;
}

/* Sección de clima responsive */
.weather-section {
    color: rgb(0, 0, 0);
    text-align: center;
    position: relative;
    font-family: Montserrat;
}

.parent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(1, 1fr);
    gap: 8px;
    height: auto;
    align-items: center;
    /*border: 5px solid rgb(255, 0, 0);*/
    padding: 0;
    margin: 0;
}
    
.div1 {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
}

.div2 {
    padding: 0;
    margin: 0;
    grid-column: span 2 / span 2;
    display: flex;
    align-items: center;
    justify-items: center;
    margin-left: 30px;
    gap: 25px;
}
        
.weather-content {
    display: flex;
    align-items: center;
    align-content: center;
    align-self: center;
}

.weather-info {
    color: #131313;
    transition: transform 0.2s, color 0.2s;
    cursor: pointer;
}

.weather-info:hover {
    transform: scale(1.1);
    color: #667eea;
}

.weather-info h2 {
    font-weight: bold;
    font-size: 42px;
}

.weather-info h2,
.weather-info p {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.weather-infosub {
    opacity: 0.9;
    font-size: 1vw;
}

.weather-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.2s, color 0.2s;
    cursor: pointer;
    padding-left: 25px;
    padding-right: 15px;
    
}

.weather-top:hover {
    transform: scale(1.1);
}

.weather-temp-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-temp {
    font-size: 28px;
    font-weight: bold;
    align-self: center;
}

.weather-extra-temps {
    display: flex;
    gap: 10px;
    font-size: 16px;
    color: #131313;
}    

.weather-extra-temps i {
    margin-right: 3px;
    color: #131313;
}

.weather-icon {
    font-size: 40px;
    transition: transform 0.2s, color 0.2s;
    cursor: pointer;
    font-style: normal;
}

.weather-icon:hover {
    transform: scale(1.1);
    color: #667eea;
}

.weather-temp {
    font-size: 28px;
    font-weight: 300;
}

.weather-details {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
}

.weather-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    color: #131313;
    padding: 10px;
    border-radius: 20px;
    font-size: 20px;
    transition: transform 0.2s;
    cursor: pointer;
}

.weather-item:hover {
    transform: scale(1.1);
}

.weather-label {
    font-size: 16px;
    font-weight: 100;
    margin-bottom: 4px;
    color: #444;
}

/* Contenedor principal con sidebar y mapa */
.content-container {
    flex: 1;
    width: 100%;
    display: flex;
    position: relative;
    min-height: calc(100vh - 120px);
}

/* Sidebar responsive */
.sidebar {
    background: #f6f6f6;
    padding: 15px;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    font-family: Montserrat;
}

.category-section {
    margin-bottom: 20px;
}

.category-title {
    font-size: 22px;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: 800;
    font-family: Montserrat;
    word-spacing: 4px;
}

.playa-item {
    font-size: 18px;
    font-weight: 100;
    padding: 15px 5px 15px 5px;
    border-radius: 5px;
    transition: background-color 0.2s, transform 0.2s, color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: start;
    justify-items: center;
}

.playa-item:hover {
    background-color: #667eea;
    transform: scale(1.1);
    color: rgb(255, 255, 255);
}

.playa-item-inner {
    display: flex;
    align-items: center;
}

.playa-item-text {
    font-size: 18px;
}

.playa-item-flag {
    width: 48px;
    height: auto;
    margin-left: 8px;
    border-radius: 3px;
}
.paw-icon {
    color: #667eea;
    transition: color 0.2s;
}

.playa-item:hover .paw-icon {
    color: white;
}

/* Contenedor del mapa */
.map-container {
    flex: 1;
    position: relative;
    min-height: 300px;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* Botón de menú móvil */
.menu-toggle {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Overlay para móvil */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Animaciones */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}


/* Control de Playas Cancún JAVASCRIPT */
.leaflet-control.beach-legend {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 0, 0, 0.267);
    width: 20vw;
    font-family: Montserrat;
    overflow: hidden;
}

.leaflet-control .image-container {
    position: relative;
    display: inline-block; /* Ajusta al tamaño de la imagen */
    width: 100%;
    height: 150px;
    border-radius: 6px 6px 0 0;
}

.leaflet-control .mini-btn {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
}

.leaflet-control .mini-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.leaflet-control .image-beach {
  width: 100%;
  height: 150px;
  border-radius: 6px 6px 0 0;
}

.leaflet-control .beach-title {
  font-weight: bolder;
  font-size: 30px;
  color: #667eea;
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 5px;
  text-shadow: 0px 0px 22px rgba(102, 126, 234, 0.62);
}

.legend-title {
    font-size: 25px;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 10px 5px 10px 5px;
    font-weight: bolder;
    color: #667eea;
    justify-content: center;
}

.legend-placeholder {
    font-size: 15px;
    padding: 0 10px 5px 10px;
    color: #131313c6;
    text-align: center;
    font-style: italic;
}

.beach-info-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.info-box {
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-label {
  font-size: 18px;
  color: #667eea;
  margin-bottom: 4px;
  font-weight: 600;
}

.info-icon-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.info-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.info-text {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.info-text-km {
    font-size: 25px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bolder;
    color: #131313;
    justify-content: center;
}

.info-text-hour {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bolder;
    color: #131313;
}

.beach-extra-note {
    font-family: Montserrat;
    font-size: 13px;
    padding: 0 20px 5px 20px;
    text-align: justify;
}

.blue-flag {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    font-size: 20px;
    color: #667eea;
}

/* Estilos para Popup */
.leaflet-popup-content .custom-popup {
    background-color: #1e88e5; 
    color: white;              
    padding: 8px;
    height: 45px; /* alto máximo opcional */
    overflow-y: hidden; 
    font-family: Montserrat;
    text-align: center;
    min-width: 200px;
    border-radius: 10px;
}

.leaflet-popup-content .custom-popup h4 {
  font-size: 16px;
  color: #fff;
}

.leaflet-popup-content-wrapper {
  background: transparent; /* evita fondo blanco por defecto */
  box-shadow: none;
}

.leaflet-popup-tip {
  background: #1e88e5; /* flechita del popup */
}

.popup-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
}

/* Responsive breakpoints */

/* Tablets y pantallas medianas */
@media (max-width: 480px) {

    html, body {
        background-image: url('./assets/img/fondo.png');
        background-size:contain;  
        background-repeat: repeat;
        height: auto;
        width: 100%;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .content-container {
        flex-direction: column; /* Coloca divs en columna */
    }

    .map-container {
        border-radius: 10px;
        margin-top: 2px;
        order: 1; /* Mostrar primero el mapa */
        height: 100vh; /* Ajusta el tamaño para móviles */
        /*border: 5px solid rgb(255, 0, 0);*/
    }

    #map {
        margin: 0;
        padding: 0;
        border-radius: 10px;
        height: 60vh;
        border: 2px solid #667eeaa6;
    }

    .sidebar {
        order: 1; /* Sidebar arriba */
        background-color: transparent;
        width: 100%;
        height: auto;
        max-height: 20vh;
        box-shadow: none;
        transform: none !important; /* Evita que quede oculto */
        position: relative;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .weather-section {
        order: 0; /* Siempre arriba */
        background-position: center;
        padding: 0;
        /*border: 5px solid rgb(17, 0, 255)*/
    }

    .weather-info h2 {
        font-size: 5.5vw;
    }

    .weather-infosub {
        font-size: 10px;
    }

    .parent {
        display: flex;
        flex-direction: column; /* Apilar elementos */
        margin: 0;
        width: 100%;
        text-align: center;
        /*border: 5px solid rgb(51, 255, 0);*/
    }
    .div1 {
        width: 500px;
        height: auto;
        overflow: hidden;
    }
    .logo{
        width: 75VW;
        height: auto;
        overflow: hidden;
        margin-bottom: 0;
    }
    .div2 {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0;
        padding: 0;
        margin: 0;
        /*border: 5px solid rgb(51, 255, 0);*/
    }

    .weather-content, .weather-top {
        flex: 1 1 auto;
        display: flex;
    }
    .weather-content {
        justify-content: center;
        padding: 8px;
    }
    .weather-top {
        padding: 0;
        margin: 0;
    }
    .weather-icon {
        font-size: 26px;
    }

    .main-temp {
        font-size: 5.5vw;
    }

    .weather-extra-temps {
        font-size: 10px;
    }

    .weather-details {
        padding-bottom: 0;
        padding-top: 0;
        margin-bottom: 0;
        margin: 0;
        gap: 0 ;
    }

    .weather-item, .weather-label{
        font-size: 3.5vw;
        margin: 0;
        padding: 2px 6px 0 6px;
    }

    /*DISEÑO RESPONSIVE DEL CONTROL DE PLAYAS*/
    .leaflet-control.beach-legend {
        border-top: none;
        border-right: none;
        border-radius: 0 4px 0 8px;
        border-bottom: 2px solid rgba(0, 0, 0, 0.267);
        border-left: 2px solid rgba(0, 0, 0, 0.267);        width: 120px;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    .leaflet-control-zoom a {
        width: 22px !important;
        height: 22px !important;
        line-height: 22px !important;
        font-size: 12px !important;
    }

    .beach-legend .legend-title {
        padding: 4px 0 0 0;
        font-weight: 990;
        font-size: 12px;
    }
    .beach-legend .legend-placeholder p{
        text-align: justify;
        margin: 0;
        padding-top: 2px;
        padding-bottom: 4px;
        font-size: 8px;
    }

    .leaflet-control .image-container {
        height: 70px;
        border-radius: 0 0 0 8px;
    }

    .leaflet-control .image-beach {
        padding-bottom: 5px;
        height: 70px;
        border-radius: 0;
    }

    .leaflet-control .mini-btn {
        position: absolute;
        bottom: 5px;
        left: 5px;
        padding: 3px;
        font-size: 8px;
    }

    .leaflet-control .beach-title {
        font-size: 12px;
    }

    .beach-info-grid-4 {
        display: column;
    }

    .info-box {
        border-radius: 6px;
        display: column;
        align-items: center;
        text-align: center;
    }
    
    .info-label {
        font-size: 8px;
        color: #667eea;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .info-icon {
        width: 25px;
        height: 25px;
        object-fit: contain;
    }

    .info-icon-text {
        padding: 0 4px 0 4px;
    }

    .info-text-km {
        font-size: 12px;
        gap: 2px;
    }

    .info-text-hour {
        font-size: 9px;
        gap: 2px;
    }

    .blue-flag {
        text-align: center;
        padding: 0;
        margin-top: 5px;
        margin-bottom: 5px;
        font-size: 10px;
    }

    .beach-extra-note {
        text-align: left;
        font-size: 8px;
        padding: 4px 8px 2px 8px;
    }

    /* POPUP CSS */
    .leaflet-popup-content .custom-popup {
        padding: 4px 6px; 
        height: auto;
        min-width: fit-content;
        max-width: 80vw;
        border-radius: 6px;
        text-align: center;
        word-wrap: break-word;
    }

    .leaflet-popup-content .custom-popup h4,
    .popup-title {
        margin: 0 0 2px 0;
        font-size: 12px;
        white-space: nowrap; /* o quítalo si quieres saltos de línea */
    }

    .popup-title {
        margin: 0 0 2px 0;
        font-size: 12px;
    }

    /* Sidebar responsive */
    .category-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
        gap: 8px; /* espacio entre columnas y filas */
        padding-bottom: 5px;
        margin-bottom: 0;
    }

    .category-title {
        font-size: 18px;
        background-color: #667eea;
        color: #ffffff;
        margin-bottom: 8px;
        font-weight: 800;
        font-family: Montserrat;
        word-spacing: 4px;
        grid-column: span 2;
        justify-content: center;
        text-align: center;
        border-radius: 4px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .playa-item {
        font-size: 12px;
        padding: 8px;
        padding-bottom: 0;
        margin-bottom: 0;
        background-color: #f9f9f9;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .playa-item:hover {
        background-color: #667eea;
        transform: scale(1.1);
        color: rgb(255, 255, 255);
    }

    .playa-item-inner {
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        height: 100%;
    }

    .playa-item-text {
        font-size: 12px;
    }

    .playa-item-flag {
        padding: 0;
        width: 48px;
        height: auto;
        margin-left: 8px;
        border-radius: 3px;
    }

    .paw-icon {
        color: #667eea;
        transition: color 0.2s;
    }

    .playa-item:hover .paw-icon {
        color: white;
    }
}

