/* ==========================================================================
   Mega-Net EHR Cloud — "See it in action" screenshot gallery
   Used only by ehr-cloud.html. Reuses the tokens from style.css (loaded first)
   so nothing here redefines the site's colours or fonts.
   Caption text is 16px or larger on the elevated navy card; contrast is
   checked in the PR description.
   ========================================================================== */

.screens-grid {
  display: grid;
  grid-template-columns: 1fr;          /* one column on phones */
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}
@media (min-width: 800px) {
  .screens-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-3); }
  /* An odd last screen spans the full row instead of leaving a gap */
  .screens-grid > .screen:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.screen {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.screen-link {
  display: block;
  background: #fff;
  border-bottom: 1px solid var(--border);
  cursor: zoom-in;
  position: relative;
}
.screen-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}
.screen-link:hover { box-shadow: inset 0 0 0 3px var(--orange-500); }
.screen-link:focus-visible { outline-offset: -3px; }
.screen-zoom {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  background: var(--blue-950);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.screen figcaption {
  padding: var(--space-2) var(--space-3) var(--space-3);
  font-size: 1rem;                     /* 16px minimum */
  line-height: 1.55;
  color: var(--text-on-dark);
}
.screen figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.screens-note {
  margin: var(--space-4) 0 0;
  text-align: center;
  font-size: 1rem;
  color: var(--text-on-dark);
}

/* ---- Click-to-enlarge view ---- */
.screen-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--white);
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
}
.screen-lightbox::backdrop { background: rgba(5, 12, 20, 0.92); }
.screen-lightbox[open] { display: block; }
.screen-lightbox-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 4rem 1rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}
.screen-lightbox-scroll img {
  width: min(1440px, 100%);
  height: auto;
  max-width: none;
  flex: 0 0 auto;
  background: #fff;
  border-radius: var(--radius-sm);
}
.screen-lightbox-text {
  position: fixed;
  left: 1rem;
  top: 0.9rem;
  right: 5rem;
  z-index: 2;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.35;
}
@media (max-width: 640px) {
  /* On phones show the screen wider than the viewport so its text is readable; swipe to pan or pinch to zoom. */
  .screen-lightbox-scroll { justify-content: flex-start; }
  .screen-lightbox-scroll img { width: 1100px; }
}
.screen-lightbox-close {
  position: fixed;
  top: 0.6rem;
  right: 0.8rem;
  z-index: 3;
  min-width: 48px;
  height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 2px solid var(--white);
  background: var(--blue-950);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}
.screen-lightbox-close:hover { border-color: var(--orange-500); color: var(--orange-500); }
