/* ==========================================================================
   OL Glass CTA — module.css
   2026 OneLife Theme
   Figma: Onelife-Website nodes 973:24996 (card right) / 973:24786 (card left)
   Full-width background photo + dark overlay + frosted glass card with
   centered heading, body text, and CTA button(s). Card flips left/right.
   ========================================================================== */


/* ==========================================================================
   CSS Custom Properties (per-instance overrides via inline <style>)
   ========================================================================== */

.ol-gcta {
  --ol-gcta-heading-color: #FFFFFF;
  --ol-gcta-body-color:    #FFFFFF;
  --ol-gcta-btn-bg:        #FFFFFF;
  --ol-gcta-btn-color:     #000000;
  --ol-gcta-btn2-bg:       #EC762F;
  --ol-gcta-btn2-color:    #FFFFFF;
  --ol-gcta-card-bg:       rgba(255, 255, 255, 0.35);
  --ol-gcta-card-max-w:    522px;
  --ol-gcta-pt:            120px;
  --ol-gcta-pb:            120px;
  /* --ol-gcta-min-h only written when field > 0 */
}


/* ==========================================================================
   Section — full-width background only
   ========================================================================== */

.ol-gcta {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #000000;
  overflow: hidden;
  isolation: isolate;
  min-height: var(--ol-gcta-min-h, 0px);
}

/* Background media + carousel slides */
.ol-gcta__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ol-gcta__slides {
  position: absolute;
  inset: 0;
}

.ol-gcta__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center; /* overridden inline per-slide / single-image focal */
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
}

.ol-gcta__slide.is-active {
  opacity: 1;
}

/* Single slide (or legacy): always visible, no fade setup needed */
.ol-gcta:not(.ol-gcta--carousel) .ol-gcta__slide {
  opacity: 1;
  transition: none;
}

.ol-gcta__overlay {
  position: absolute;
  inset: 0;
  background-color: #000000;
  z-index: 1;
}

/* Carousel dots */
.ol-gcta__dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ol-gcta__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.ol-gcta__dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.ol-gcta__dot.is-active {
  width: 24px;
  border-radius: 4px;
  background: #FFFFFF;
}

.ol-gcta__dot:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}


/* ==========================================================================
   Inner — 2000px cap, side padding, card alignment
   ========================================================================== */

.ol-gcta__inner {
  position: relative;
  display: flex;
  align-items: center; /* vertically center the card */
  /* justify-content set inline from Layout > Card Side */
  flex: 1 1 auto; /* fill section min-height so centering has room */
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  padding: var(--ol-gcta-pt) 80px var(--ol-gcta-pb);
  box-sizing: border-box;
  z-index: 2;
}


/* ==========================================================================
   Glass card
   ========================================================================== */

.ol-gcta__card {
  display: flex;
  flex-direction: column;
  gap: 24px; /* heading→body gap; button row adds margin to reach the 40px design gap */
  width: 100%;
  max-width: var(--ol-gcta-card-max-w);
  padding: 32px 40px;
  box-sizing: border-box;
  background-color: var(--ol-gcta-card-bg);
  border: 0.5px solid #FFFFFF;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Fallback when backdrop-filter is unsupported — darken the card so text stays readable */
@supports not ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .ol-gcta__card {
    background-color: rgba(30, 30, 30, 0.75);
  }
}


/* ==========================================================================
   Text
   ========================================================================== */

.ol-gcta__heading {
  margin: 0;
  font-family: 'Rubik', sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 44px;
  text-align: center; /* overridden by --align-* modifiers */
  color: var(--ol-gcta-heading-color);
  word-break: break-word;
  white-space: pre-line; /* editor line breaks in the text field render as breaks */
}

.ol-gcta__body {
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  text-align: center; /* overridden by --align-* modifiers */
  color: var(--ol-gcta-body-color);
  word-break: break-word;
}

/* Content Alignment (Layout > Content Alignment) */
.ol-gcta--align-left .ol-gcta__heading,
.ol-gcta--align-left .ol-gcta__body {
  text-align: left;
}

.ol-gcta--align-center .ol-gcta__heading,
.ol-gcta--align-center .ol-gcta__body {
  text-align: center;
}

.ol-gcta--align-right .ol-gcta__heading,
.ol-gcta--align-right .ol-gcta__body {
  text-align: right;
}

.ol-gcta--align-left .ol-gcta__btn-row {
  justify-content: flex-start;
}

.ol-gcta--align-center .ol-gcta__btn-row {
  justify-content: center;
}

.ol-gcta--align-right .ol-gcta__btn-row {
  justify-content: flex-end;
}

/* Left/right: size buttons to content so alignment is visible */
.ol-gcta--align-left .ol-gcta__btn,
.ol-gcta--align-right .ol-gcta__btn {
  flex: 0 1 auto;
}

.ol-gcta__body p {
  margin: 0 0 1em;
}

.ol-gcta__body p:last-child {
  margin-bottom: 0;
}

.ol-gcta__body a {
  color: inherit;
  text-decoration: underline;
}

.ol-gcta__body a:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.ol-gcta__btn-row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  margin-top: 16px; /* 24px card gap + 16px = 40px content→CTA gap per design */
}

.ol-gcta__btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  box-sizing: border-box;
  background-color: var(--ol-gcta-btn-bg);
  color: var(--ol-gcta-btn-color);
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ol-gcta__btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.ol-gcta__btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.ol-gcta__btn--2 {
  background-color: var(--ol-gcta-btn2-bg);
  color: var(--ol-gcta-btn2-color);
}


/* ==========================================================================
   Screen-reader only utility
   ========================================================================== */

.ol-gcta-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;
}


/* ==========================================================================
   Responsive — Tablet (max 1023px)
   ========================================================================== */

@media (max-width: 1023px) {
  .ol-gcta__inner {
    padding-left: 48px;
    padding-right: 48px;
  }
}


/* ==========================================================================
   Responsive — Mobile (max 767px)
   ========================================================================== */

@media (max-width: 767px) {
  .ol-gcta__inner {
    padding: 64px 24px;
  }

  .ol-gcta__card {
    max-width: 100%;
    padding: 28px 24px;
    gap: 20px;
  }

  .ol-gcta__heading {
    font-size: 28px;
    line-height: 36px;
  }

  .ol-gcta__btn-row {
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
  }

  .ol-gcta__btn {
    flex: none;
    width: 100%;
  }
}


/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ol-gcta__btn {
    transition: none;
  }

  .ol-gcta__btn:hover {
    transform: none;
  }

  .ol-gcta__slide {
    transition: none;
  }
}
