/* Estilos generales */
.agenda-page {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  color: #2d3748;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Contenedor principal */
.agenda {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2.5rem;
}

/* Título principal */
.agenda h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #1a365d;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.5px;
  width: 100%;
  text-align: center;
}

/* Secciones de eventos */
.eventos-proximos,
.eventos-anteriores {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.eventos-proximos {
  border-top: 4px solid #3182ce;
  background: linear-gradient(to bottom, #f8fafc, #f0f9ff);
}

.eventos-anteriores {
  border-top: 4px solid #718096;
}

/* Subtítulo */
.subtitulo {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a365d;
  text-transform: none;
  letter-spacing: 0.5px;
  margin: 0 0 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid #e2e8f0;
  width: 100%;
}

.eventos-proximos .subtitulo::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 0.75rem;
  color: #3182ce;
  font-size: 1.2em;
}

.eventos-anteriores .subtitulo::before {
  content: '\f1da';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 0.75rem;
  color: #718096;
  font-size: 1.2em;
}

/* Tarjeta de evento */
.evento {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: white;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-left: 3px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Estilo especial para eventos próximos */
.eventos-proximos .evento {
  border-left-color: #3182ce;
  background: linear-gradient(to right, #f8fafc, white);
  position: relative;
  overflow: hidden;
}

.eventos-proximos .evento::after {
  content: 'Próximo';
  position: absolute;
  top: 10px;
  right: -30px;
  background: #3182ce;
  color: white;
  padding: 2px 30px;
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(45deg);
  transform-origin: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

/* Estilo para eventos pasados */
.eventos-anteriores .evento {
  opacity: 0.9;
}

.eventos-anteriores .evento:hover {
  opacity: 1;
}

.evento:last-child {
  margin-bottom: 1rem;
}

.evento::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(to bottom, #4299e1, #9f7aea);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.evento:hover {
  transform: translateX(8px);
  border-left-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.evento:hover::before {
  opacity: 1;
}

.evento h2 {
  font-size: 1.25rem;
  color: #2d3748;
  margin: 0 0 0.5rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  position: relative;
  padding-left: 1.75rem;
}

.evento h2::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  color: #718096;
  font-size: 1em;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
}

/* Contenido del evento */
.contenido-evento {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

/* Estilos para la ubicación del evento */
.event-location {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: inline-flex;
  transition: all 0.2s ease;
}

.event-location:hover {
  background: #e2e8f0;
  transform: translateX(2px);
}

.event-location::before {
  content: '\f3c5';
  font-family: 'Font Awesome 6 Free';
  margin-right: 0.5rem;
  color: #718096;
  font-size: 0.9em;
}

/* Mensajes de carga y sin eventos */
.cargando,
.no-events,
.error {
  text-align: center;
  padding: 2.5rem 2rem;
  color: #64748b;
  font-style: italic;
  background: #f8fafc;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 2px dashed #e2e8f0;
  transition: all 0.3s ease;
}

.no-events {
  background: #f8fafc;
  color: #64748b;
  font-size: 1.05rem;
}

.no-events::before {
  content: '\f129';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  display: block;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
}

.error {
  color: #b91c1c;
  background: #fef2f2;
  border: 2px solid #fecaca;
  padding: 1.5rem;
}

.error::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  display: block;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #f87171;
}

.contenido-evento img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 1px solid #edf2f7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.contenido-evento img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contenido-evento > div {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0;
}

a {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  display: inline-block;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #3182ce;
  transition: width 0.3s ease;
}

a:hover {
  color: #3182ce;
  transform: none;
}

a:hover::after {
  width: 100%;
}

p {
  color: #718096;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

p::before {
  content: '\f017';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  color: #a0aec0;
  font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
  .agenda {
    padding: 1.25rem;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
  
  .eventos-proximos,
  .eventos-anteriores {
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
  }
  
  .contenido-evento {
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .contenido-evento img {
    width: 100%;
    max-width: 100%;
    height: 180px;
    margin: 0 0 0.5rem;
  }
  
  .evento {
    padding-left: 1.25rem;
    margin: 2rem 0;
  }
  
  .evento h2 {
    font-size: 1.15rem;
    padding-left: 1.5rem;
  }
  
  .subtitulo {
    font-size: 1rem;
    margin: 2.5rem 0 1.25rem;
  }
}

/* Efecto de carga suave para eventos */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(8px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.evento {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}

.evento:nth-child(1) { animation-delay: 0.1s; }
.evento:nth-child(2) { animation-delay: 0.2s; }
.evento:nth-child(3) { animation-delay: 0.3s; }
.evento:nth-child(4) { animation-delay: 0.4s; }
.evento:nth-child(5) { animation-delay: 0.5s; }

/* Mejoras de accesibilidad */
:focus-visible {
  outline: 2px solid #3182ce;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Mejora de contraste para accesibilidad */
a:focus {
  color: #2c5282;
  text-decoration: underline;
}