/* Estilos para eventos de la Alcaldesa */
.eventos-alcaldesa-container {
    max-width: 100%;
    margin: 20px auto;
}

.eventos-alcaldesa-navegacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.eventos-alcaldesa-mes-actual {
    text-align: center;
    margin: 0;
    font-size: 24px;
}

.eventos-alcaldesa-nav-button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

.eventos-alcaldesa-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.evento-alcaldesa-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.evento-alcaldesa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.evento-alcaldesa-fecha-container {
    background-color: #4a90e2;
    color: white;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.evento-alcaldesa-dia {
    font-size: 24px;
    font-weight: bold;
}

.evento-alcaldesa-mes {
    font-size: 14px;
    text-transform: uppercase;
}

.evento-alcaldesa-info-container {
    padding: 15px;
    flex: 1;
    display: flex;
}

.evento-alcaldesa-imagen {
    margin-right: 15px;
    flex-shrink: 0;
}

.evento-alcaldesa-imagen img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.evento-alcaldesa-detalles {
    flex: 1;
}

.evento-alcaldesa-titulo {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.evento-alcaldesa-hora, .evento-alcaldesa-lugar {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.evento-alcaldesa-dias-restantes {
    margin-top: 10px;
    font-weight: bold;
    color: #4a90e2;
}

.progreso-evento-alcaldesa {
    height: 4px;
    background-color: #eee;
    margin-top: 10px;
    border-radius: 2px;
    overflow: hidden;
}

.barra-progreso-alcaldesa {
    height: 100%;
    background-color: #4a90e2;
    transition: width 0.3s ease;
}

.progreso-evento-alcaldesa.finalizado .barra-progreso-alcaldesa {
    background-color: #ccc;
}

.evento-alcaldesa-recurrente .evento-alcaldesa-fecha-container {
    background-color: #8e44ad;
}

/* Estilos del Calendario Mensual */
.eventos-calendario-container {
    max-width: 100%;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

.eventos-calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.eventos-calendario-titulo {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0;
    flex-grow: 1;
}

.eventos-calendario-nav {
    display: flex;
    gap: 15px;
}

.eventos-calendario-nav-btn {
    padding: 8px 15px;
    background-color: transparent;
    color: #333;
    border: 1px solid #e0b039;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.eventos-calendario-nav-btn:hover {
    background-color: #f9f2dd;
}

.eventos-calendario-grid {
  width: 100%;
  border-collapse: separate; /* Cambiar de collapse a separate */
  border-spacing: 2px; /* Añadir espacio entre celdas */
  border: 1px solid #eaeaea;
  table-layout: fixed; /* Asegura que todas las columnas tengan el mismo ancho */
}

.eventos-calendario-grid th {
    background-color: #e0b039;
    color: #fff;
    font-weight: 500;
    text-align: center;
    padding: 10px;
    border: none;
}

.eventos-calendario-grid td {
   border: 1px solid #eaeaea;
   padding: 0;
   height: auto; /* Cambiar de altura fija a automática */
   width: 14.28%;
   vertical-align: top;
   position: relative;
}

.eventos-calendario-grid td.empty-day {
    background-color: #f9f9f9;
}
.eventos-calendario-grid tr {
    min-height: 200px; /* Altura mínima para las filas */
}
.dia-numero {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #999;
    z-index: 1;
    line-height: 1;
    background-color: #fff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dia-eventos-container {
  height: 100%;
  min-height: 150px; /* Altura mínima para las celdas */
  overflow-y: auto;
  padding-top: 30px;
  padding-bottom: 5px;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column; /* Esto hace que los eventos se apilen verticalmente */
}

.dia-eventos-container::-webkit-scrollbar {
    width: 6px;
}

.dia-eventos-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dia-eventos-container::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 3px;
}

.dia-evento {
  display: block; /* Cambiar de flex a block */
  margin: 5px;
  padding: 5px;
  background-color: #fff;
  border-left: 3px solid #e0b039;
  font-size: 12px;
  width: calc(100% - 10px); /* Ancho completo menos márgenes */
  box-sizing: border-box;
}

.dia-evento:hover {
    background-color: #f9f2dd;
}

.dia-evento-imagen {
    width: 30px;
    height: 30px;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
}

.dia-evento-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dia-evento-detalles {
  margin-top: 5px; /* Espacio entre imagen y detalles */
}

.dia-evento-titulo {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.modal-open {
    overflow: hidden; /* Prevenir scroll cuando el modal está abierto */
}
.dia-evento-hora {
    color: #777;
}

.dia-hoy {
    background-color: #fff9e6;
}

.dia-hoy .dia-numero {
    background-color: #e0b039;
    color: white;
}
/* Estilos para los tooltips y modal */
.tooltip-evento {
    visibility: hidden;
    width: 250px;
    background-color: white;
    color: #333;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    border: 1px solid #e0b039;
    pointer-events: none; /* Para que no interfiera con otros eventos */
}

.tooltip-evento::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #e0b039 transparent transparent transparent;
}

.dia-evento:hover .tooltip-evento {
    visibility: visible;
    opacity: 1;
}

/* Modal para eventos */
.evento-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.evento-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.evento-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    color: #888;
}

.evento-modal-titulo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-right: 20px;
}

.evento-modal-detalle {
    margin-bottom: 8px;
}

.evento-modal-detalle strong {
    color: #666;
}

.evento-modal-imagen {
    margin-bottom: 15px;
    text-align: center;
}

.evento-modal-imagen img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .eventos-alcaldesa-lista {
        grid-template-columns: 1fr;
    }

    .evento-alcaldesa-info-container {
        flex-direction: column;
    }

    .evento-alcaldesa-imagen {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .eventos-calendario-grid th,
    .eventos-calendario-grid td {
        padding: 5px;
    }

    .dia-numero {
        font-size: 14px;
        width: 24px;
        height: 24px;
    }

    .dia-evento {
      position: relative;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding: 5px 8px;
  }

    .dia-evento-imagen {
        width: 20px;
        height: 20px;
    }
    .dia-numero {
    font-size: 12px;
    width: 20px;
    height: 20px;
}

.dia-eventos-container {
    min-height: 100px;
    padding-top: 25px;
}
}

/* Estilos para el widget */
.aem-widget-eventos-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aem-widget-evento-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.aem-widget-evento-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.aem-widget-evento-fecha {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 3px;
}

.aem-widget-evento-titulo {
    display: block;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.aem-widget-evento-titulo:hover {
    color: #4a90e2;
}

.aem-widget-ver-todos {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #4a90e2;
    text-decoration: none;
}

.aem-widget-ver-todos:hover {
    text-decoration: underline;
}
