/**
 * acf-about-us-gallery-section — About Us training photo grid with waves + grass
 * (Figma Layout / 250 / aboutUs Gallery, 957:12176).
 *
 * Photo-only grid: franchise-green border + leaf radius on each frame.
 * Not FAQ media / video cards — no captions, no play overlay.
 */

.acf-about-us-gallery-section {
  position: relative;
  overflow: hidden;
  background-color: var(--color-off-white, #f8f8f8);
}

.acf-about-us-gallery-section.alignfull,
.acf-about-us-gallery-section.alignwide {
  inline-size: 100%;
  max-inline-size: none;
  margin-inline: 0;
}

.acf-about-us-gallery-section__wave {
  display: block;
  line-height: 0;
}

.acf-about-us-gallery-section__wave--top {
  margin-inline: 0;
  inline-size: 100%;
}

.acf-about-us-gallery-section__wave--top svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
  min-block-size: 50px; /* styleguide-exception: wave decorative min */
  transform: scaleY(-1);
}

.acf-about-us-gallery-section__body {
  position: relative;
  padding-inline: var(--block-pad-inline);
  background-color: var(--color-off-white, #f8f8f8);
  overflow: hidden;
}

.acf-about-us-gallery-section__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding-inline: 0;
  /* Content vertical inset — bottom wave flush on __body (faq-media / services-grid). */
  padding-block: var(--space-xl) var(--space-2xl);
}

.acf-about-us-gallery-section__wave--bottom {
  margin-inline: calc(-1 * var(--block-pad-inline));
  inline-size: calc(100% + (2 * var(--block-pad-inline)));
}

.acf-about-us-gallery-section__wave--bottom svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
  min-block-size: 50px; /* styleguide-exception: wave decorative min */
  transform: scaleY(-1);
}

.acf-about-us-gallery-section__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

/* Beat .entry-content h2 — Figma 40px / 48px serif centered title */
.acf-about-us-gallery-section .acf-about-us-gallery-section__heading {
  margin: 0;
  max-inline-size: 55.375rem; /* styleguide-exception: Figma header max ~886px */
  font-family: var(--font-family-serif);
  font-size: 2.5rem; /* styleguide-exception: Figma 40px heading */
  font-weight: var(--font-weight-bold);
  line-height: 1.2; /* styleguide-exception: 48px / 40px */
  text-wrap: pretty;
  color: var(--color-brand-forest);
}

.acf-about-us-gallery-section__intro {
  margin: 0;
  max-inline-size: 55.375rem; /* styleguide-exception: Figma intro max ~886px */
  font-weight: var(--font-weight-medium);
  color: var(--color-dark);
}

.acf-about-us-gallery-section__intro p {
  margin: 0 0 var(--space-sm);
}

.acf-about-us-gallery-section__intro p:last-child {
  margin-block-end: 0;
}

.acf-about-us-gallery-section__footer {
  display: flex;
  justify-content: center;
  margin-block-start: var(--space-lg);
}

.acf-about-us-gallery-section__pages {
  display: flex;
  flex-direction: column;
  inline-size: 100%;
}

.acf-about-us-gallery-section__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  inline-size: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acf-about-us-gallery-section__grid:not(.is-active) {
  display: none;
}

/* Same green arrows + dots as testimonials / blog pagination. */
.acf-about-us-gallery-section__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--block-gap);
  inline-size: 100%;
}

.acf-about-us-gallery-section__pagination-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  border: 0;
  background: transparent;
  color: var(--color-brand-green);
  text-decoration: none;
  cursor: pointer;
}

.acf-about-us-gallery-section__pagination-arrow.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.acf-about-us-gallery-section__pagination-arrow-icon {
  display: block;
  line-height: 0;
}

.acf-about-us-gallery-section__pagination-arrow-icon .bpa-inline-svg,
.acf-about-us-gallery-section__pagination-arrow-icon svg {
  display: block;
  width: 1.125rem;
  height: auto;
}

.acf-about-us-gallery-section__pagination-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.625rem;
}

.acf-about-us-gallery-section__pagination-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 0;
}

.acf-about-us-gallery-section__pagination-dot-number {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-none);
  color: var(--color-brand-green);
}

.acf-about-us-gallery-section__pagination-dot.is-active .acf-about-us-gallery-section__pagination-dot-number {
  opacity: 1;
}

.acf-about-us-gallery-section__pagination-dot:not(.is-active) .acf-about-us-gallery-section__pagination-dot-number {
  opacity: 0.35;
}

.acf-about-us-gallery-section__pagination-dot-active,
.acf-about-us-gallery-section__pagination-dot-inactive {
  display: block;
  line-height: 0;
}

.acf-about-us-gallery-section__pagination-dot-active .bpa-inline-svg,
.acf-about-us-gallery-section__pagination-dot-active svg,
.acf-about-us-gallery-section__pagination-dot-inactive .bpa-inline-svg,
.acf-about-us-gallery-section__pagination-dot-inactive svg {
  display: block;
  width: 0.5rem;
  height: auto;
}

.acf-about-us-gallery-section__pagination-dot .acf-about-us-gallery-section__pagination-dot-active {
  display: none;
}

.acf-about-us-gallery-section__pagination-dot .acf-about-us-gallery-section__pagination-dot-inactive {
  display: block;
}

.acf-about-us-gallery-section__pagination-dot.is-active .acf-about-us-gallery-section__pagination-dot-active {
  display: block;
}

.acf-about-us-gallery-section__pagination-dot.is-active .acf-about-us-gallery-section__pagination-dot-inactive {
  display: none;
}

.acf-about-us-gallery-section__pagination-arrow:focus-visible,
.acf-about-us-gallery-section__pagination-dot:focus-visible {
  outline: 2px solid var(--color-brand-green);
  outline-offset: 2px;
}

.acf-about-us-gallery-section__cell {
  min-inline-size: 0;
}

.acf-about-us-gallery-section__photo {
  margin: 0;
  overflow: hidden;
  inline-size: 100%;
  aspect-ratio: 296 / 251; /* styleguide-exception: Figma photo frame */
  box-sizing: border-box;
  border: 1px solid var(--color-franchise-green-bright, #30b454);
  border-radius: var(--radius-leaf-sm);
  background-color: var(--color-off-white, #f8f8f8);
}

.acf-about-us-gallery-section__photo-link {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  text-decoration: none;
}

.acf-about-us-gallery-section__photo-link:focus-visible {
  outline: 2px solid var(--color-brand-green);
  outline-offset: 2px;
}

.acf-about-us-gallery-section__photo img,
.acf-about-us-gallery-section__photo picture,
.acf-about-us-gallery-section__photo-link img,
.acf-about-us-gallery-section__photo-link picture {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.acf-about-us-gallery-section__photo-img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

/* About-us story bottom wave/grass → gallery top wave handoff */
.acf-about-us-section--has-bottom-wave + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__wave--top,
.acf-about-us-section:has(> .bpa-local-grass-divider) + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__wave--top,
.wp-block-acf-acf-about-us-section:has(.acf-about-us-section--has-bottom-wave) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__wave--top,
.wp-block-acf-acf-about-us-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__wave--top {
  display: none;
}

.acf-about-us-section--has-bottom-wave + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave,
.acf-about-us-section:has(> .bpa-local-grass-divider) + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave,
.wp-block-acf-acf-about-us-section:has(.acf-about-us-section--has-bottom-wave) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave,
.wp-block-acf-acf-about-us-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave {
  margin-block-start: -4px; /* styleguide-exception: flush wave handoff */
}

.acf-about-us-section--has-bottom-wave + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__body,
.acf-about-us-section:has(> .bpa-local-grass-divider) + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__body,
.wp-block-acf-acf-about-us-section:has(.acf-about-us-section--has-bottom-wave) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__body,
.wp-block-acf-acf-about-us-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__body {
  padding-block-start: 0;
}

.acf-about-us-section--has-bottom-wave + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__inner,
.acf-about-us-section:has(> .bpa-local-grass-divider) + .acf-about-us-gallery-section.acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__inner,
.wp-block-acf-acf-about-us-section:has(.acf-about-us-section--has-bottom-wave) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__inner,
.wp-block-acf-acf-about-us-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-about-us-gallery-section .acf-about-us-gallery-section--has-top-wave .acf-about-us-gallery-section__inner {
  padding-block-start: var(--space-xl);
}

/* Gallery bottom wave/grass → next white section top wave handoff */
.acf-about-us-gallery-section--has-bottom-wave + .acf-about-us-section .acf-about-us-section__wave--top,
.acf-about-us-gallery-section--has-bottom-wave + .acf-about-us-explain-section .acf-about-us-explain-section__wave--top,
.acf-about-us-gallery-section--has-bottom-wave + .acf-single-service-card-section .acf-single-service-card-section__wave--top,
.acf-about-us-gallery-section--has-bottom-wave + .acf-services-grid-section .acf-services-grid-section__wave--top,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-about-us-section .acf-about-us-section__wave--top,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-about-us-explain-section .acf-about-us-explain-section__wave--top,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-single-service-card-section .acf-single-service-card-section__wave--top,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-services-grid-section .acf-services-grid-section__wave--top {
  display: none;
}

.acf-about-us-gallery-section--has-bottom-wave + .acf-about-us-section,
.acf-about-us-gallery-section--has-bottom-wave + .acf-about-us-explain-section,
.acf-about-us-gallery-section--has-bottom-wave + .acf-single-service-card-section,
.acf-about-us-gallery-section--has-bottom-wave + .acf-services-grid-section,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-about-us-section .acf-about-us-section,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-about-us-explain-section .acf-about-us-explain-section,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-single-service-card-section .acf-single-service-card-section,
.wp-block-acf-acf-about-us-gallery-section:has(.acf-about-us-gallery-section--has-bottom-wave) + .wp-block-acf-acf-services-grid-section .acf-services-grid-section {
  margin-block-start: -4px;
}

.acf-about-us-gallery-section:has(> .bpa-local-grass-divider) + .acf-about-us-section,
.acf-about-us-gallery-section:has(> .bpa-local-grass-divider) + .acf-about-us-explain-section,
.acf-about-us-gallery-section:has(> .bpa-local-grass-divider) + .acf-single-service-card-section,
.acf-about-us-gallery-section:has(> .bpa-local-grass-divider) + .acf-services-grid-section,
.wp-block-acf-acf-about-us-gallery-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-about-us-section .acf-about-us-section,
.wp-block-acf-acf-about-us-gallery-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-about-us-explain-section .acf-about-us-explain-section,
.wp-block-acf-acf-about-us-gallery-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-single-service-card-section .acf-single-service-card-section,
.wp-block-acf-acf-about-us-gallery-section:has(.bpa-local-grass-divider) + .wp-block-acf-acf-services-grid-section .acf-services-grid-section {
  margin-block-start: -4px; /* styleguide-exception: cover grass fringe before next section */
}

.acf-about-us-gallery-section:has(+ .acf-about-us-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
.acf-about-us-gallery-section:has(+ .acf-about-us-explain-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
.acf-about-us-gallery-section:has(+ .acf-single-service-card-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
.acf-about-us-gallery-section:has(+ .acf-services-grid-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
.wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-about-us-section) .bpa-local-grass-divider__img,
.wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-about-us-explain-section) .bpa-local-grass-divider__img,
.wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-single-service-card-section) .bpa-local-grass-divider__img,
.wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-services-grid-section) .bpa-local-grass-divider__img {
  margin-block-end: -4px; /* styleguide-exception: seam cover before next section */
}

.acf-about-us-gallery-section--has-bottom-wave .acf-about-us-gallery-section__inner {
  padding-block-end: var(--space-xl);
}

@media (min-width: 640px) {
  .acf-about-us-gallery-section__grid {
    gap: var(--space-lg);
  }

  .acf-about-us-gallery-section__grid--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Tablet — 2 cols until desktop (faq-media / services-grid handoff). */
  .acf-about-us-gallery-section__grid--cols-3,
  .acf-about-us-gallery-section__grid--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .acf-about-us-gallery-section__grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .acf-about-us-gallery-section__grid--cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .acf-about-us-gallery-section__grid--cols-3,
  .acf-about-us-gallery-section__grid--cols-4 {
    gap: var(--space-xl);
  }
}

@media (max-width: 1023px) {
  .acf-about-us-gallery-section .acf-about-us-gallery-section__heading,
  .acf-about-us-gallery-section__intro {
    max-inline-size: none;
  }

  .acf-about-us-gallery-section__body {
    padding-inline: var(--spacing-12);
  }

  .acf-about-us-gallery-section__wave--bottom {
    margin-inline: calc(-1 * var(--spacing-12));
    inline-size: calc(100% + (2 * var(--spacing-12)));
  }

  .acf-about-us-gallery-section__inner {
    padding-block: var(--space-lg) var(--space-xl);
  }
}

@media (max-width: 768px) {
  .acf-about-us-gallery-section .acf-about-us-gallery-section__heading {
    font-size: var(--font-size-3xl);
    line-height: var(--line-height-tight);
  }
}

@media (max-width: 639px) {
  .acf-about-us-gallery-section__body {
    padding-inline: var(--space-sm);
  }

  .acf-about-us-gallery-section__inner {
    padding-block: var(--space-lg) var(--space-xl);
  }

  .acf-about-us-gallery-section__wave--bottom {
    margin-inline: calc(-1 * var(--space-sm));
    inline-size: calc(100% + (2 * var(--space-sm)));
  }

  .acf-about-us-gallery-section:has(+ .acf-about-us-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
  .acf-about-us-gallery-section:has(+ .acf-single-service-card-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
  .acf-about-us-gallery-section:has(+ .acf-services-grid-section) > .bpa-local-grass-divider .bpa-local-grass-divider__img,
  .wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-about-us-section) .bpa-local-grass-divider__img,
  .wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-single-service-card-section) .bpa-local-grass-divider__img,
  .wp-block-acf-acf-about-us-gallery-section:has(+ .wp-block-acf-acf-services-grid-section) .bpa-local-grass-divider__img {
    margin-block-end: -6px; /* styleguide-exception: tighter mobile grass seam */
  }
}
