﻿/* =========================
   NOTICIAS / EVENTOS (compartido)
========================= */

/* =========================
   HERO
========================= */
.news-hero{
  position: relative;
  padding: 168px 0 84px;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.news-hero-inner{
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0;
}

.news-hero-title{
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: #fff;
}

.news-hero-title--accent{
  color: var(--orange);
}

.news-hero-subtitle{
  margin: 0;
  max-width: 480px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,.62);
}

.news-hero-underline{
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--orange);
}

.news-hero-inner .news-tabs{
  margin-top: 24px;
}

.news-hero-inner .news-tab{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: #fff;
}

.news-hero-inner .news-tab:hover{
  border-color: rgba(255,255,255,.4);
}

/* Contenedor propio de Noticias/Eventos: mismo margen lateral (80px) que el
   diseño de referencia; el .container genérico (92% + 28px) queda más
   angosto en desktop amplio. Solo afecta a estas páginas. */
.news-section .container{
  width: calc(100% - 160px);
  max-width: 1600px;
  padding: 0;
}

/* El hero alinea su texto (columna de 620px, pegada a la izquierda) con el
   mismo margen lateral que la sección. */
.news-hero .news-hero-inner{
  width: auto;
  margin: 0 0 0 80px;
  padding: 0;
}

@media (max-width: 1200px){
  .news-section .container{
    width: 100%;
    max-width: none;
    padding: 0 20px;
  }

  .news-hero .news-hero-inner{
    margin-left: 0;
    padding: 0 20px;
  }
}

/* =========================
   SECCIÃ“N
========================= */
.news-section{
  padding: 60px 0;
  background: #F8FAFC;
}

/* =========================
   ENCABEZADOS DE SECCIÓN
========================= */
.news-section-head{
  margin-bottom: 26px;
}

.news-section-head--sub{
  margin-top: 48px;
}

.news-section-title{
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: clamp(28px, 2.4vw, 40px);
  font-weight: 700;
  color: var(--navy);
}

.news-section-title i{
  color: var(--orange);
  font-size: clamp(26px, 2.6vw, 34px);
}

.news-section-subtitle{
  margin: 0 0 4px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  color: var(--navy);
}

.news-more-btn{
  display: block;
  margin: 18px auto 0;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(16,30,62,.14);
  background: #fff;
  color: var(--text);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.news-more-btn:hover{
  border-color: rgba(16,30,62,.3);
  background: rgba(16,30,62,.03);
}

.news-more-btn[hidden]{
  display: none;
}

/* =========================
   TABS (navegación del hero)
========================= */
.news-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.news-tab{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(16,30,62,.14);
  background: #fff;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.news-tab i{
  font-size: 12.5px;
}

.news-tab:hover{
  border-color: rgba(16,30,62,.3);
}

/* =========================
   GRID / CARDS
========================= */
.news-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 24px;
}

.news-grid-compact{
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 26px;
}

/* =========================
   NOTICIA DESTACADA (1 item)
========================= */
.news-featured{
  display: flex;
  gap: 8px;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #E7EAF0;
  box-shadow: 0 1px 2px rgba(16,30,62,.04), 0 10px 24px -18px rgba(16,30,62,.25);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.news-featured:hover{
  transform: translateY(-3px);
  border-color: #d7deec;
  box-shadow: 0 1px 2px rgba(16,30,62,.05), 0 18px 30px -18px rgba(16,30,62,.28);
}

.news-featured-media{
  position: relative;
  flex: 0 0 49%;
  min-height: 345px;
  border-radius: 16px;
  background: #EEF1F6;
  overflow: hidden;
}

.news-featured-media img{
  /* Absoluta: la altura de la tarjeta la marca el texto (mín. 345px), no la
     proporción de la imagen (p. ej. banners casi cuadrados). */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  color: transparent;
  font-size: 0;
}

.news-featured-media.is-empty{
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-featured-media .news-card-media-fallback{
  display: none;
  font-size: 32px;
  color: rgba(16,30,62,.22);
}

.news-featured-media.is-empty .news-card-media-fallback{
  display: block;
}

.news-featured-content{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  min-width: 0;
  padding: 16px 32px 16px 40px;
}

.news-featured-content h3{
  margin: 14px 0 12px;
  max-width: 560px;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

.news-featured-content .news-card-date{
  font-size: 17px;
  gap: 8px;
}

.news-featured-content .news-card-date i{
  font-size: 16px;
}

.news-featured-content .news-card-desc{
  margin: 0 0 16px;
  font-size: clamp(16px, 1.2vw, 20px);
  line-height: 1.65;
  -webkit-line-clamp: 3;
}

.news-featured-content .news-card-link{
  margin-top: 4px;
  padding-top: 0;
  font-size: 22px;
  font-weight: 600;
  gap: 10px;
}

.news-featured-content .news-card-link i{
  font-size: 19px;
}

/* Badge inline (no superpuesto a la imagen): usado en la destacada y en
   las tarjetas de "Noticias anteriores". */
.news-card-badge.news-card-badge--inline{
  position: static;
  margin-bottom: 12px;
  padding: 6px 20px;
  font-size: 15px;
  font-weight: 600;
  background: #2B4FA8;
}

/* ---- Próximos eventos: destacado (izquierda) + lista compacta (derecha) ---- */
.news-proximos-split{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.news-proximos-split.is-single{
  grid-template-columns: minmax(0, 460px);
}

.news-proximos-list{
  align-self: stretch;
}

/* ---- Lista compacta (eventos/noticias pasados) ---- */
.news-list-compact{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.news-list-item{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid #E7EAF0;
  text-decoration: none;
  transition: background .2s ease;
}

.news-list-compact .news-list-item:last-child{
  border-bottom: none;
}

.news-list-item:hover{
  background: rgba(16,30,62,.025);
}

.news-list-item-icon{
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
}

.news-list-item-icon.is-noticia{ background: var(--blue); }
.news-list-item-icon.is-evento{ background: var(--green); }

.news-list-item-body{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.news-list-item-type{
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.news-list-item-type.is-noticia{ color: var(--blue); }
.news-list-item-type.is-evento{ color: var(--green); }

.news-list-item-body h4{
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-list-item-desc{
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list-item-date{
  font-size: 12px;
  color: var(--muted);
}

.news-list-item-arrow{
  flex: none;
  font-size: 12px;
  color: rgba(16,30,62,.3);
  transition: transform .2s ease;
}

.news-list-item:hover .news-list-item-arrow{
  transform: translateX(3px);
  color: var(--orange);
}

.news-card{
  position: relative;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #E7EAF0;
  box-shadow: 0 1px 2px rgba(16,30,62,.04), 0 10px 24px -18px rgba(16,30,62,.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.news-card:hover{
  transform: translateY(-3px);
  border-color: #d7deec;
  box-shadow: 0 1px 2px rgba(16,30,62,.05), 0 18px 30px -18px rgba(16,30,62,.28);
}

.news-card-media{
  position: relative;
  aspect-ratio: 16 / 9;
  background: #EEF1F6;
  overflow: hidden;
}

.news-card-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Si la imagen no carga, oculta el alt-text (que por defecto hereda el
     estilo de link subrayado del <a class="news-card"> que lo envuelve) en
     vez de dejarlo desbordar la tarjeta. */
  color: transparent;
  font-size: 0;
  text-decoration: none;
}

/* Sin imagen (o la imagen no cargÃ³): Ã­cono de respaldo centrado en vez de
   dejar que el navegador muestre el alt-text roto, que se desborda de la
   tarjeta y rompe el layout. El Ã­cono siempre estÃ¡ en el DOM pero solo se
   muestra cuando la tarjeta lleva la clase .is-empty (sin mediaUrl, o el
   <img> disparÃ³ onerror). */
.news-card-media-fallback{
  display: none;
  font-size: 28px;
  color: rgba(16,30,62,.22);
}

.news-card-media.is-empty{
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-media.is-empty .news-card-media-fallback{
  display: block;
}

.news-card-badge{
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}

.news-card-badge.is-noticia{ background: var(--blue); }
.news-card-badge.is-evento{ background: var(--green); }
.news-card-badge.is-video{ background: var(--orange); }

.news-card-play{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-play i{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.9);
  color: var(--navy);
  font-size: 16px;
}

.news-card-content{
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.news-card-date{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.news-card-date i{
  font-size: 10.5px;
  color: rgba(16,30,62,.4);
}

.news-card-content h3{
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-desc{
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Botón "Ver más/menos": oculto por defecto, solo aparece en mobile (ver
   media query al final del archivo) para no cambiar el comportamiento en
   desktop, donde las cards ya tienen espacio de sobra. */
.news-desc-toggle{
  display: none;
  margin: -10px 0 12px;
  padding: 0;
  border: none;
  background: none;
  color: var(--orange);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.news-desc-toggle:hover{
  text-decoration: underline;
}

.news-card-link{
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  color: var(--orange);
  transition: gap .2s ease;
}

.news-card-link i{
  font-size: 11px;
  transition: transform .2s ease;
}

.news-card-link:hover i{
  transform: translateX(3px);
}

/* Eventos: badge verde superpuesto a la imagen (destacada y tarjetas) */
.news-featured-media .news-card-badge.is-evento{
  left: 16px;
  top: 16px;
  padding: 7px 18px;
  font-size: 15px;
  font-weight: 600;
}

.news-card--row .news-card-media .news-card-badge.is-evento{
  left: 10px;
  top: 10px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(70,80,95,.72);
}

.news-grid--after{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

@media (max-width: 768px){
  .news-grid--after{
    grid-template-columns: 1fr;
  }
}

/* Tarjeta horizontal ("Noticias anteriores"): miniatura izquierda + texto */
.news-card--row{
  flex-direction: row;
  align-items: center;
  gap: 24px;
  padding: 20px;
  border-radius: 20px;
}

.news-card--row .news-card-media{
  flex: 0 0 40%;
  aspect-ratio: auto;
  height: 168px;
  border-radius: 14px;
}

.news-card--row .news-card-content{
  padding: 0;
  min-width: 0;
  justify-content: center;
}

.news-card--row .news-card-date{
  font-size: 16px;
  gap: 8px;
  margin-bottom: 8px;
}

.news-card--row .news-card-date i{
  font-size: 15px;
}

.news-card--row .news-card-content h3{
  font-size: clamp(18px, 1.4vw, 23px);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.news-card--row .news-card-badge--inline{
  align-self: flex-start;
  margin-bottom: 8px;
}

.news-card--row .news-card-link{
  align-self: flex-start;
  padding-top: 0;
  margin-top: 0;
  font-size: 19px;
  font-weight: 600;
  gap: 8px;
}

.news-card--row .news-card-link i{
  font-size: 17px;
}

/* Mensaje */
.news-msg{
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   RESPONSIVE
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (max-width: 768px){
  .news-hero{
    padding: 140px 0 46px;
  }

  .news-grid,
  .news-grid-compact{
    grid-template-columns: 1fr;
  }

  .news-featured{
    flex-direction: column;
    padding: 14px;
  }

  .news-card--row{
    padding: 14px;
    gap: 16px;
  }

  .news-card--row .news-card-media{
    flex-basis: 38%;
    height: 120px;
  }

  .news-featured-media{
    flex: none;
    min-height: 220px;
  }

  .news-featured-content{
    padding: 20px 8px 10px;
  }

  .news-proximos-split,
  .news-proximos-split.is-single{
    grid-template-columns: 1fr;
  }

  /* Textos largos: en mobile se comprimen (clamp ya definido arriba) pero
     con un botón para expandirlos sin salir de la lista; en desktop hay
     espacio de sobra así que se deja el comportamiento de siempre. */
  .news-desc-toggle{
    display: inline-block;
  }

  .news-list-item-desc.is-expanded,
  .news-card-desc.is-expanded{
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
}

@media (max-width: 480px){
  .news-card--row{
    flex-direction: column;
    align-items: stretch;
  }

  .news-card--row .news-card-media{
    flex: none;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .news-tabs{
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .news-tab{
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* =========================
   RESPONSIVE (Noticias / Eventos)
========================= */

/* Laptop / tablet horizontal: las tarjetas van de 2 por fila y el texto se
   apretaba; se reduce la miniatura y los espacios. */
@media (min-width: 769px) and (max-width: 1200px){
  .news-grid-compact{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .news-featured-media{
    flex-basis: 46%;
  }

  .news-featured-content{
    padding: 12px 16px 12px 28px;
  }

  .news-card--row{
    gap: 18px;
    padding: 16px;
  }

  .news-card--row .news-card-media{
    flex-basis: 36%;
    height: 150px;
  }
}

/* Tablet vertical / móvil grande */
@media (max-width: 768px){
  .news-section{
    padding: 40px 0 48px;
  }

  .news-section-head{
    margin-bottom: 18px;
  }

  .news-section-head--sub{
    margin-top: 36px;
  }

  .news-section-title{
    gap: 12px;
    font-size: 26px;
  }

  .news-section-title i{
    font-size: 24px;
  }

  .news-section-subtitle{
    font-size: 20px;
  }

  .news-grid,
  .news-grid-compact,
  .news-grid--after{
    gap: 16px;
  }

  .news-grid--after{
    margin-top: 16px;
  }

  .news-featured{
    border-radius: 18px;
  }

  .news-featured-media{
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }

  .news-featured-content h3{
    max-width: none;
    margin: 10px 0 8px;
    font-size: 22px;
  }

  .news-featured-content .news-card-date{
    font-size: 15px;
  }

  .news-featured-content .news-card-date i{
    font-size: 14px;
  }

  .news-featured-content .news-card-desc{
    font-size: 15.5px;
    line-height: 1.6;
  }

  .news-featured-content .news-card-link{
    font-size: 18px;
  }

  .news-featured-content .news-card-link i{
    font-size: 16px;
  }

  .news-card-badge.news-card-badge--inline{
    padding: 5px 14px;
    font-size: 13px;
    margin-bottom: 8px;
  }

  .news-featured-media .news-card-badge.is-evento{
    left: 12px;
    top: 12px;
    padding: 5px 14px;
    font-size: 13px;
  }

  .news-card--row .news-card-date{
    font-size: 14px;
  }

  .news-card--row .news-card-date i{
    font-size: 13px;
  }

  .news-card--row .news-card-content h3{
    font-size: 18px;
  }

  .news-card--row .news-card-link{
    font-size: 16px;
  }

  .news-card--row .news-card-link i{
    font-size: 14px;
  }

  .news-more-btn{
    margin-top: 22px;
  }
}

/* Móvil */
@media (max-width: 480px){
  .news-hero{
    padding: 120px 0 40px;
  }

  .news-featured{
    padding: 12px;
  }

  .news-featured-content{
    padding: 16px 6px 8px;
  }

  .news-card--row{
    padding: 12px;
    gap: 12px;
  }

  .news-card--row .news-card-content{
    padding: 0 6px 4px;
  }

  .news-card--row .news-card-media{
    border-radius: 12px;
  }
}
