/* =========================================
   NOVEDADES (grid 2 columnas + modal)
   Compatible con tu HTML:
   .newsbar / .post-list / #news-more / .post-tag
========================================= */

.section-sub{ margin:6px 0 0; opacity:.85; }

.page-novedades .hero{
  background-image: url("/assets/img/novedades/NOVEDADES-2.png");
}
@media (max-width: 980px){
  .page-novedades .hero{
    background-image: url("/assets/img/novedades/NOVEDADES-TABLET.png");
  }
}
@media (max-width: 520px){
  .page-novedades .hero{
    background-image: url("/assets/img/novedades/NOVEDADES-MOBILE.png");
  }
}

/* Barra de bÃºsqueda/filtro */
.newsbar{
  margin-top:12px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.newsbar.is-hidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip: rect(0, 0, 0, 0);
  border:0;
}

.newsbar__search{
  flex: 1 1 320px;
  padding:12px 14px;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  background: #fff;
  box-shadow: none;
  outline:none;
}

.newsbar__filter{
  flex: 0 0 240px;
  padding:12px 14px;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  background: #fff;
  box-shadow: none;
  outline:none;
  cursor:pointer;
}

/* LISTADO: 2 por fila */
.post-list{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:28px 26px;
}

/* Card */
.post-card{
  min-width:0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* Imagen: nunca se â€œgiganteaâ€ */
.post-card__img{
  width:100%;
  aspect-ratio: 4 / 3;
  background:#fff;
  border-radius: 6px;
  overflow:hidden;
}

.post-card__img img{
  width:100%;
  height:100%;
  object-fit: cover;   /* como INCADE */
  object-position:center;
  display:block;
}

.post-card__body{
  padding:12px 2px 6px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
}

/* Meta: categorÃ­as + fecha */
.post-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  opacity:.8;
}

.post-cats{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.post-cat{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #6b7280;
  text-transform: uppercase;
}

.post-date{
  font-weight:600;
  font-size: 12px;
  color: #6b7280;
  opacity:1;
}

/* TÃ­tulo + excerpt */
.post-title{
  margin:0;
  color: #212529;
  line-height:1.35;
  font-weight:700;
  font-size:1.02rem;
}

.post-excerpt{
  margin:0;
  color:#4b5563;
  line-height:1.6;
}

/* Footer */
.post-actions{
  margin-top:auto;
  display:flex;
  justify-content:flex-start;
}

.post-more{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  color: var(--blue);
  text-decoration:none;
  border:0;
  background:transparent;
  padding:4px 0;
  cursor:pointer;
}

.post-more:hover{ text-decoration: underline; }

/* Footer del listado */
.news-footer{
  margin-top:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.hint{ opacity:.8; margin:0; }
.is-hidden{ display:none !important; }

.pagination{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.pagination__btn{
  min-width:32px;
  height:32px;
  padding:0 8px;
  border-radius:8px;
  border:1px solid #e6e6e6;
  background:#fff;
  color:#6b7280;
  font-weight:700;
  font-size:12px;
  cursor:pointer;
}
.pagination__btn.is-active{
  background:#1e4f8f;
  border-color:#1e4f8f;
  color:#fff;
}
.pagination__btn:disabled{
  opacity:.5;
  cursor:default;
}

/* Responsive */
@media (max-width: 820px){
  .post-list{ grid-template-columns: 1fr; }
  .newsbar__filter{ flex: 1 1 220px; }
}

/* ===== MODAL ===== */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}

.modal.is-open{ display:block; }

.modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(2,6,23,.55);
}

.modal__dialog{
  position: relative;
  width: min(920px, calc(100% - 24px));
  margin: 18px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 18px;
}

.modal__media{
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px;
  height: 380px;
}

.modal__media img{
  width:100%;
  height:100%;
  object-fit: contain; /* acÃ¡ sÃ­ se ve completa */
  display:block;
}

.modal__content{
  padding: 16px 18px 20px;
}

.modal__meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  opacity:.85;
  font-size:14px;
}

/* tag dentro del modal */
.post-tag{
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(11,61,145,.06);
  color: var(--blue);
  font-weight:900;
  font-size: 12px;
}

@media (max-width: 520px){
  .modal__media{ height: 260px; }
}

.news-instagram{
  margin-top: 34px;
}
