/* news.css - estilos modernos y responsivos para sección de noticias */

:root{
  --accent: #0b6b3e;
  --muted: #6b6b6b;
  --card-radius: 10px;
}

/* Grid de noticias */
.news-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 992px){
  .news-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px){
  .news-grid{ grid-template-columns: 1fr; }
}

/* Tarjeta */
.news-card .card{
  border: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex;
  flex-direction: column;
}

.news-card .card:hover{
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.card-image{
  height: 210px;
  overflow: hidden;
  background: #eee;
}
.card-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transition: transform .5s ease;
}
.news-card .card:hover .card-image img{
  transform: scale(1.05);
}

.card-body{
  padding: 1rem;
  flex-grow: 1;
}
.card-title{
  font-size: 1.05rem;
  margin: 0 0 .5rem 0;
  line-height: 1.2;
}
.card-excerpt{
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: .75rem;
}

/* Footer */
.card-footer{
  background: #fff;
  border-top: 1px solid #f1f1f1;
  padding: .6rem 1rem;
}

/* Vista lista */
.list-view .news-grid{
  display: block;
}
.list-view .news-card{
  margin-bottom: 1rem;
}
.list-view .news-card .card{
  flex-direction: row;
  gap: 1rem;
}
.list-view .news-card .card-image{
  width: 240px;
  height: 140px;
  flex: 0 0 240px;
}
.list-view .news-card .card-body{
  flex: 1;
}

/* Botón cargar más */
#loadMore{
  min-width: 220px;
}

/* Accesibilidad */
.news-card .card a,
.news-card .card button{
  font-size: .85rem;
}

/* Modal imagen */
.modal-body img{
  max-height: 360px;
  object-fit: cover;
  width: 100%;
  border-radius: 6px;
}


