/**
 * Hero V3
 * Split two-column layout: text left, rounded image right.
 * Light background — no video.
 */

/* Strip Elementor container padding so the widget manages its own X gutters. */
.elementor-column
  > .elementor-element-populated:has(.elementor-widget-agency-hero-v3),
.e-con:has(> .e-con-inner > .elementor-widget-agency-hero-v3),
.e-con:has(.elementor-widget-agency-hero-v3) {
  --padding-top: 0px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  padding: 0 !important;
}

.elementor-section:has(.elementor-widget-agency-hero-v3),
.elementor-section:has(.elementor-widget-agency-hero-v3) > .elementor-container,
.e-con:has(.elementor-widget-agency-hero-v3) {
  max-width: 100% !important;
  width: 100% !important;
}

/* ── Brand tokens ────────────────────────────────────────────────────────── */
.aew-hev3 {
  --aew-hev3-bg:         var(--aew-color-cream, #F8F5F1);
  --aew-hev3-text:       var(--aew-color-blue-dark, #252F37);
  --aew-hev3-cta:        var(--aew-color-yellow, #EBC543);
  --aew-hev3-cta-hover:  color-mix(in srgb, var(--aew-color-yellow, #EBC543) 80%, #000);
}

.aew-hev3 *,
.aew-hev3 *::before,
.aew-hev3 *::after {
  box-sizing: border-box;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.aew-hev3 {
  background-color: var(--aew-hev3-bg);
  width: 100%;
}

/* ── Inner wrapper (max-width rail + X gutter) ───────────────────────────── */
.aew-hev3__inner {
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Left column: text content ───────────────────────────────────────────── */
.aew-hev3__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* ── Right column: image ─────────────────────────────────────────────────── */
.aew-hev3__image-col {
  flex: 1;
  min-width: 0;
  /* Stretch to the full row height and let the image fill it (flex child so
     height:100% resolves reliably across browsers). */
  align-self: stretch;
  display: flex;
}

.aew-hev3__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  flex: 1;
  border-radius: 16px;
  object-fit: cover;
  object-position: center;
}

/* ── Eyebrow ─────────────────────────────────────────────────────────────── */
.aew-hev3__eyebrow {
  margin: 0;
  color: var(--aew-hev3-text);
  font-family: var(--aew-font-body, 'Poppins', sans-serif);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── Headline ────────────────────────────────────────────────────────────── */
/* font-size owned by headline_typo control (d64 / t48 / m32) */
.aew-hev3__headline {
  margin: 0;
  color: var(--aew-hev3-text);
  font-family: var(--aew-font-heading, 'DM Serif Display', Georgia, serif);
  font-weight: 400;
  line-height: 1.05;
}

/* ── Description ─────────────────────────────────────────────────────────── */
/* font-size owned by description_typo control (d18 / t14 / m14) */
.aew-hev3__description {
  margin: 0;
  color: var(--aew-hev3-text);
  font-family: var(--aew-font-body, 'Poppins', sans-serif);
  font-weight: 400;
  line-height: 1.55;
  max-width: 520px;
}

/* ── Button ──────────────────────────────────────────────────────────────── */
.aew-hev3__buttons {
  margin-top: 4px;
}

.aew-hev3__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--aew-font-body, 'Poppins', sans-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  padding: 16px 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
  background-color: var(--aew-hev3-btn-bg, var(--aew-hev3-cta));
  color: var(--aew-hev3-btn-color, var(--aew-hev3-text));
}

.aew-hev3__btn:hover,
.aew-hev3__btn:focus-visible {
  background-color: var(--aew-hev3-btn-bg-hover, var(--aew-hev3-cta-hover));
  color: var(--aew-hev3-btn-color-hover, var(--aew-hev3-text));
  outline: none;
}

/* ── Social proof ────────────────────────────────────────────────────────── */
.aew-hev3__social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.aew-hev3__avatars {
  display: flex;
  align-items: center;
  flex: none;
}

.aew-hev3__avatar-frame {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--aew-hev3-bg);
  background: #ddd;
  flex: none;
}

.aew-hev3__avatar-frame + .aew-hev3__avatar-frame {
  margin-left: -16px;
}

.aew-hev3__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aew-hev3__rating {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.aew-hev3__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #F3C400;
  line-height: 0;
}

.aew-hev3__star {
  display: block;
  width: 16px;
  height: 16px;
}

.aew-hev3__social-text {
  margin: 0;
  color: var(--aew-hev3-text);
  font-family: var(--aew-font-body, 'Poppins', sans-serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

/* ── Responsive: tablet ──────────────────────────────────────────────────── */
/* ── Tablet & mobile (≤1024px): stack — image on top, content as a rounded
   card tucked under the image edge. ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .aew-hev3 {
    /* Let the card overlap the image edge without clipping. */
    overflow: hidden;
  }

  .aew-hev3__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
  }

  /* Image on top, full width, no side gutter. */
  .aew-hev3__image-col {
    order: 1;
    width: 100%;
    align-self: stretch;
  }
  .aew-hev3__image {
    width: 100%;
    height: auto;
    min-height: 280px;
    max-height: 420px;
    border-radius: 0;
    object-fit: cover;
  }

  /* Content becomes a rounded cream card that overlaps up over the image
     bottom. A small side gutter (via inline margin) pulls the card in from the
     screen edges so its rounded top corners are actually visible against the
     image — an edge-to-edge card would round "off screen" and read as a
     straight line. */
  .aew-hev3__content {
    order: 2;
    width: auto;
    align-items: flex-start;
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * var(--aew-hev3-card-overlap, 40px));
    margin-left: var(--aew-hev3-card-gutter, 16px);
    margin-right: var(--aew-hev3-card-gutter, 16px);
    padding: 32px 24px 40px;
    background-color: var(--aew-hev3-bg, #f8f5f1);
    border-radius: var(--aew-hev3-card-radius, 20px);
  }

  /* headline font-size owned by headline_typo control */

  .aew-hev3__description {
    /* font-size owned by description_typo control */
    max-width: 100%;
  }
}

/* ── Mobile (≤768px): same stacked card as tablet, tuned sizes. ──────────── */
@media (max-width: 768px) {
  .aew-hev3__image {
    max-height: 360px;
  }

  .aew-hev3__headline {
    /* font-size owned by headline_typo control */
    line-height: 1.1;
  }

  .aew-hev3__description {
    /* font-size owned by description_typo control */
    max-width: 100%;
  }

  .aew-hev3__btn {
    width: 100%;
    justify-content: center;
  }

  .aew-hev3__social {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
