.news-card-list {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  padding-bottom: 30px;
  border-bottom: 1px solid #ddd;
}

.news-card-image {
  width: 280px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.news-card-content {
  flex: 1;
}

.news-card-date {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.news-card-link {
  display: inline-block;
  margin-top: 12px;
  color: #c00000;
  font-weight: 600;
  text-decoration: none;
}

.news-card-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .news-card-list {
    flex-direction: column;
  }

  .news-card-image {
    width: 100%;
    height: auto;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  color: #333;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: #c00000;
}

.back-link i {
  font-size: 0.95rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  color: #222;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  color: #c00000;
}

.back-link i {
  font-size: 0.95rem;
}

.news-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-title-link:hover {
  color: #c00000;
}

.news-card-image {
  transition: opacity 0.2s ease;
}

.news-card-image:hover {
  opacity: 0.9;
}
/* Estats i enllaços comuns a totes les categories de notícies. */
[data-news-home] .news-title-link { color: inherit; text-decoration: none; }
[data-news-home] .news-title-link:hover { text-decoration: underline; }
[data-news-home] .news-more { display: block; margin-top: 1rem; -webkit-line-clamp: unset; }
[data-news-home] .news-more a { color: #b00000; font-weight: 600; text-decoration: none; }
[data-news-home] .news-more a:hover { text-decoration: underline; }
.news-status { padding: 1rem 0; }
.news-retry { margin-top: .75rem; padding: .65rem 1rem; border: 0; border-radius: .4rem; background: #b00000; color: white; font: inherit; cursor: pointer; }
.news-retry:hover { background: #8c0000; }
.news-retry:focus-visible { outline: 3px solid #111827; outline-offset: 3px; }
.news-card-list > a { flex-shrink: 0; }
.news-card-content { min-width: 0; overflow-wrap: anywhere; }
.news-detail-date { display: block; color: #555; margin-bottom: 1rem; }
.news-detail p { margin-bottom: 1rem; line-height: 1.7; }
[data-news-detail][hidden], .news-detail-date[hidden], #noticia-estat[hidden] { display: none; }

/* Fotografies addicionals de les notícies amb galeria. */
.news-gallery { max-width: 800px; margin-top: 2rem; }
.news-gallery h2 { margin-bottom: 1rem; }
.news-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.news-gallery-grid button { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: transparent; cursor: zoom-in; }
.news-gallery-grid button:focus-visible { outline: 3px solid #b00000; outline-offset: 3px; }
.news-gallery-grid img { display: block; width: 100%; height: auto; border-radius: 10px; }
@media (max-width: 600px) {
  .news-gallery-grid { grid-template-columns: 1fr; }
}

/* Visor modal amb el mateix fons fosc que la galeria de tecnificació. */
.news-lightbox {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none;
  background: transparent; color: white; overflow: hidden;
}
.news-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.news-lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.news-lightbox-image { display: block; max-width: 90%; max-height: 85%; width: auto; height: auto; object-fit: contain; border-radius: 10px; }
.news-lightbox-close {
  position: absolute; top: 16px; right: 24px; z-index: 1;
  width: 48px; height: 48px; border: 0; padding: 0; border-radius: 6px;
  background: rgba(0, 0, 0, .35); color: white; font: 40px/1 sans-serif; cursor: pointer;
}
.news-lightbox-close:hover { background: rgba(255, 255, 255, .15); }
.news-lightbox-close:focus-visible { outline: 2px solid white; outline-offset: 3px; }
@media (max-width: 600px) {
  .news-lightbox-close { top: 10px; right: 10px; }
}

.news-gallery-item { margin: 0; }
.news-gallery-item img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #f1f3f5;
}
@media (max-width: 600px) {
  .news-gallery-item img { aspect-ratio: auto; }
}
.news-gallery-item figcaption { margin-top: .45rem; color: #555; font-size: .9rem; line-height: 1.4; }

.news-image[src="img/noticies/presentacio-2026-petidierphoto-76.jpg"] { height: 100%; object-position: center 85%; }
.news-card:hover .news-image[src="img/noticies/presentacio-2026-petidierphoto-76.jpg"] { transform: none; }
