.ahec-section,
.ahec-section *,
.ahec-section *::before,
.ahec-section *::after {
  box-sizing: border-box;
}

.ahec-section {
  --ahec-gold: var(--gold, #b58a54);
  --ahec-latte: var(--latte, #d9c3a2);
  --ahec-ink: var(--ink, #37291d);
  --ahec-white: var(--white, #ffffff);
  --ahec-border: rgba(181, 138, 84, 0.22);
  --ahec-text: rgba(55, 41, 29, 0.76);
  --ahec-shadow-copy: 0 18px 44px rgba(47, 36, 24, 0.06);
  --ahec-shadow-gallery: 0 28px 74px rgba(47, 36, 24, 0.13);
  width: 100%;
  margin: 0;
  padding-block: clamp(48px, 5.7vw, 86px);
  color: var(--ahec-ink);
  background: transparent;
  font-family: "Jost", sans-serif;
}

.ahec-shell {
  width: min(100%, 1536px);
  margin-inline: auto;
  padding-inline: clamp(20px, 3.2vw, 48px);
  overflow: visible;
  background: transparent;
}

.ahec-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.64fr) minmax(0, 1.36fr);
  align-items: start;
  gap: clamp(24px, 2.35vw, 40px);
  overflow: visible;
  background: transparent;
}

.ahec-layout--flipped .ahec-grid {
  grid-template-columns: minmax(0, 1.36fr) minmax(280px, 0.64fr);
}

.ahec-layout--flipped .ahec-copy,
.ahec-layout--flipped .ahec-gallery {
  grid-row: 1;
}

.ahec-layout--flipped .ahec-copy {
  grid-column: 2;
}

.ahec-layout--flipped .ahec-gallery {
  grid-column: 1;
}

.ahec-section--gallery-only .ahec-grid {
  grid-template-columns: minmax(0, 1fr);
}

.ahec-copy {
  position: relative;
  align-self: start;
  min-width: 0;
  padding: clamp(24px, 2.2vw, 32px);
  border: 1px solid var(--ahec-border);
  border-radius: var(--radius-card, 18px);
  background: var(--ahec-white);
  box-shadow: var(--ahec-shadow-copy);
}

.ahec-heading {
  max-width: 12ch;
  margin: 0 0 clamp(18px, 1.5vw, 24px);
  color: var(--ahec-gold);
  font-family: var(--font-accent-heading, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(34px, 3.25vw, 52px);
  font-weight: 500;
  line-height: 0.98;
  text-wrap: balance;
}

.ahec-description {
  color: var(--ahec-text);
  font-size: clamp(15px, 1.12vw, 17px);
  font-weight: 400;
  line-height: 1.94;
}

.ahec-description > :first-child {
  margin-top: 0;
}

.ahec-description > :last-child {
  margin-bottom: 0;
}

.ahec-description p {
  margin: 0;
}

.ahec-description p + p {
  margin-top: 1em;
}

.ahec-description a {
  color: inherit;
  text-decoration-color: rgba(181, 138, 84, 0.5);
  text-underline-offset: 0.16em;
}

.ahec-gallery {
  position: relative;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--ahec-border);
  border-radius: var(--radius-gallery, 24px);
  background: var(--ahec-white);
  box-shadow: var(--ahec-shadow-gallery);
  outline: none;
}

.ahec-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.63 / 1;
  overflow: hidden;
  border-radius: var(--radius-media, 12px);
  background: transparent;
  touch-action: pan-y;
}

.ahec-section .ahec-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.36s ease,
    visibility 0.36s ease;
}

.ahec-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ahec-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 24px) / 4);
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  background: transparent;
}

.ahec-thumbs::-webkit-scrollbar {
  display: none;
}

.ahec-thumb {
  position: relative;
  min-width: 0;
  min-height: 44px;
  aspect-ratio: 2.34 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ahec-border);
  border-radius: var(--radius-xs, 6px);
  background: transparent;
  cursor: pointer;
  opacity: 0.58;
  scroll-snap-align: start;
  transition:
    border-color 0.24s ease,
    opacity 0.24s ease,
    transform 0.24s ease;
}

.ahec-section .ahec-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.ahec-thumb.is-active,
.ahec-thumb:hover {
  border-color: var(--ahec-gold);
  opacity: 1;
  transform: translateY(-1px);
}

.ahec-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 12px;
  background: transparent;
}

.ahec-arrow {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(181, 138, 84, 0.42);
  border-radius: 50%;
  background: transparent;
  color: var(--ahec-ink);
  cursor: pointer;
  transition:
    border-color 0.24s ease,
    color 0.24s ease,
    transform 0.24s ease;
}

.ahec-arrow:hover {
  border-color: var(--ahec-gold);
  color: var(--ahec-gold);
  transform: translateY(-1px);
}

.ahec-arrow:disabled {
  cursor: default;
  opacity: 0.36;
  transform: none;
}

.ahec-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ahec-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 78px;
  color: var(--ahec-latte);
}

.ahec-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transition:
    color 0.24s ease,
    transform 0.24s ease;
}

.ahec-dot.is-active {
  color: var(--ahec-gold);
  transform: scale(1.35);
}

.ahec-gallery:focus-visible,
.ahec-thumb:focus-visible,
.ahec-arrow:focus-visible {
  outline: 2px solid var(--ahec-gold);
  outline-offset: 3px;
}

.ahec-section--single-image .ahec-thumbs,
.ahec-section--single-image .ahec-controls {
  display: none;
}

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

.ahec-editor-notice {
  width: 100%;
  padding: 18px;
  border: 1px dashed rgba(181, 138, 84, 0.46);
  color: var(--ink, #37291d);
  background: transparent;
  font-family: "Jost", sans-serif;
  text-align: center;
}

@media (min-width: 1061px) {
  .ahec-copy {
    position: sticky;
    top: var(--ahec-sticky-offset, 106px);
  }
}

@media (max-width: 1060px) {
  .ahec-grid,
  .ahec-layout--flipped .ahec-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ahec-layout--flipped .ahec-copy,
  .ahec-layout--flipped .ahec-gallery {
    grid-column: auto;
    grid-row: auto;
  }

  .ahec-copy {
    position: static;
  }

  .ahec-heading {
    max-width: 18ch;
  }
}

@media (max-width: 760px) {
  .ahec-section {
    padding-block: clamp(38px, 11vw, 62px);
  }

  .ahec-shell {
    padding-inline: 20px;
  }

  .ahec-grid {
    gap: 20px;
  }

  .ahec-copy {
    padding: 22px;
  }

  .ahec-heading {
    max-width: 14ch;
    font-size: clamp(32px, 10vw, 42px);
  }

  .ahec-description {
    font-size: 14px;
    line-height: 1.76;
  }

  .ahec-gallery {
    padding: 8px;
    border-radius: var(--radius-xl, 24px);
  }

  .ahec-stage {
    aspect-ratio: 4 / 3;
  }

  .ahec-thumbs {
    grid-auto-columns: calc((100% - 18px) / 4);
    gap: 6px;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ahec-slide,
  .ahec-thumb,
  .ahec-arrow,
  .ahec-dot {
    transition-duration: 0.01ms !important;
  }

  .ahec-thumb:hover,
  .ahec-arrow:hover,
  .ahec-dot.is-active {
    transform: none;
  }
}
