/**
 * Mercury-style "Additional Images" gallery for hg_news full nodes.
 *
 * Overrides hg_reader's news.css, which renders the block as a dark
 * (--gt-black) strip with thumbnails squeezed into a col-sm-5 column.
 * Loaded after module CSS, so equal-or-higher specificity wins.
 */

.news-full .news-remaining-images.hg-gallery {
  background-color: transparent;
  overflow: visible;
  width: 100%;
  margin-top: 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid #d8d8d8;
}

.news-full .news-remaining-images.hg-gallery h3 {
  padding-left: 0;
  padding-top: 0;
  margin-bottom: 1rem;
}

.hg-gallery-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hg-gallery-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Anchor wraps thumbnail + caption; lay out via the list item. */
.hg-gallery-item a {
  display: contents;
}

.news-full .news-remaining-images.hg-gallery img {
  width: 110px;
  height: 83px;
  object-fit: cover;
  border-radius: 0.35rem;
  flex-shrink: 0;
}

.hg-gallery-caption {
  text-decoration: underline;
  font-size: 16px;
}

/**
 * Lightbox modal (see hg-news-gallery.js). Dark full-screen viewer built
 * on the Bootstrap 4 modal that is already loaded site-wide.
 */
.hg-lightbox .modal-content {
  background: transparent;
  border: 0;
  align-items: center;
  box-shadow: none;
}

.hg-lightbox .hg-lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.35rem;
}

.hg-lightbox .hg-lightbox-caption {
  color: #fff;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 16px;
  font-weight: 600;
}

.hg-lightbox .close {
  /* gt-header.css hides .close globally for the mobile menu; restore it here. */
  display: block;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  padding: 0;
  text-align: center;
  color: #fff;
  font-size: 1.75rem;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  opacity: 0.9;
  text-shadow: none;
}

.hg-lightbox .close:hover,
.hg-lightbox .close:focus {
  color: #fff;
  opacity: 1;
}

/* Darken the standard Bootstrap backdrop for a lightbox feel. */
.modal-backdrop.show {
  opacity: 0.85;
}

/**
 * Article text: hg-reader.css bumps .mercury p to 1.25rem; match the
 * site's standard 16px body text instead.
 */
.mercury.news-full p {
  font-size: 16px;
}

/**
 * Sidebar contact card: hg_reader paints it --gt-black, but the theme's
 * navy heading color is unreadable on it. Restyle as a light card.
 */
.news-full .sidebar-right .contact-card {
  background-color: #f5f5f5;
  border-top: solid 10px var(--gt-gold, #b3a369);
}

.news-full .sidebar-right .contact-card p {
  color: #262626;
  font-size: 16px;
}

/**
 * TEST(full-width hero): stack the top summary box — image full width,
 * summary text underneath. Delete this whole block (and restore the 'large'
 * image style in node--hg-news--full.html.twig) to revert to the
 * side-by-side layout.
 */
.news-full .hg-summary {
  flex-direction: column;
}

.news-full .hg-summary .hg-media-hero,
.news-full .hg-summary .hg-media-hero-summary {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.news-full .hg-media-hero picture,
.news-full .hg-media-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.news-full .hg-summary .hg-media-hero-summary {
  padding-top: 1rem;
}
