/* Sección principal */
.agenda-section {
  background: var(--background-light);
  padding: 60px 20px;
  text-align: center;
}

.agenda-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--text-dark);
  margin-bottom: 30px;
}

/* Controles del calendario */
.calendar-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.calendar-controls button {
  padding: 10px 20px;
  background-color: var(--button-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.calendar-controls button:hover {
  background-color: var(--button-hover);
}

#calendarTitle {
  font-size: 24px;
  color: var(--primary-color);
  font-family: 'Playfair Display', serif;
}

/* Días de la semana */
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  max-width: 800px;
  margin: 0 auto 10px;
  font-weight: bold;
  color: var(--secondary-color);
  font-size: 16px;
}

/* Calendario */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  max-width: 800px;
  margin: auto;
}

.day {
  padding: 18px;
  background: var(--primary-color);
  color: white;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
  text-align: center;
  position: relative;
}

.day:hover {
  background: var(--button-hover);
  transform: scale(1.05);
}

.day.empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* Días pasados o deshabilitados */
.day.disabled {
  background: #ccc;
  color: #666;
  pointer-events: none;
  cursor: not-allowed;
}

/* Días ocupados */
.day.occupied {
  background: #888;
  color: #fff;
}

.day.occupied::after {
  content: "⛔";
  position: absolute;
  top: 5px;
  right: 8px;
  font-size: 16px;
}

/* Modal de solicitud */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: #fff;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.4s ease;
  text-align: left;
}

.modal-content h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.modal-content p#selectedDate {
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-content input,
.modal-content textarea {
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
}

.modal-content button {
  background: var(--button-primary);
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-content button:hover {
  background: var(--button-hover);
}

/* Botón cerrar */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 26px;
  color: #888;
  cursor: pointer;
}

.close-btn:hover {
  color: #000;
}

/* Animación modal */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .calendar-grid,
  .calendar-days {
    grid-template-columns: repeat(3, 1fr);
  }

  .calendar-controls {
    flex-direction: column;
  }

  .calendar-controls button {
    width: 100%;
    margin-top: 10px;
  }

  .modal-content {
    padding: 20px;
  }

  .agenda-section h2 {
    font-size: 28px;
  }
}
