/* Banner del calendario */
.banner-calendario {
  background-image: url("../../img/web/banner-calendario.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  width: 100%;
  height: 40vh;
  min-height: 300px;
  position: relative;
}

.dark-container {
  background-color: rgba(51, 51, 51, 0.75);
  padding: 30px 40px;
  border-radius: 15px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dark-container h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dark-container p {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

/* Header del calendario */
.calendar-header {
  margin-bottom: 2rem;
}

.calendar-title {
  font-family: 'EB Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #173f78;
  margin-bottom: 0.5rem;
}

.calendar-subtitle {
  font-size: 1rem;
  color: #6c757d;
  margin: 0;
}

/* Wrapper del calendario */
.calendar-wrapper {
  background: #ffffff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* FullCalendar personalización */
#calendar {
  font-family: var(--bs-font-sans-serif);
}

/* Toolbar (header del calendario) */
.fc .fc-toolbar {
  padding: 15px 10px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #173f78 0%, #0d2d5a 100%);
  border-radius: 10px;
  color: white;
}

.fc .fc-toolbar-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: white !important;
}

.fc .fc-button {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.fc .fc-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fc .fc-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
  background-color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.6);
}

.fc .fc-button-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Encabezados de días */
.fc .fc-col-header-cell {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  padding: 12px 8px;
  border-color: #dee2e6;
}

.fc .fc-col-header-cell-cushion {
  padding: 8px 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* Celdas de días */
.fc .fc-daygrid-day {
  transition: background-color 0.2s ease;
}

.fc .fc-daygrid-day:hover {
  background-color: #f8f9fa;
}

.fc .fc-daygrid-day-number {
  padding: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
}

.fc .fc-day-today {
  background-color: rgba(23, 63, 120, 0.05) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background: #173f78;
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Eventos */
.fc-event {
  cursor: pointer !important;
  border: none !important;
  border-radius: 5px !important;
  padding: 4px 8px !important;
  margin: 2px 0 !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.2s ease !important;
}

.fc-event:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.fc-event-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-event-time {
  font-size: 0.75rem;
  font-weight: 400;
}

/* Vista de lista */
.fc .fc-list-event:hover td {
  background-color: #f8f9fa;
}

.fc .fc-list-event-title {
  color: #173f78;
  font-weight: 500;
}

.fc .fc-list-day-cushion {
  background-color: #173f78;
  color: white;
}

/* Más eventos (popover) */
.fc .fc-more-popover {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.fc .fc-more-popover .fc-popover-header {
  background: #173f78;
  color: white;
}

/* Modal de evento personalizado */
.evento-modal .modal-content {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.evento-modal .modal-header {
  padding: 20px 25px;
  border-bottom: none;
}

.evento-modal .modal-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.evento-modal .modal-body {
  padding: 25px;
}

.evento-detalle {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.detalle-item {
  border-left: 4px solid #173f78;
  padding-left: 15px;
}

.detalle-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.detalle-texto {
  font-size: 0.95rem;
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}

.fecha-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

.fecha-item {
  padding: 10px 0;
  border-bottom: 1px solid #dee2e6;
}

.fecha-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Responsive */
@media (max-width: 992px) {
  .calendar-wrapper {
    padding: 20px 15px;
  }

  .fc .fc-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }

  .fc .fc-toolbar-title {
    font-size: 1.3rem;
  }

  .fc .fc-button {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .banner-calendario {
    height: 30vh;
    min-height: 250px;
  }

  .dark-container {
    padding: 20px 25px;
  }

  .dark-container h3 {
    font-size: 1.8rem;
  }

  .dark-container p {
    font-size: 0.95rem;
  }

  .calendar-title {
    font-size: 1.8rem;
  }

  .calendar-wrapper {
    padding: 15px 10px;
  }

  .fc .fc-toolbar-title {
    font-size: 1.1rem;
  }

  .fc .fc-button {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .fc-event {
    font-size: 0.75rem !important;
    padding: 3px 6px !important;
  }

  .evento-modal .modal-title {
    font-size: 1.2rem;
  }

  .evento-modal .modal-body {
    padding: 20px 15px;
  }

  .detalle-label {
    font-size: 0.85rem;
  }

  .detalle-texto {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .banner-calendario {
    height: 25vh;
    min-height: 200px;
  }

  .dark-container {
    padding: 15px 20px;
  }

  .dark-container h3 {
    font-size: 1.5rem;
  }

  .dark-container p {
    font-size: 0.85rem;
  }

  .calendar-title {
    font-size: 1.5rem;
  }

  .calendar-wrapper {
    padding: 10px 5px;
  }

  .fc .fc-toolbar {
    padding: 10px 5px;
  }

  .fc .fc-button {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .fc-event {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar-wrapper {
  animation: fadeIn 0.5s ease;
}

/* Estilos globales */
h3, h1, h2, p, h6, a {
  font-family: var(--font-primary) !important;
}

/* Scrollbar personalizado para el modal */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}