{%- import '../../css/variable/_variables.css' -%}

{# =============================================
   CTA Section — RoamGuard Theme
   Node: 15695-1750
   Full button groups for both CTAs
   Mobile-first: base → mobilept → md → lg → xl
   ============================================= #}

{# ── Annotation padding utilities ── #}
.pt-lg-65   { padding-top: 40px; }
.pb-lg-65   { padding-bottom: 40px; }
.pt-md-40   { padding-top: 40px; }
.pb-md-40   { padding-bottom: 40px; }
.mobilept-30 { padding-top: 30px; }
.mobilepb-30 { padding-bottom: 30px; }
.pt-10  { padding-top: 10px; }
.pt-15  { padding-top: 15px; }

{# ── Card body annotation utilities ── #}
.py-65          { padding-top: 48px; padding-bottom: 48px; }
.px-20          { padding-left: 20px; padding-right: 20px; }
.d-flex         { display: flex; }
.direction-column { flex-direction: column; }


{# ══════════════════════════════════════════════
   CTA CARD — rounded banner with bg image
   ══════════════════════════════════════════════ #}
.cta-section__card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  width: 100%;
}

{# Background image fills the card #}
.cta-section__card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-section__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

{# Dark overlay — rgba controlled via scoped HubL style block #}
.cta-section__card-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
}


{# ══════════════════════════════════════════════
   CARD BODY — content above overlay
   annotation: py-65 px-20 d-flex direction-column
   ══════════════════════════════════════════════ #}
.cta-section__card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 48px 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}


{# ══════════════════════════════════════════════
   HEADING + BODY COPY
   ══════════════════════════════════════════════ #}
.cta-section__heading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

{# H2 inherits heading field color (white) — override via heading_color field #}
.cta-section__heading-wrap h2 {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
  text-align: center;
}

.cta-section__body p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}


{# ══════════════════════════════════════════════
   BUTTON ROW — two CTAs side by side
   Both rendered via macros.render_button()
   annotation: pt-15
   ══════════════════════════════════════════════ #}
.cta-section__btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  width: 100%;
}

{# Each button wrapper — annotation: pt-10 #}
.cta-section__btn-wrap {
  display: inline-flex;
}

{# macros.render_button() renders inside .cta-section__btn-wrap
   The macro outputs a <a> or <button> with class="cta-btn {style} {size}"
   These are already styled globally via _buttons.css + _base_component.css
   Only need overrides specific to this section context ── #}

{# Ensure buttons keep their pill radius in this context #}
.cta-section__btn-row .cta-btn {
  border-radius: 32px;
}

{# btn1 (primary) — orange #FF6631 #}
.cta-section__btn-row .cta-btn.btn1 {
  background-color: ;
  color: #ffffff;
}

.cta-section__btn-row .cta-btn.btn1:hover {
  opacity: 0.88;
  color: #ffffff;
}

{# btn2 (secondary) — uses override_button_style colours from btn_style_group
   The macro inlines scoped CSS for override colours automatically via render_button() #}

{# Accent variant (when override_button_style is off but style=btn-accent exists) #}
.cta-section__btn-row .cta-btn.btn-accent {
  background-color: ;
  color: ;
}

.cta-section__btn-row .cta-btn.btn-accent:hover {
  opacity: 0.88;
  color: ;
}


{# ══════════════════════════════════════════════════════════
   MOBILE  (max-width: 767px)
   ══════════════════════════════════════════════════════════ #}
@media (max-width: 767px) {
  .cta-section__card {
    border-radius: 16px;
  }

  .cta-section__card-body {
    padding: 40px 20px;
    gap: 20px;
  }

  .cta-section__heading-wrap h2 {
    font-size: 24px;
    line-height: 1.3;
  }

  .cta-section__body p {
    font-size: 15px;
  }

  .cta-section__btn-row {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .cta-section__btn-wrap,
  .cta-section__btn-wrap .cta-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}


{# ══════════════════════════════════════════════════════════
   TABLET  (min-width: 768px)
   ══════════════════════════════════════════════════════════ #}
@media (min-width: 768px) {
  .cta-section__card-body {
    padding: 56px 32px;
    gap: 24px;
  }

  .cta-section__heading-wrap h2 {
    font-size: 34px;
  }

  .cta-section__body p {
    font-size: 18px;
  }

  .cta-section__btn-row {
    flex-direction: row;
    gap: 0;
  }
}


{# ══════════════════════════════════════════════════════════
   LG  (min-width: 992px)
   ══════════════════════════════════════════════════════════ #}
@media (min-width: 992px) {
  .pt-lg-65 { padding-top: 65px; }
  .pb-lg-65 { padding-bottom: 65px; }

  .cta-section__card {
    border-radius: 24px;
  }

  .cta-section__card-body {
    padding: 65px 20px;
  }

  .cta-section__heading-wrap h2 {
    font-size: 38px;
  }
}


{# ══════════════════════════════════════════════════════════
   XL  (min-width: 1200px)
   ══════════════════════════════════════════════════════════ #}
@media (min-width: 1200px) {
  .cta-section__heading-wrap h2 {
    font-size: 42px;
    line-height: 50px;
  }

  .cta-section__body p {
    font-size: 20px;
    line-height: 28px;
  }
}
