/* ==========================================================================
   About Section widget
   ========================================================================== */

.hb-about-section {
  --hb-aw-title-size: var(--hb-aw-title-size-desktop, unset);
  --hb-aw-description-size: var(--hb-aw-description-size-desktop, unset);
  --hb-aw-eyebrow-size: var(--hb-aw-eyebrow-size-desktop, unset);
  --hb-aw-quote-size: var(--hb-aw-quote-size-desktop, unset);
  width: 100%;
  padding: var(--hb-aw-padding-y, 64px) 0;
  background: var(--hb-aw-bg, #faf7f2);
}

/* --------------------------------------------------------------------------
   Two-column inner grid
   -------------------------------------------------------------------------- */

.hb-about-section__inner {
  width: min(100%, var(--hb-aw-max-width, 1200px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--hb-aw-image-col, 50%) 1fr;
  gap: var(--hb-aw-column-gap, 48px);
  align-items: center;
}

/* Image on the right — swap column order */
.hb-about-section--image-right .hb-about-section__media-wrap {
  order: 2;
}

.hb-about-section--image-right .hb-about-section__content {
  order: 1;
}

/* No image — full-width content */
.hb-about-section--no-media .hb-about-section__inner {
  grid-template-columns: 1fr;
}

/* --------------------------------------------------------------------------
   Media column — wrap (frame) + inner (overflow clip + overlay)
   -------------------------------------------------------------------------- */

.hb-about-section__media-wrap {
  position: relative;
  /* Provide stacking context so the frame ::before sits behind the image */
  isolation: isolate;
}

.hb-about-section__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--hb-aw-image-radius, 16px);
  aspect-ratio: var(--hb-aw-image-aspect, 4 / 5);
}

.hb-about-section__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Colour overlay */
.hb-about-section--has-overlay .hb-about-section__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hb-aw-overlay-color, #ba8e96);
  opacity: var(--hb-aw-overlay-opacity, 0.3);
  pointer-events: none;
  border-radius: inherit;
}

/* Decorative offset frame */
.hb-about-section--has-frame .hb-about-section__media-wrap::before {
  content: "";
  position: absolute;
  /* offset down-left behind the image for image-left layout */
  inset: var(--hb-aw-frame-offset, 14px)
    calc(-1 * var(--hb-aw-frame-offset, 14px))
    calc(-1 * var(--hb-aw-frame-offset, 14px)) var(--hb-aw-frame-offset, 14px);
  border: 2px solid var(--hb-aw-frame-color, #d4a0a8);
  border-radius: calc(var(--hb-aw-image-radius, 16px) + 2px);
  z-index: -1;
  pointer-events: none;
}

/* Mirror frame offset for image-right layout */
.hb-about-section--image-right.hb-about-section--has-frame
  .hb-about-section__media-wrap::before {
  inset: var(--hb-aw-frame-offset, 14px) var(--hb-aw-frame-offset, 14px)
    calc(-1 * var(--hb-aw-frame-offset, 14px))
    calc(-1 * var(--hb-aw-frame-offset, 14px));
}

/* --------------------------------------------------------------------------
   Content column
   -------------------------------------------------------------------------- */

.hb-about-section__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hb-about-section--align-center .hb-about-section__content {
  text-align: center;
  align-items: center;
}

/* Eyebrow pill */
.hb-about-section__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: var(--hb-aw-pill-radius, 999px);
  font-size: var(--hb-aw-eyebrow-size, 0.74rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--hb-aw-pill-bg, #f1dfe1);
  color: var(--hb-aw-pill-color, #7f4f5b);
}

/* Heading */
.hb-about-section__heading {
  margin: 0;
  font-size: var(--hb-aw-title-size, clamp(1.75rem, 3vw, 2.75rem));
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--hb-aw-title-color, #2f2428);
}

/* Intro paragraph */
.hb-about-section__description {
  margin: 0;
  font-size: var(--hb-aw-description-size, 1rem);
  line-height: 1.72;
  color: var(--hb-aw-description-color, #5a4b50);
}

.hb-about-section--align-center .hb-about-section__description {
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* Second paragraph */
.hb-about-section__body {
  margin: 0;
  font-size: var(--hb-aw-description-size, 1rem);
  line-height: 1.72;
  color: var(--hb-aw-description-color, #5a4b50);
}

.hb-about-section--align-center .hb-about-section__body {
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Quote block
   -------------------------------------------------------------------------- */

.hb-about-section__quote {
  margin: 4px 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--hb-aw-quote-accent, #c2939c);
  border-right: none;
}

.hb-about-section--align-center .hb-about-section__quote {
  padding: 0;
  border-left: none;
  border-top: 2px solid var(--hb-aw-quote-accent, #c2939c);
  padding-top: 16px;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.hb-about-section__quote-text {
  margin: 0;
  font-style: italic;
  font-size: var(--hb-aw-quote-size, clamp(1rem, 1.6vw, 1.2rem));
  line-height: 1.6;
  color: var(--hb-aw-quote-color, #2f2428);
}

.hb-about-section__quote-cite {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hb-aw-quote-accent, #c2939c);
}

/* --------------------------------------------------------------------------
   Credentials
   -------------------------------------------------------------------------- */

.hb-about-section__credentials {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hb-aw-credentials-color, #8f6b74);
}

.hb-about-section__credentials::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 1px;
  background: currentColor;
  margin-right: 8px;
  margin-bottom: 1px;
}

.hb-about-section--align-center .hb-about-section__credentials::before {
  display: none;
}

/* --------------------------------------------------------------------------
   Signature
   -------------------------------------------------------------------------- */

.hb-about-section__signature {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--hb-aw-signature-color, #4a3438);
}

/* --------------------------------------------------------------------------
   Social links
   -------------------------------------------------------------------------- */

.hb-about-section__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.hb-about-section--align-center .hb-about-section__social {
  justify-content: center;
}

.hb-about-section__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--hb-aw-social-color, #8f6b74);
  border: 1.5px solid currentColor;
  text-decoration: none;
  font-size: 0.9rem;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.hb-about-section__social-link:hover,
.hb-about-section__social-link:focus-visible {
  background: var(--hb-aw-social-color, #8f6b74);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   CTA button
   -------------------------------------------------------------------------- */

.hb-about-section__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 4px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--hb-aw-btn-bg, #8f6b74);
  color: var(--hb-aw-btn-color, #ffffff);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.hb-about-section--align-center .hb-about-section__cta {
  align-self: center;
}

@media (prefers-reduced-motion: no-preference) {
  .hb-about-section__cta:hover,
  .hb-about-section__cta:focus-visible {
    transform: translateY(-1px);
  }
}

.hb-about-section__cta--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hb-about-section--has-btn-hover .hb-about-section__cta:hover,
.hb-about-section--has-btn-hover .hb-about-section__cta:focus-visible {
  background: var(--hb-aw-btn-bg-hover, var(--hb-aw-btn-bg, #8f6b74));
  color: var(--hb-aw-btn-color-hover, var(--hb-aw-btn-color, #ffffff));
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hb-about-section {
    --hb-aw-title-size: var(
      --hb-aw-title-size-tablet,
      var(--hb-aw-title-size-desktop, unset)
    );
    --hb-aw-description-size: var(
      --hb-aw-description-size-tablet,
      var(--hb-aw-description-size-desktop, unset)
    );
    --hb-aw-eyebrow-size: var(
      --hb-aw-eyebrow-size-tablet,
      var(--hb-aw-eyebrow-size-desktop, unset)
    );
    --hb-aw-quote-size: var(
      --hb-aw-quote-size-tablet,
      var(--hb-aw-quote-size-desktop, unset)
    );
    padding: calc(var(--hb-aw-padding-y, 64px) * 0.8) 0;
  }

  .hb-about-section__inner {
    gap: calc(var(--hb-aw-column-gap, 48px) * 0.75);
  }
}

@media (max-width: 767px) {
  .hb-about-section {
    --hb-aw-title-size: var(
      --hb-aw-title-size-mobile,
      var(--hb-aw-title-size-tablet, unset)
    );
    --hb-aw-description-size: var(
      --hb-aw-description-size-mobile,
      var(--hb-aw-description-size-tablet, unset)
    );
    --hb-aw-eyebrow-size: var(
      --hb-aw-eyebrow-size-mobile,
      var(--hb-aw-eyebrow-size-tablet, unset)
    );
    --hb-aw-quote-size: var(
      --hb-aw-quote-size-mobile,
      var(--hb-aw-quote-size-tablet, unset)
    );
    padding: calc(var(--hb-aw-padding-y, 64px) * 0.66) 0;
  }

  /* Stack to single column — image always on top regardless of left/right setting */
  .hb-about-section__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hb-about-section--image-right .hb-about-section__media-wrap,
  .hb-about-section--image-right .hb-about-section__content {
    order: unset;
  }

  /* Remove frame on mobile to avoid overflow issues */
  .hb-about-section--has-frame .hb-about-section__media-wrap::before {
    display: none;
  }

  .hb-about-section__eyebrow {
    padding: 6px 12px;
  }

  .hb-about-section__cta {
    align-self: flex-start;
  }
}
