:root {
  /* Color palette - Modern blues */
  --blue-50: #F0F7FF;
  --blue-100: #E6F0FF;
  --blue-200: #BAD6FF;
  --blue-300: #8BB9FF;
  --blue-400: #4B96FF;
  --blue-500: #125F9A;
  --blue-600: #1b84d4;
  
  /* Refined whites */
  --white-pure: #FFFFFF;
  --white-soft: #F8FAFC;
  --white-muted: #F1F5F9;
  
  /* Modern shadows */
  --shadow-soft: 0 4px 15px rgba(148, 163, 184, 0.05);
  --shadow-medium: 0 8px 30px rgba(96, 102, 110, 0.034);
  
  /* Card dimensions */
  --card-width: 350px;
  --card-height: 320px;
  --image-height: 200px;
  
  /* Sizing */
  --button-size: 3.75rem;
  --spacing-base: 0.5rem;
}

/* Animaciones personalizadas */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Carrusel */
.carousel-section {
  margin: 0;
  padding: 0;
}

.lg-outer {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--shadow-medium), var(--shadow-medium)); /* Gradiente moderno */
  box-shadow: var(--shadow-medium);
  border-radius: 10px; /* Bordes redondeados */
}

.lg-inner {
  position: relative;
  width: 100%;
  height: 600px;
  white-space: nowrap;
  font-size: 0;
}

/* Elementos del carrusel */
.lg-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: inline-block;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease; /* Suavidad en transiciones */
}

.lg-item.lg-current {
  opacity: 1;
  z-index: 1;
  animation: fadeIn 0.8s ease; /* Animación al aparecer */
}

/* Imágenes del carrusel */
.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75; /* Opacidad ajustada */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lg-item:hover .carousel-img {
  opacity: 0.9;
  transform: scale(1.02); /* Zoom sutil al hover */
}

/* Título centrado */
.carousel-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  width: 80%;
  animation: slideUp 0.8s ease; /* Animación al cargar */
}

.carousel-title {
  font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
  font-size: 2.8rem; /* Ligeramente más grande */
  font-weight: 700;
  color: var(--white-pure);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  margin: 0;
  padding: 15px 25px;
  background: linear-gradient(90deg, rgba(75, 150, 255, 0.8), rgba(27, 132, 212, 0.8)); /* Gradiente dinámico */
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease;
}

.carousel-caption:hover .carousel-title {
  transform: scale(1.05); /* Efecto al pasar el mouse */
}

/* Controles modernos */
.lg-actions {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  z-index: 2;
  padding: 0 30px;
}

.lg-prev, .lg-next {
  background: var(--blue-400); /* Color azul moderno */
  border: none;
  color: var(--white-pure);
  font-size: 32px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-medium);
}

.lg-prev:hover, .lg-next:hover {
  background: var(--blue-600);
  transform: scale(1.15) rotate(5deg); /* Rotación sutil al hover */
  animation: pulse 0.5s infinite; /* Pulso continuo */
}

.lg-prev span, .lg-next span {
  line-height: 1;
}

/* Animaciones del carrusel */
.lg-slide-skew .lg-item.lg-next-slide {
  transform: skewX(8deg) translateX(20px);
  opacity: 0.8;
}

.lg-slide-scale .lg-item.lg-prev-slide {
  transform: scale(0.95) translateX(-20px);
  opacity: 0.7;
}

.lg-slide-rotate .lg-item.lg-next-slide {
  transform: rotate(3deg) translateX(20px);
  opacity: 0.8;
}

/* Sección de eventos */
.eventos-proximos {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(to bottom, var(--white-soft), var(--white-muted)); /* Gradiente suave */
  border-bottom: 1px solid var(--blue-50);
}

.titulo-eventos {
  font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--blue-500);
  text-shadow: 1px 1px 3px rgba(18, 95, 154, 0.2);
  animation: slideUp 1s ease; /* Animación al cargar */
}

/* Cards de eventos */
.event-card {
  text-decoration: none;
  display: block;
  color: inherit;
}

.card { /* Cambié .cards a .card para coincidir con tu HTML */
  width: var(--card-width);
  max-width: 350px;
  margin: 0 auto 20px;
  border-radius: 16px; /* Más redondeado */
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
  box-shadow: var(--shadow-soft);
  background: var(--white-pure);
  border: 1px solid var(--blue-50);
}

.card:hover {
  transform: translateY(-8px); /* Elevación más pronunciada */
  box-shadow: var(--shadow-medium);
  border-color: var(--blue-200);
}

.card-img {
  width: 100%;
  height: var(--image-height);
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.card:hover .card-img {
  transform: scale(1.08); /* Zoom más notable */
}

.card-body { /* Ajustado a tu HTML */
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title { /* Ajustado a tu HTML */
  font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--blue-500);
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.card:hover .card-title {
  color: var(--blue-600);
}

.card-date { /* Ajustado a tu HTML */
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  :root {
    --card-width: 100%;
    --card-height: auto;
    --image-height: 180px;
  }
  .card {
    max-width: 100%;
    margin: 0 auto 15px;
  }
  .lg-inner {
    height: 350px; /* Altura reducida para móviles */
  }
  .carousel-title {
    font-size: 1.8rem; /* Título más pequeño */
    padding: 10px 15px;
  }
  .lg-prev, .lg-next {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}