/* ─────────────────────────────────────────
   noticias.css — Estilos de la página
   de noticias de Cooperación Popular
   ───────────────────────────────────────── */

/* ─── PAGE HEADER ─── */
.page-header {
  background: linear-gradient(100deg, var(--azul) 60%, #0d1f3c 100%);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 30px,
    rgba(255, 255, 255, 0.018) 30px,
    rgba(255, 255, 255, 0.018) 31px
  );
}
.page-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--oro), var(--rojo), var(--oro));
}
.page-header-content { position: relative; z-index: 1; }
.page-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oro);
  border-left: 3px solid var(--oro);
  padding-left: 0.6rem;
  margin-bottom: 0.8rem;
}
.page-header h1 {
  font-family: var(--fuente-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin: 0;
}
.page-header p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  margin: 0.8rem 0 0;
}

/* ─── FILTER BAR ─── */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid #e8e4dd;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.filter-btn {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border-radius: 0;
  border: 1.5px solid #ddd;
  background: transparent;
  color: var(--gris-medio);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}
.search-input {
  font-size: 0.85rem;
  border: 1.5px solid #ddd;
  border-radius: 0;
  padding: 0.4rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  width: 220px;
}
.search-input:focus { border-color: var(--azul); }

/* ─── FEATURED ─── */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid #e8e4dd;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.featured-card:hover {
  box-shadow: 0 16px 48px rgba(26, 58, 92, 0.13);
}
.featured-img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}
.featured-body {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-tag {
  display: inline-block;
  background: var(--rojo);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  margin-bottom: 1rem;
}
.featured-body h2 {
  font-family: var(--fuente-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--azul);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.featured-body p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.featured-meta {
  font-size: 0.75rem;
  color: var(--gris-medio);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-img  { min-height: 220px; }
}

/* ─── NEWS GRID ─── */
.news-grid {
  padding: 60px 0 80px;
  background: var(--gris-claro);
}
.news-card {
  background: #fff;
  border: 1px solid #e8e4dd;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s, box-shadow 0.28s;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(26, 58, 92, 0.11);
}
.news-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.news-card-img-placeholder {
  width: 100%;
  height: 200px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--azul) 0%, #0d1f3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card-img-placeholder i {
  font-size: 3rem;
  color: rgba(212, 160, 23, 0.4);
}
.news-card-body {
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 0.5rem;
}
.news-card h5 {
  font-family: var(--fuente-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--azul);
  line-height: 1.4;
  margin-bottom: 0.7rem;
  flex: 1;
}
.news-card p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.8rem;
  border-top: 1px solid #f0ede8;
  margin-top: auto;
}
.news-card-date {
  font-size: 0.72rem;
  color: var(--gris-medio);
}

/* ─── PAGINACIÓN ─── */
.pagination .page-link {
  border-radius: 0 !important;
  color: var(--azul);
  font-size: 0.8rem;
  font-weight: 600;
  border-color: #ddd;
}
.pagination .page-item.active .page-link {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}
.pagination .page-link:hover {
  background: var(--gris-claro);
  color: var(--azul);
}

/* ─── SIDEBAR ─── */
.sidebar-card {
  background: #fff;
  border: 1px solid #e8e4dd;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h6 {
  font-family: var(--fuente-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul);
  border-bottom: 2px solid var(--oro);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.sidebar-news-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0ede8;
  text-decoration: none;
}
.sidebar-news-item:last-child { border-bottom: none; }
.sidebar-news-img {
  width: 60px;
  height: 55px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-news-text { flex: 1; }
.sidebar-news-text p {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--azul);
  line-height: 1.4;
  margin: 0 0 0.2rem;
}
.sidebar-news-text span {
  font-size: 0.68rem;
  color: var(--gris-medio);
}
.sidebar-news-item:hover .sidebar-news-text p { color: var(--rojo); }
.tag-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid #ddd;
  color: var(--gris-medio);
  text-decoration: none;
  margin: 0.2rem;
  transition: all 0.2s;
}
.tag-pill:hover {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}

/* ─── SKELETON ANIMATION ─── */
@keyframes pulse-sk {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── VISOR MODAL (PDF + Imagen) ─── */
.visor-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 1rem;
}
.visor-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.visor-modal-inner {
  background: #fff;
  width: min(900px, 100%);
  height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(0.97);
  transition: transform 0.3s;
}
.visor-modal-overlay.active .visor-modal-inner { transform: scale(1); }
.visor-modal-toolbar {
  background: var(--azul);
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.visor-modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  min-width: 0;
  flex: 1;
}
.visor-modal-title i    { color: var(--oro); flex-shrink: 0; }
.visor-modal-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visor-modal-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
.btn-vm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.btn-vm-gold           { background: var(--oro); color: var(--azul); }
.btn-vm-gold:hover     { background: #c49015; color: var(--azul); }
.btn-vm-close {
  width: 34px; height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn-vm-close:hover    { background: var(--rojo); color: #fff; }
.visor-modal-body {
  flex: 1;
  background: #2b2b2b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visor-modal-body iframe {
  width: 100%; height: 100%;
  border: none; display: block;
}
.visor-modal-body img.visor-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
}