﻿/* ============================================================
   Certifications page — carousel from about.php, sitting
   fully below the fixed navbar so the wave background
   is not covered.
   ============================================================ */
.page-policy {
  --certs-nav: 102px;
}

.page-policy .site-header,
.page-policy .site-header.is-scrolled {
  min-height: var(--certs-nav);
}

.page-policy .policy-page {
  padding-top: var(--certs-nav);
}

/* Footer wave matches the brown band in bn05.png */
.page-policy .site-footer .footer-curve path {
  fill: #7D5E43;
}

.policy-page .policy-certs-stage {
  --fp-w: clamp(120px, min(26vw, calc(100dvh - var(--certs-nav) - 22rem)), 360px);
  box-sizing: border-box;
  height: auto;
  min-height: max(calc(100dvh - var(--certs-nav)), 680px);
  max-height: none;
  padding-top: clamp(1.15rem, 2.8vh, 2rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  scroll-margin-top: var(--certs-nav);
}

.policy-page .policy-certs-stage .featured-inner {
  flex: 1;
  justify-content: flex-start;
  min-height: calc(100dvh - var(--certs-nav) - clamp(3.2rem, 7.8vh, 5.5rem));
}

/* ---------- Heading ---------- */
.policy-page .policy-certs-stage .sec-head {
  margin-bottom: 0;
}

.policy-page .policy-certs-stage .sec-title {
  text-shadow: 0 2px 18px rgba(42, 24, 10, 0.28);
}

.policy-page .policy-certs-stage .sec-desc {
  margin-top: 0.85rem;
  color: #ffffff;
}

/* ---------- Stage ---------- */
.policy-page .policy-certs-stage .fp-stage {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  z-index: 1;
  flex: none;
  height: calc(var(--fp-w) * 1.12);
  min-height: 0;
  margin-top: 0;
  transform: translateY(-50%);
}

.policy-page .policy-certs-stage .fp-slide[data-pos="-1"] { --shift: -1.32; --scale: 0.7; --fade: 0.62; }
.policy-page .policy-certs-stage .fp-slide[data-pos="1"]  { --shift: 1.32;  --scale: 0.7; --fade: 0.62; }
.policy-page .policy-certs-stage .fp-slide[data-pos="-2"] { --shift: -2.1;  --scale: 0.5; --fade: 0; }
.policy-page .policy-certs-stage .fp-slide[data-pos="2"]  { --shift: 2.1;   --scale: 0.5; --fade: 0; }

.policy-page #certificates.policy-certs-stage .fp-photo {
  width: 100%;
  height: 100%;
}

.policy-page .policy-certs-stage .fp-slide[data-pos="0"] .fp-photo {
  filter: drop-shadow(0 24px 30px rgba(74, 48, 23, 0.25));
}

/* Arrows sit in the gap between the centre logo and its neighbours */
.policy-page #certificates.policy-certs-stage .fp-arrow--prev { left: calc(50% - var(--fp-w) * 0.73); }
.policy-page #certificates.policy-certs-stage .fp-arrow--next { right: calc(50% - var(--fp-w) * 0.73); }
.policy-page #certificates.policy-certs-stage .fp-arrow {
  top: 48%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(36, 24, 15, 0.88);
  color: #f3dcb8;
  border: 1px solid rgba(237, 193, 139, 0.35);
}
.policy-page #certificates.policy-certs-stage .fp-arrow:hover {
  background: #CA8627;
  color: #fff;
}

/* ---------- Info card ---------- */
.policy-page #certificates.policy-certs-stage .cert-info {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  left: 50%;
  bottom: clamp(0.9rem, 2.2vh, 1.4rem);
  z-index: 2;
  width: min(860px, calc(100% - 2rem));
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.policy-page #certificates.policy-certs-stage .fp-cta,
.policy-page #certificates.policy-certs-stage .fp-cta:hover {
  min-width: 10rem;
  margin-bottom: 0.35rem;
  padding: 0.7rem 2.2rem;
  border: 1.5px solid rgba(237, 195, 140, 0.7);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ee 100%);
  color: #090909;
  font-size: 1rem;
  letter-spacing: 0.2em;
  box-shadow:
    0 14px 28px -10px rgba(36, 24, 15, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 0 rgba(202, 134, 39, 0.18);
  transform: none;
}

.cert-captions {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cert-caption {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.cert-caption.is-active {
  opacity: 1;
  transform: none;
}

.cert-caption-name {
  margin: 0;
  font-family: var(--font-th);
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: #fffaf4;
  text-shadow: 0 2px 10px rgba(30, 18, 8, 0.35);
}

.cert-caption-issuer {
  margin: 0.15rem 0 0;
  font-family: var(--font-th);
  font-size: clamp(0.98rem, 1.15vw, 1.1rem);
  line-height: 1.45;
  color: #f0d7b0;
}

.cert-dots {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.cert-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 244, 228, 0.35);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.cert-dot:hover { background: rgba(255, 244, 228, 0.7); }

.cert-dot.is-active {
  width: 30px;
  background: #EDC38C;
}

.cert-dot:focus-visible {
  outline: 2px solid #fffaf4;
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .page-policy { --certs-nav: 78px; }
}

/* Short laptop viewports: the 680px floor and a centred stage push
   the caption below the fold. Fit the same stack as a large monitor
   — heading, three logos, label, caption, dots — in one screen. */
@media (max-height: 840px) {
  .policy-page .policy-certs-stage {
    --fp-w: clamp(132px, min(19vw, calc(100dvh - var(--certs-nav) - 22.5rem)), 300px);
    height: calc(100dvh - var(--certs-nav));
    min-height: 0;
    max-height: calc(100dvh - var(--certs-nav));
    padding-top: clamp(0.65rem, 1.5vh, 1.05rem);
    padding-bottom: clamp(0.45rem, 1.4vh, 0.85rem);
  }

  .policy-page .policy-certs-stage .featured-inner {
    flex: 1 1 0;
    justify-content: flex-start;
    height: auto;
    min-height: 0;
  }

  .policy-page .policy-certs-stage .sec-head {
    flex: 0 0 auto;
  }

  .policy-page .policy-certs-stage .sec-desc {
    margin-top: 0.45rem;
  }

  .policy-page .policy-certs-stage .fp-stage {
    position: relative;
    inset: auto;
    inset-inline: auto;
    top: auto;
    flex: 1 1 0;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: 0;
    transform: none;
  }

  .policy-page #certificates.policy-certs-stage .cert-info {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    align-self: center;
    width: min(860px, calc(100% - 2rem));
    margin: 0.15rem auto 0;
    transform: none;
  }
}
