/* Ruta: public/css/noticias.css */

/* ── Fix lightbox ── */
#noticias-lightbox[hidden] {
  display: none !important; 
}

/* ── Lightbox noticias ── */
#noticias-lightbox .lightbox-wrapper {
  max-width: 950px;
  width: 100%;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
}

#noticias-lightbox .lightbox-info-panel {
  overflow-y: auto;
  max-height: 90vh;
}

/* ═══════════════════════════════════════
   GRID
   ═══════════════════════════════════════ */
.noticias-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .noticias-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .noticias-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* ═══════════════════════════════════════
   CARD
   ═══════════════════════════════════════ */
#noticias-app .noticia-card,
#noticias-app .noticia-card:hover,
#noticias-app .noticia-card.is-expanded {
  transform: none !important;
  perspective: none !important;
}

#noticias-app .noticia-card {
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(141, 49, 60, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  outline: none;
}

#noticias-app .noticia-card:hover {
  box-shadow: 0 5px 18px rgba(34, 2, 6, 0.08);
  border-color: rgba(141, 49, 60, 0.2);
}

#noticias-app .noticia-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.35);
}

#noticias-app .noticia-card.is-hidden {
  display: none !important;
}

/* ─── Media — altura fija igual que el original ─── */
.noticia-card__media {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background-color: #110103;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .noticia-card__media {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .noticia-card__media {
    height: 170px;
  }
}

#noticias-app .noticia-card__media .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#noticias-app .noticia-card:hover .noticia-card__media .card-image {
  transform: scale(1.04);
}

/* ─── Badge tipo ─── */
.noticia-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  color: #FFFFFF;
  z-index: 2;
  pointer-events: none;
}

.noticia-card__badge .material-icons {
  font-size: 0.8rem;
}

.badge--noticia      { background: #CC0000; }
.badge--flyer        { background: #6B0F1A; }
.badge--convocatoria { background: #1877F2; }

/* ─── Overlay hover ─── */
.noticia-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 1;
}

.noticia-card__overlay .material-icons {
  font-size: 2.2rem;
  color: #FFFFFF;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

#noticias-app .noticia-card:hover .noticia-card__overlay {
  background: rgba(0,0,0,0.22);
}

#noticias-app .noticia-card:hover .noticia-card__overlay .material-icons {
  opacity: 1;
  transform: scale(1);
}

/* ─── Body ─── */
.noticia-card__body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.noticia-card__fecha {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(45, 10, 15, 0.65);
  margin: 0 0 0.65rem;
}

.noticia-card__fecha .material-icons {
  font-size: 1rem;
  color: #CC0000;
}

.noticia-card__title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #2D0A0F;
  margin: 0 0 0.65rem;
}

.noticia-card__resumen {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  color: rgba(45, 10, 15, 0.72);
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-card__leer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: auto;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background-color: #CC0000;
  color: #FFFFFF;
  border: 2px solid #b30000;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
}

.noticia-card__leer .material-icons {
  font-size: 1rem;
}

.noticia-card__leer:hover {
  background-color: #a30000;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   PAGINACIÓN
   ═══════════════════════════════════════ */
#noticias-pagination.is-hidden {
  display: none !important;
}

/* ═══════════════════════════════════════
   VARIANTE HOME
   ═══════════════════════════════════════ */
.noticias-grid--inicio .noticia-card,
.noticias-grid--inicio .noticia-card:hover,
.noticias-grid--inicio .noticia-card.is-expanded {
  transform: none !important;
  perspective: none !important;
}

.noticias-grid--inicio .noticia-card__leer {
  background: none;
  border: none;
  color: #CC0000;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════
   SECCIÓN DESTACADA
   ═══════════════════════════════════════ */
.noticia-destacada {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(141, 49, 60, 0.12);
  box-shadow: 0 8px 32px rgba(45, 10, 15, 0.10);
  margin-bottom: 2.5rem;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@media (min-width: 640px) {
  .noticia-destacada {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .noticia-destacada {
    grid-template-columns: 55% 45%;
  }
}

.noticia-destacada:hover {
  box-shadow: 0 16px 48px rgba(45, 10, 15, 0.15);
  transform: translateY(-3px);
}

/* ─── Imagen ─── */
.noticia-destacada__media {
  position: relative;
  overflow: hidden;
  background: #1a0507;
  min-height: 260px;
}

@media (min-width: 640px) {
  .noticia-destacada__media {
    min-height: 460px;
  }
}

.noticia-destacada__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
  position: absolute;
  inset: 0;
}

.noticia-destacada:hover .noticia-destacada__img {
  transform: scale(1.04);
}

/* ─── Info ─── */
.noticia-destacada__info {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  background: #FFFFFF;
}

.noticia-destacada__etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CC0000;
  border: 1.5px solid #CC0000;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  align-self: flex-start;
}

.noticia-destacada__etiqueta .material-icons {
  font-size: 0.9rem;
}

.noticia-destacada__titulo {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: #2D0A0F;
  line-height: 1.25;
  margin: 0;
}

.noticia-destacada__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.noticia-destacada__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(45, 10, 15, 0.55);
}

.noticia-destacada__meta .material-icons {
  font-size: 0.9rem;
  color: #CC0000;
}

.noticia-destacada__resumen {
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  color: rgba(45, 10, 15, 0.75);
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-destacada__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: #CC0000;
  color: #FFFFFF;
  border: 2px solid #b30000;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
  margin-top: 0.5rem;
}

.noticia-destacada__btn .material-icons {
  font-size: 1.1rem;
}

.noticia-destacada__btn:hover {
  background: #a30000;
  transform: translateY(-1px);
}

@media (max-width: 639px) {
  .noticia-destacada__media {
    min-height: 220px;
  }

  .noticia-destacada__info {
    padding: 1.25rem 1rem 1.5rem;
    gap: 0.75rem;
  }

  .noticia-destacada__titulo {
    font-size: 1.1rem;
  }

  .noticia-destacada__resumen {
    -webkit-line-clamp: 3;
  }
}