/* Próximo evento: composición responsive compartida por Inicio y Nosotros. */
.upcoming-event {
  /* Tarjeta centrada al 55% en pantallas amplias. */
  /* height: 300px; */
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  padding: .75rem;
  align-items: stretch;
  margin-top: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border: 1px solid #00aeef;
  border-radius: 1.8rem;
  background: #fff;
  color: #092653;
  box-shadow: 0 1rem 2.5rem #001d4e33;
  scroll-margin-top: 7rem;
}
.upcoming-event__content {
  padding: clamp(1.2rem, 2.5vw, 2.5rem);
  min-width: 0;
  align-self: center;
  background: #fff;
}
.upcoming-event__badge {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 3rem;
  background: #00a9f4;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}
.upcoming-event svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}
.upcoming-event h3 {
  margin-top: 1.4rem;
  font-size: clamp(1.5rem, 2.3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.upcoming-event h3 span {
  display: block;
  color: #00a9f4;
}
.upcoming-event__date {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid #d5dfeb;
  color: #42617e;
}
.upcoming-event__date svg {
  color: #00a9f4;
  width: 2rem;
  height: 2rem;
}
.upcoming-event__description {
  margin-block: 1.2rem 1.5rem;
  color: #485773;
  line-height: 1.5;
}
.upcoming-event__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: fit-content;
  padding: 0.95rem 1.5rem;
  border-radius: 3rem;
  background: #00a9f4;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none;
}
.upcoming-event__details summary::-webkit-details-marker {
  display: none;
}
.upcoming-event__details summary span {
  font-size: 1.7rem;
  line-height: 1;
}
.upcoming-event__details summary:hover {
  background: #008ddd;
}
.upcoming-event__information {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.upcoming-event__information a {
  display: inline-block;
  margin-top: 0.65rem;
  color: #007ac2;
  text-decoration: underline;
}
.upcoming-event :is(summary, a):focus-visible {
  outline: 3px solid #00438e;
  outline-offset: 3px;
}
/* El contenedor recorta las cuatro esquinas y evita que el tamaño original estire la tarjeta. */
.upcoming-event__visual {
  position: relative;
  min-width: 0;
  min-height: 25rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #f1e6d9;
}
.upcoming-event__visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 65% center;
  /* Oculta el margen transparente e irregular de la imagen proporcionada. */
  transform: scale(1.075);
}
@media (max-width: 48rem) {
  .upcoming-event { grid-template-columns: 1fr; padding: .65rem; border-radius: 1.4rem; }
  .upcoming-event__content { padding: 1.2rem .8rem 1.5rem; }
  .upcoming-event__visual { min-height: 0; aspect-ratio: 4 / 3; border-radius: 1rem; }
  .upcoming-event__details summary { max-width: 100%; }
}

/* Recuperar el ancho disponible antes de que las dos columnas se compriman. */
@media (max-width: 75rem) { .upcoming-event { width: 100%; } }

@media (min-width: 75.001rem) {
  .upcoming-event__content { padding: 1rem; }
  .upcoming-event h3 { font-size: 1.4rem; }
  .upcoming-event__badge { font-size: .75rem; gap: .4rem; padding: .5rem .65rem; }
  .upcoming-event__description, .upcoming-event__date { font-size: .85rem; }
  .upcoming-event__date { gap: .5rem; }
  .upcoming-event__details summary { font-size: .9rem; padding: .75rem 1rem; gap: 1rem; }
  .upcoming-event__visual { min-height: 20rem; }
}
