/* Home Hero CTA Section */

.home-hero-cta {
  position: relative;
  overflow: hidden;
}

/* Hero Image/Video Wrapper */
.home-hero-cta-image-wrapper {
  position: relative;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1023px) {
  .home-hero-cta-image-wrapper--tall {
    min-height: var(--base-height) !important;
  }
}

/* Media (image/video) */
.home-hero-cta-media {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
}

.home-hero-cta-media--cover {
  object-fit: cover;
}

.home-hero-cta-media--contain {
  object-fit: contain;
}

/* Content Overlay */
.home-hero-cta-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
  color: #fff;
}

/* Horizontal Alignment */
.home-hero-cta-content--left {
  align-items: flex-start;
  text-align: left;
}

.home-hero-cta-content--left .home-hero-cta-buttons {
  justify-content: flex-start;
}

.home-hero-cta-content--right {
  align-items: flex-end;
  text-align: right;
}

.home-hero-cta-content--right .home-hero-cta-buttons {
  justify-content: flex-end;
}

/* Vertical Alignment */
.home-hero-cta-content--top {
  justify-content: flex-start;
}

.home-hero-cta-content--bottom {
  justify-content: flex-end;
}

/* Text Justification Overrides */
.home-hero-cta-content--justify-left { text-align: left !important; }
.home-hero-cta-content--justify-left .home-hero-cta-buttons { justify-content: flex-start !important; }

.home-hero-cta-content--justify-center { text-align: center !important; }
.home-hero-cta-content--justify-center .home-hero-cta-buttons { justify-content: center !important; }

.home-hero-cta-content--justify-right { text-align: right !important; }
.home-hero-cta-content--justify-right .home-hero-cta-buttons { justify-content: flex-end !important; }

/* Responsive content padding */
@media (max-width: 767px) {
  .home-hero-cta-content {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }
}

@media (min-width: 768px) {
  .home-hero-cta-content {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .home-hero-cta-content {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }
}

/* Tablet typographic bridge: the heading/subheading sizes are owned by the
   theme heading scale, but the 768–1023 range previously felt small on
   iPad-portrait. Bridge to an intermediate tier without touching ≥1024. */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-hero-cta .home-hero-cta-heading .rte {
    font-size: var(--font-size-4xl);
  }
  .home-hero-cta .home-hero-cta-subheading .rte {
    font-size: var(--font-size-xl);
  }
}

/* Text Container */
.home-hero-cta-text-container {
  width: var(--text-width-mobile, 100%);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .home-hero-cta-text-container {
    width: 100%;
    max-width: var(--text-width-desktop, 770px);
  }
}

/* Heading */
.home-hero-cta-heading .rte h2,
.home-hero-cta-heading .rte :last-child {
  margin: 0;
}

/* Subheading */
.home-hero-cta-subheading .rte :last-child {
  margin: 0;
}

/* Description */
.home-hero-cta-description .rte :last-child {
  margin: 0;
}

/* Buttons */
.home-hero-cta-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.home-hero-cta-button .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Heading/subheading/description are richtext blocks rendered into a .rte
   wrapper. Typography lives on the WRAPPER (editor-safe — the WYSIWYG editor
   cannot strip the wrapper's classes). The inner tag inherits font + color
   from the wrapper so typography survives even after the editor rewrites the
   inner tag to a bare <p> on alignment/format edits. */
.home-hero-cta-heading-text > *,
.home-hero-cta-subheading-text > *,
.home-hero-cta-description-text > * {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0 !important;
}
