@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: #555555;
    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: #555555;
    transition: transform 0.2s, color 0.2s;
    cursor: pointer;
}

.weather-info:hover {
    transform: scale(1.1);
    color: #0a71ac;
}

.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: #555555;
}    

.weather-extra-temps i {
    margin-right: 3px;
    color: #555555;
}

.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: #0a71ac;
}

.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: #555555;
    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: #555555;
}

/* 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: #0a71ac;
    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: #0a71ac;
    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: #0a71ac;
    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: #0a71ac;
    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);
  max-width: 20vw;
  max-height: 80vh;
  font-family: Montserrat;
  padding: 0.5rem;
  overflow-y: auto;       /* scroll vertical */
  overflow-x: hidden;     /* evita desbordes horizontales */
  box-sizing: border-box; /* incluye padding en cálculos */
}

.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: #0a71ac;
  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: #0a71ac;
    justify-content: center;
}

.legend-placeholder {
    font-size: 15px;
    padding: 0 10px 5px 10px;
    color: #555555;
    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: #0a71ac;
  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: #555555;
}

.info-text-km {
    font-size: 18px;
    display: flex;
    align-items: left;
    gap: 4px;
    font-weight: bolder;
    color: #555555;
    justify-content: center;
}

.info-text-hour {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bolder;
    color: #555555;
}

.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: #0a71ac;
}

.blue-flag-img {
    max-width: 70%;
    height: auto;
    margin-right: 8px;
}

/* Estilos para Popup */
.leaflet-popup-content .custom-popup {
    background-color: #0a71ac; 
    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: #0a71ac; /* flechita del popup */
}

.popup-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
}

.note-item {
  display: flex;
  align-items: center;   /* Ícono alineado con el texto en desktop */
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #333;
}

.note-icon {
  height: 2rem;
  width: auto;
  margin-right: 0.75rem; /* espacio entre ícono y texto */
}

.alert-horario {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  text-align: center;
  box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
  animation: pulseAlert 2s infinite;
}

.alert-horario i {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
  animation: moonFloat 3s ease-in-out infinite;
}

.alert-horario strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.alert-horario p {
  margin: 0;
  font-size: 14px;
  opacity: 0.95;
}

@keyframes pulseAlert {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
  }
  50% { 
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
  }
}

@keyframes moonFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

/* 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 #0a71ac;
    }

    .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 {
        font-size: .7rem;
        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: 90vw;
        margin: 0;
        padding: 0.5rem;
        gap: 0;
        max-width: 40vw;
        max-height: 70vh;
        overflow-y: auto; 
        overflow-x: hidden;
        left: 5vw;
    }

    .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: 50px;
        border-radius: 4px;
    }

    .leaflet-control .image-beach {
        padding-bottom: 5px;
        height: 50px;
        border-radius: 4px;
    }

    .leaflet-control .mini-btn {
        position: absolute;
        bottom: 5px;
        left: 5px;
        padding: 3px;
        font-size: 8px;
    }

    .leaflet-control .beach-title {
        font-size: 13px;
        padding: 2px;
    }

    .beach-info-grid-4 {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .info-box {
        padding: 2px 0;
        margin: 0;
        border-radius: 4px;
    }
    
    .info-label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .info-icon {
        width: 18px;
        height: 18px;
    }

    .info-icon-text {
        padding: 0 4px 0 4px;
    }

    .info-text-km {
        font-size: 10px;
        font-weight: 500;
    }

    .info-text-hour {
        font-size: 10px;
        font-weight: 500;
    }

    .blue-flag {
        text-align: center;
        padding: 0;
        margin-top: 5px;
        margin-bottom: 5px;
        font-size: 10px;
    }

    .beach-extra-note {
        font-size: 8px;
        padding: 2px 4px;
    }

    /* 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: #0a71ac;
        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: #0a71ac;
        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: #0a71ac;
        transition: color 0.2s;
    }

    .playa-item:hover .paw-icon {
        color: white;
    }

    .playa-item-text{
        color: #8A9A5B;
    }

    .note-item {
    flex-direction: column;   /* apila ícono arriba y texto abajo */
    align-items: flex-start;  /* alinea a la izquierda el texto */
    text-align: left;         /* asegura alineación de texto */
    margin-bottom: 1rem;
    margin-bottom: 0.5rem;
    font-size: 9px;
    }

    .note-icon {
        height: 1.2rem;           /* ícono un poco más pequeño */
        margin-right: 0;          /* quita el espacio derecho */
        margin-bottom: 0.15rem;    /* agrega espacio debajo del ícono */
    }

    .note-item span {
    word-wrap: break-word;   /* compatibilidad vieja */
    overflow-wrap: break-word; /* estándar */
    white-space: normal;     /* evita que el texto intente ir en una sola línea */
    }

    .btn.btn-light{
        font-size: .7rem;
    }
}

/* ===== Popup de Guardavidas ===== */
.guardavidas-popup-wrapper .leaflet-popup-content-wrapper {
  background: linear-gradient(135deg, #0a71ac 0%, #065a8a 100%);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(10, 113, 172, 0.45);
  border: none;
  padding: 0;
}

.guardavidas-popup-wrapper .leaflet-popup-tip {
  background: #065a8a;
}

.guardavidas-popup-wrapper .leaflet-popup-content {
  margin: 0;
  color: white;
  font-family: Montserrat, sans-serif;
}

.guardavidas-popup {
  padding: 12px 16px;
  text-align: center;
  min-width: 160px;
}

.guardavidas-popup-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.guardavidas-popup-title i {
  font-size: 15px;
  opacity: 0.9;
}

.guardavidas-popup-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.guardavidas-popup-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guardavidas-popup-count {
  font-size: 38px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .guardavidas-popup {
    padding: 8px 12px;
    min-width: 130px;
  }

  .guardavidas-popup-title {
    font-size: 11px;
  }

  .guardavidas-popup-count {
    font-size: 30px;
  }
}
