
.calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.weekdays, .calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.weekday {
    text-align: center;
    padding: 7px;
    font-weight: bold;
    background-color: #f8f9fa;
}

.day {
width: 14%;
height: auto;
display: inline-block;
text-align: center;
border: 0px solid #ddd;
margin: 0px;
cursor: pointer;
padding: 10px;
}

.day:hover {
    background-color: #f0f0f0;
}

.day img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.day.empty {
    background-color: #f9f9f9;
    cursor: default;
}

.event-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    margin-top: 50%;
    background: rgba(255, 234, 1, 0.89);
    color: black;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.8);
z-index: 1050; /* Asegura que esté por encima del header */
overflow-y: auto;
padding: 20px 0; /* Espacio vertical */
}

.modal-content {
background-color: #fff;
margin: 2% auto; /* Reducido para mejor visualización */
padding: 25px;
width: 90%; /* Más adaptable */
max-width: 800px;
max-height: 88vh; /* Mejor proporción */
overflow-y: auto;
border-radius: 8px;
position: relative;
box-shadow: 0 5px 25px rgba(0,0,0,0.3);
animation: modalFadeIn 0.3s ease-out;
}

.calendar-modal {
  background-color: #fefefe;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 900px;
  height: auto;               /* ← importante */
  max-height: 90vh;           /* ← limita a la altura de pantalla */
  margin: 190px auto 40px auto;
  z-index: 1055;
  position: relative;
  overflow: visible;          /* ← dejar que el scroll del contenido se maneje internamente */
}


.calendar-event-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 5px;
}

.calendar-event-name {
    font-size: 10px;
    font-weight: bold;
    color: #333;
    margin: 5px 0 0;
    padding: 0 4px;
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 768px) {
    .calendar-event-name {
        font-size: 15px;
    }
}


@media (max-width: 768px) {
    .calendar-modal {
        margin: 100px auto 15% auto !important;
    }
}

.calendar-scroll {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}

/* Para escritorio */
@media (min-width: 769px) {
  .calendar-scroll {
    max-height: 325px !important;
  }
}

/* Para móviles */
@media (max-width: 768px) {
  .calendar-scroll {
    height: 400px;
  }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.close:hover {
    color: black;
}

.descuento-2 {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    color: #333;
}

#month-select,
#year-select {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  width: 180px;
  font-size: 14px !important;
  background: #0a1626;
  color: #a5d159;
  text-align: center;
}

.calendar-image {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.scroll-container {
    max-height: 65vh;
    overflow-y: auto;
    padding-top: 10px;
}

.numero {
    font-weight: bold;
    color: #333;
}

.text-num {
    font-weight: normal;
}

@media (max-width: 768px) {
    .weekdays {
        font-size: 0.8rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

.day {
    aspect-ratio: 1;
    border: 1px solid #ddd;
    position: relative;
    cursor: pointer;
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    transition: all 0.3s ease;
    overflow: hidden;
  }

  .day.has-events {
    background-color: #e3f2fd; /* Fondo azul claro */
    cursor: pointer;
  }

  .day.has-events:hover {
    background-color: #bbdefb; /* Efecto hover */
  }

  .event-count {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255, 234, 1, 0.89);
    color: rgb(0, 0, 0);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: bold;
}


  .day-number-box {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 24px;
    height: 24px;
    background-color: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
  }

  @media (max-width: 768px) {
    .day-number-box {
        width: 18px;   /* Más pequeño en ancho */
        height: 18px;  /* Más pequeño en alto */
        font-size: 10px; /* Texto más pequeño */
    }
}

  .day-empty-space {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border: 1px solid #eee;
  }


  @media (max-width: 768px) {
    .weekdays {
        font-size: 0.8rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    /* Nuevo estilo para el select en móviles */
    select#month-select {
        background: #0a1626;
        color: #a5d159;
        text-align: center;
        width: 100% !important;
        font-size: 14px;
        margin-left: 50%;
        max-width: 100px;
    }

    /* Nuevo estilo para event-count SOLO en móviles */
    .event-count {
        position: absolute;
        top: 5px;
        right: 5px;
        background: rgba(255, 234, 1, 0.89);
        color: rgb(0, 0, 0);
        border-radius: 50%;
        width: 10px;
        height: 10px;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 30px;
    }
    .modal .calendar-scroll .calendar-event-day {
                    display: block !important;
                }

    .calendar-event-name {
        display: none;
    }

    .modal .calendar-event-name {
        display: block !important;
    }



}
