/* What the theme adds to the prototype styles: real ad units, the article text as WordPress stores it, the newsletter form and the medical images gallery. */

/* A real AdSense unit needs a block container with a width, and no placeholder stripes; the reserved height stays so nothing moves when it loads. */
.ad-slot__space { display: block; padding: 0; border: 0; background: none; }
.ad-slot__space > ins { display: block; }
.ad-slot--sidebar .ad-slot__space { margin-inline: auto; }

/* Ad Inserter blocks inside the article text */
.article-body .code-block { margin-block: 36px; clear: both; }

/* Article text from the editor: pictures, captions, embedded video and smaller headings */
.prose img { max-width: 100%; height: auto; }
.prose img.aligncenter, .prose .aligncenter { display: block; margin-inline: auto; }
.prose .alignleft { float: left; margin: 4px 24px 12px 0; }
.prose .alignright { float: right; margin: 4px 0 12px 24px; }
.prose .wp-caption { max-width: 100%; }
.prose .wp-caption-text { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.prose iframe { max-width: 100%; }
.prose iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose h4 { margin-top: 28px; font-size: 1.05rem; }
.prose h2, .prose h3 { clear: both; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.page-content { min-width: 0; }

/* Footer newsletter signup (Mailchimp) */
.newsletter { margin-top: 20px; max-width: 24em; }
.newsletter__label { display: block; margin-bottom: 8px; color: #fff; font-weight: 600; }
.newsletter__field { display: flex; gap: 8px; }
.newsletter__input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid rgb(255 255 255 / 0.35); border-radius: var(--radius-small); background: rgb(255 255 255 / 0.08); color: #fff; font: inherit; }
.newsletter__input::placeholder { color: var(--brand-300); }
.newsletter__submit { min-height: 44px; padding: 0 16px; border: 1px solid #fff; border-radius: var(--radius-small); background: #fff; color: var(--brand-900); font: inherit; font-weight: 600; cursor: pointer; }
.newsletter__submit:hover { background: var(--brand-100); }

/* The medical images gallery: collection and picture cards, and one picture */
.gallery-listing { padding-bottom: clamp(48px, 6vw, 80px); }
.gallery-listing .listing__heading + .picture-grid { margin-top: 24px; }
.gallery-listing .pagination { margin-top: 40px; }
.picture-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.picture-card a { display: grid; gap: 10px; text-decoration: none; color: var(--ink); }
.picture-card__image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.picture-card a:hover .picture-card__image { border-color: var(--brand-300); box-shadow: 0 10px 24px -14px rgb(15 42 79 / 0.35); }
.picture-card__title { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.3; }
.picture-card a:hover .picture-card__title { color: var(--brand-700); text-decoration: underline; }
.picture-card__meta { margin-top: -4px; font-size: 0.85rem; color: var(--muted); }
.gallery-image { min-width: 0; }
.gallery-image__position { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }
.gallery-image__position a { color: var(--brand-700); }
.gallery-image__figure { margin: 24px 0 0; }
.gallery-image__stage { padding: clamp(12px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.gallery-image__stage img { display: block; max-width: 100%; margin: 0 auto; height: auto; border-radius: var(--radius-small); box-shadow: 0 1px 2px rgb(15 42 79 / 0.08), 0 12px 28px -16px rgb(15 42 79 / 0.3); }
.gallery-image__caption { margin-top: 14px; color: var(--ink-soft); }
.gallery-image > .code-block { margin-block: 28px !important; }
.gallery-image__article { display: grid; gap: 6px; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--brand-700); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.gallery-image__article-title { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; }
.gallery-image__article-action { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 600; color: var(--brand-700); }
.gallery-image__article-action .icon { width: 16px; height: 16px; }
.gallery-image__article:hover { border-color: var(--brand-700); }
.gallery-image__article:hover .gallery-image__article-title { color: var(--brand-700); text-decoration: underline; }
.gallery-pager { margin-top: 20px; }
.gallery-pager .article-pager__link { grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 16px; }
.gallery-pager .article-pager__link--centre { grid-template-columns: minmax(0, 1fr) 96px; }
.gallery-pager__image { display: block; width: 96px; height: auto; aspect-ratio: 16 / 11; object-fit: cover; border-radius: var(--radius-small); background: var(--tint); }
.gallery-pager__text { display: grid; gap: 6px; min-width: 0; }
.gallery-more { margin-top: 48px; }
.gallery-more__title { margin-bottom: 20px; font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.6rem); }
.gallery-more__all { margin-top: 24px; }
.picture-grid--compact { gap: 24px 18px; }
.picture-grid--compact .picture-card__title { font-size: 1rem; }
.aside-block a[aria-current="true"] { color: var(--brand-700); font-weight: 600; }

@media (max-width: 1119px) {
  .picture-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 959px) {
  .picture-grid:not(.picture-grid--compact) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .picture-grid:not(.picture-grid--compact) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .picture-card__title, .picture-grid--compact .picture-card__title { font-size: 0.98rem; }
  .gallery-pager .article-pager__link--centre { grid-template-columns: 96px minmax(0, 1fr); }
  .gallery-pager .article-pager__link--centre .gallery-pager__image { grid-row: 1; grid-column: 1; }
  .gallery-pager .article-pager__link--centre .article-pager__label { justify-content: flex-start; }
  .prose .alignleft, .prose .alignright { float: none; display: block; margin: 0 auto 12px; }
  .prose table { display: block; overflow-x: auto; }
}
