html {
  scroll-padding-top: 110px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.wsg-page {
  font-family: CachetProRegular;
  color: #1f2a33;
  line-height: 1.55;
  padding-bottom: 56px;
}

.wsg-page * {
  box-sizing: border-box;
}

.wsg-page img {
  max-width: 100%;
  display: block;
}

.wsg-page a {
  color: #0060af;
}

.wsg-page a:focus-visible {
  outline: 3px solid #00aeef;
  outline-offset: 2px;
}

.wsg-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   HERO
   ============================================================ */
.wsg-hero {
  max-width: 1200px;
  margin: 0 auto 28px;
}

.wsg-hero-img {
  width: 100%;
  height: auto;
  border-radius: 0 0 14px 14px;
}

/* ============================================================
   INTRO
   ============================================================ */
.wsg-intro-text {
  font-family: CachetProRegular;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: #2A2A2A;
  max-width: 860px;
  margin: 0 auto 24px;
  text-align: center;
}

/* ============================================================
   FILTER PILLS
   ============================================================ */
.wsg-filters-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.wsg-filters-list li {
  margin: 0;
  padding: 0;
}

.wsg-page .wsg-filters-btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: .9rem;
  font-weight: 700;
  color: #0060af;
  text-decoration: none;
  white-space: nowrap;
  background: #f4f7fa;
  border: 1px solid #d9e2ea;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.wsg-page .wsg-filters-btn:hover {
  color: #ffffff;
  background: #0060af;
  border-color: #0060af;
}

/* ============================================================
   CARDS GRID (1 / 2 / 3 columns)
   ============================================================ */
.wsg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Card: photo + name only; details panel reveals on hover, tap or keyboard focus */
.wsg-card {
  position: relative;
  height: 480px;
  background: #fef7ec;
  border: 1px solid #d9e2ea;
  border-radius: 14px;
  overflow: hidden;
  overflow: clip;
  scroll-margin-top: 110px;
}

/* ---------- Card face (photo + name) ---------- */
.wsg-page .wsg-card-face {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  color: #ffffff;
  text-align: left;
  background: #f4f7fa;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.wsg-page .wsg-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.wsg-card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 32, 64, .78) 0%, rgba(0, 32, 64, .35) 32%, rgba(0, 32, 64, 0) 55%);
}

.wsg-card-name {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 46px;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.wsg-card-hint {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 20px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .92;
}

.wsg-card-face:focus-visible {
  outline: 3px solid #00aeef;
  outline-offset: -3px;
}

/* ---------- Details panel ---------- */
.wsg-card-panel {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px 22px;
  background: #fef7ec;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: transform .32s cubic-bezier(.2, .7, .2, 1), opacity .2s ease;
}

/* Photo zooms first (.45s); the panel slides up once the zoom has finished */
.wsg-card.wsg-card-open .wsg-card-panel,
.wsg-card:has(:focus-visible) .wsg-card-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: .45s;
}

.wsg-card.wsg-card-open .wsg-card-photo,
.wsg-card:has(:focus-visible) .wsg-card-photo {
  transform: scale(1.05);
}

/* Mouse: same sequence. Passing over a card for less than .45s never opens it, so cards don't flash as the pointer crosses the grid */
@media (hover: hover) {
  .wsg-card:hover .wsg-card-photo {
    transform: scale(1.05);
  }

  .wsg-card:hover .wsg-card-panel {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: .45s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wsg-card-panel,
  .wsg-card.wsg-card-open .wsg-card-panel,
  .wsg-card:hover .wsg-card-panel,
  .wsg-card:has(:focus-visible) .wsg-card-panel {
    transform: none;
    transition: opacity .15s ease;
    transition-delay: 0s;
  }

  .wsg-page .wsg-card-photo,
  .wsg-card:hover .wsg-card-photo,
  .wsg-card.wsg-card-open .wsg-card-photo,
  .wsg-card:has(:focus-visible) .wsg-card-photo {
    transform: none;
    transition: none;
  }
}

.wsg-card-title {
  margin: 0;
  padding-right: 36px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.wsg-page .wsg-card-title a {
  color: #0060af;
  text-decoration: none;
}

.wsg-page .wsg-card-title a:hover {
  text-decoration: underline;
}

.wsg-card-desc {
  margin: 0;
  color: #4a5560;
}

/* Close button: touch screens only (mouse users simply move off the card) */
.wsg-page .wsg-card-close {
  display: block;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: #0060af;
  background: #ffffff;
  border: 1px solid #d9e2ea;
  border-radius: 50%;
  cursor: pointer;
}

.wsg-page .wsg-card-close:focus-visible {
  outline: 3px solid #00aeef;
  outline-offset: -3px;
}

@media (hover: hover) {
  .wsg-page .wsg-card-close {
    display: none;
  }
}

/* ============================================================
   PROGRAM LINKS (chevron list inside each card)
   ============================================================ */
.wsg-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
  padding-top: 8px;
  border-top: 1px solid #ecdcc2;
}

.wsg-page .wsg-pill {
  position: relative;
  display: block;
  min-height: 24px;
  padding: 8px 0 8px 14px;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0060af;
  text-decoration: underline;
  text-decoration-color: rgba(0, 96, 175, .3);
  text-underline-offset: 3px;
}

.wsg-pill::before {
  content: "\203A";
  position: absolute;
  left: 0;
  top: 7px;
  font-size: 1rem;
  line-height: 1.2;
  color: #01a490;
}

.wsg-page .wsg-pill:hover {
  color: #004a87;
  text-decoration-color: currentColor;
}

.wsg-pill-age {
  display: block;
  margin-top: 1px;
  font-size: .8rem;
  font-weight: 400;
}

/* ============================================================
   CTA
   ============================================================ */
.wsg-cta-text {
  max-width: 860px;
  margin: 48px auto 0;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 481px) {
  .wsg-card {
    height: 420px;
  }

  .wsg-card-panel {
    padding: 22px 22px 24px;
  }

  .wsg-pills {
    gap: 2px 16px;
  }

  .wsg-page .wsg-pill {
    padding: 6px 0 6px 14px;
  }

  .wsg-pill::before {
    top: 5px;
  }
}

@media (min-width: 640px) {
  .wsg-container {
    padding: 0 24px;
  }

  .wsg-intro-text {
    font-size: 1.15rem;
  }

  .wsg-filters-list {
    margin-bottom: 40px;
  }

  .wsg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .wsg-hero {
    margin-bottom: 32px;
  }

  .wsg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (min-width: 1240px) {
  .wsg-container {
    padding: 0;
  }
}
