/* PageForm starter sections: structure only (TASK-114). Copy into the site's CSS and restyle with
   the site's own classes, colours and type. Nothing here hides content until a script runs. */

.pf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Grids and carousels (logo strip, team, testimonials) ---- */
.pf-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem;
}

.pf-logos .pf-track {
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  align-items: center;
}

.pf-logos img {
  max-height: 3rem;
  width: auto;
  margin-inline: auto;
}

/* A carousel without the script is a row that scrolls sideways (keyboard: focus it, then arrows). */
[data-variant='carousel'] .pf-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

[data-variant='carousel'] .pf-track > * {
  flex: 0 0 min(18rem, 80%);
  scroll-snap-align: start;
}

.pf-logos[data-variant='carousel'] .pf-track > * {
  flex-basis: 9rem;
}

.pf-carousel-controls {
  display: none;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pf-js [data-variant='carousel'] .pf-carousel-controls {
  display: flex;
}

.pf-carousel-controls button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  [data-pf-carousel-pause] {
    display: none;
  }
}

/* ---- Team ---- */
.pf-team img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* ---- Stats ---- */
.pf-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem;
}

.pf-stat-value {
  display: block;
  font-size: 2.25rem;
  line-height: 1.1;
}

/* ---- Location map ---- */
.pf-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
  align-items: start;
}

.pf-map[data-variant='image-right'] .pf-map-image {
  order: 2;
}

.pf-map-image img {
  width: 100%;
  height: auto;
}

/* ---- Testimonials ---- */
.pf-badges {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pf-badges li,
.pf-rating {
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
}

.pf-quote blockquote {
  margin: 0 0 0.75rem;
}

/* ---- Video ---- */
.pf-video figure {
  margin: 0;
}

.pf-video-poster {
  position: relative;
  display: block;
}

.pf-video-poster img,
.pf-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
}

.pf-video-play {
  position: absolute;
  inset: auto auto 1rem 1rem;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
}

.pf-video[data-variant='inset'] figure {
  max-width: 40rem;
}

/* ---- Notice ---- */
.pf-notice {
  border: 1px solid currentColor;
  padding: 0.75rem 1rem;
}

.pf-notice summary {
  cursor: pointer;
  font-weight: 600;
}

.pf-notice[data-variant='warning'] {
  border-width: 2px;
}
