/* Original web-app screenshots, with a progressively enhanced tab selection. */
.webapp-gallery {
  min-width: 0;
  margin-top: 48px;
  scroll-margin-top: 100px;
}

.webapp-gallery-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.webapp-gallery-heading h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.25;
}

.webapp-gallery-heading p {
  margin-bottom: 0;
}

.webapp-gallery-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.webapp-gallery-tab {
  min-width: 0;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.webapp-gallery-tab:hover {
  border-color: var(--brand-yellow, #eed37f);
  background: rgba(27, 115, 148, 0.25);
}

.webapp-gallery-tab[aria-selected="true"] {
  border-color: var(--brand-blue, #1b7394);
  background: var(--brand-blue, #1b7394);
  box-shadow: inset 0 -3px 0 var(--brand-yellow, #eed37f);
}

.webapp-gallery-tab:focus-visible,
.webapp-gallery-panel:focus-visible,
.webapp-gallery-preview:focus-visible {
  outline: 3px solid var(--brand-yellow, #eed37f);
  outline-offset: 4px;
}

.webapp-gallery-panel {
  min-width: 0;
  margin: 0;
  border-radius: 14px;
}

.webapp-gallery-panel + .webapp-gallery-panel {
  margin-top: 32px;
}

.webapp-gallery[data-webapp-gallery-ready] .webapp-gallery-panel {
  margin-top: 0;
}

.webapp-gallery-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 11;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: #faf6f6;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.webapp-gallery-preview:hover {
  border-color: var(--brand-yellow, #eed37f);
}

.webapp-gallery-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.webapp-gallery-panel figcaption {
  min-height: 94px;
  padding: 22px 0 0;
  color: #fff;
}

.webapp-gallery-panel figcaption h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.4;
}

.webapp-gallery-panel figcaption p {
  max-width: 78ch;
  margin: 0;
  color: var(--c-text-inverse-muted, #c6d0dd);
  font-size: 0.9rem;
  line-height: 1.6;
}

.webapp-gallery-note {
  margin: 16px 0 0;
  color: var(--c-text-inverse-muted, #c6d0dd);
  font-size: 0.8rem;
  line-height: 1.6;
}

.webapp-gallery [hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .webapp-gallery-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .webapp-gallery {
    margin-top: 36px;
  }

  .webapp-gallery-tabs {
    gap: 8px;
    margin-bottom: 16px;
  }

  .webapp-gallery-tab {
    padding: 11px 8px;
    font-size: 0.84rem;
  }

  .webapp-gallery-preview {
    padding: 3px;
    border-radius: 10px;
  }

  .webapp-gallery-panel figcaption {
    min-height: 120px;
    padding-top: 18px;
  }

  .webapp-gallery-panel figcaption p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .webapp-gallery-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .webapp-gallery-tab {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}
