/* =====================================================================
   widget-safezone.css — Cosmos Immigration · 2026-05-05
   Drops in via: <link rel="stylesheet" href="css/widget-safezone.css">
   Place AFTER style.css so it overrides.
   ---------------------------------------------------------------------
   Goal: Keep the GHL "Get Connected" widget AND Sophia chat (per Jafar
   2026-05-05 — do not disable). Make the page mobile-friendly so the
   widget never blocks the primary CTA on any viewport.
   ===================================================================== */

:root {
  /* Widget reserves bottom-right ~80x80 desktop, ~64x64 mobile.
     We add 16px buffer per side. Adjust these two if GHL widget size changes. */
  --widget-reserve-w: 100px;
  --widget-reserve-h: 96px;
  --widget-reserve-mobile-h: 80px;
}

/* ------------------------------------------------------------------
   1. Bottom safe-zone — global page padding so nothing critical
      can hide behind the floating widget on any viewport.
   ------------------------------------------------------------------ */
body {
  padding-bottom: var(--widget-reserve-h);
}
@media (max-width: 768px) {
  body {
    padding-bottom: var(--widget-reserve-mobile-h);
  }
}

/* Footer needs the same so the bottom of the footer
   never collides with the widget. */
footer,
.footer,
#footer {
  padding-bottom: calc(var(--widget-reserve-h) + 8px);
}
@media (max-width: 768px) {
  footer, .footer, #footer {
    padding-bottom: calc(var(--widget-reserve-mobile-h) + 8px);
  }
}

/* ------------------------------------------------------------------
   2. Fixed mobile CTA bar — pinned to the bottom of the viewport on
      mobile so the primary CTA is always visible without colliding
      with the widget. The bar sits ABOVE the widget reserve.
   ------------------------------------------------------------------ */
.ci-mobile-cta-bar {
  display: none;
}
@media (max-width: 768px) {
  .ci-mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: var(--widget-reserve-w);   /* leaves room for the widget */
    bottom: 0;
    z-index: 1000;                     /* above content, below GHL widget z-index */
    padding: 10px 12px;
    background: rgba(15, 25, 34, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(245, 239, 230, 0.08);
    align-items: center;
    gap: 10px;
  }
  .ci-mobile-cta-bar a.btn-primary,
  .ci-mobile-cta-bar a.cta-amber {
    flex: 1;
    text-align: center;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    background: #f5b942;          /* amber */
    color: #0f1922;
    border-radius: 6px;
    text-decoration: none;
    line-height: 1;
  }
  .ci-mobile-cta-bar a.btn-ghost1,
  .ci-mobile-cta-bar a.cta-ghost {
    flex: 0 0 auto;
    text-align: center;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: #f5efe6;
    border: 1px solid rgba(245, 239, 230, 0.35);
    border-radius: 6px;
    text-decoration: none;
    line-height: 1;
  }
}

/* ------------------------------------------------------------------
   3. Hero — sentence case + mobile-friendly font sizing
      (legacy CSS used uppercase/large desktop sizes that don't fit
      375px viewports.)
   ------------------------------------------------------------------ */
.banner h1,
#answer-strip h1 {
  text-transform: none !important;     /* sentence case, NOT all caps */
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  /* Fluid type — never bigger than 56px, never smaller than 30px */
  font-size: clamp(1.875rem, 5vw + 1rem, 3.5rem);
  margin-bottom: 16px;
}

/* Amber accent on the "honest answer" span — drop a span around the
   words you want emphasised in PHP: "even when it's <span class='accent'>"don't apply yet"</span>" */
.banner h1 .accent,
#answer-strip h1 .accent {
  color: #f5b942;
  font-style: italic;
  font-weight: 600;
}

.banner .hero-subhead,
#answer-strip .hero-subhead {
  font-size: clamp(0.95rem, 1.2vw + 0.6rem, 1.125rem);
  line-height: 1.55;
  max-width: 640px;
  color: rgba(245, 239, 230, 0.85);
  margin-bottom: 20px;
}

/* ------------------------------------------------------------------
   4. Stat pills — replace the dark-paragraph block with 3 isolated units
   ------------------------------------------------------------------ */
.ci-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 22px;
}
.ci-stat-pills .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #f5efe6;
  background: rgba(245, 239, 230, 0.08);
  border: 1px solid rgba(245, 239, 230, 0.18);
  border-radius: 999px;
  white-space: nowrap;
}
.ci-stat-pills .pill .num {
  color: #f5b942;
  font-weight: 700;
}
@media (max-width: 480px) {
  .ci-stat-pills .pill {
    font-size: 12px;
    padding: 7px 11px;
  }
}

/* ------------------------------------------------------------------
   5. Press strip — 40px band below nav
   ------------------------------------------------------------------ */
.ci-press-strip {
  position: relative;
  z-index: 5;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 20px;
  background: #0f1922;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
  font-size: 12px;
  color: rgba(245, 239, 230, 0.65);
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ci-press-strip::-webkit-scrollbar { display: none; }
.ci-press-strip .label {
  font-weight: 500;
  color: rgba(245, 239, 230, 0.55);
}
.ci-press-strip a.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: #f5efe6;
  text-decoration: none;
  filter: grayscale(1) brightness(0.95);
  transition: filter 200ms ease, color 200ms ease;
}
.ci-press-strip a.logo:hover {
  filter: grayscale(0) brightness(1);
}
.ci-press-strip .sep {
  color: rgba(245, 239, 230, 0.3);
}
.ci-press-strip .count {
  color: rgba(245, 239, 230, 0.75);
}

/* ------------------------------------------------------------------
   6. CTA buttons — consistent amber + accessible tap targets
   ------------------------------------------------------------------ */
.btn-primary,
.cta-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;             /* iOS HIG minimum */
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #0f1922 !important;
  background: #f5b942 !important;
  border-radius: 6px;
  text-decoration: none;
  transition: background 200ms ease, transform 150ms ease;
}
.btn-primary:hover,
.cta-amber:hover {
  background: #e8aa30 !important;
  transform: translateY(-1px);
}
.btn-ghost1,
.cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 500;
  color: #f5efe6 !important;
  background: transparent !important;
  border: 1px solid rgba(245, 239, 230, 0.35);
  border-radius: 6px;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease;
}
.btn-ghost1:hover,
.cta-ghost:hover {
  background: rgba(245, 239, 230, 0.08) !important;
  border-color: rgba(245, 239, 230, 0.6);
}

/* WhatsApp green-dot tertiary CTA */
.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 14px;
  color: #f5efe6;
  text-decoration: none;
}
.cta-whatsapp::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  animation: ci-pulse 1.6s ease-in-out infinite;
}
@keyframes ci-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); }
}

/* ------------------------------------------------------------------
   7. Trust tokens — small pills under the hero CTAs
   ------------------------------------------------------------------ */
.ci-trust-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 18px;
  font-size: 11px;
  color: rgba(245, 239, 230, 0.6);
  letter-spacing: 0.04em;
}
.ci-trust-tokens .dot {
  color: rgba(245, 239, 230, 0.3);
}

/* ------------------------------------------------------------------
   8. Bottom credential bar (inside hero, below content)
   ------------------------------------------------------------------ */
.ci-credential-bar {
  margin-top: 22px;
  padding: 12px 14px;
  background: rgba(245, 239, 230, 0.05);
  border: 1px solid rgba(245, 239, 230, 0.1);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(245, 239, 230, 0.65);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ------------------------------------------------------------------
   9. Sticky nav — solid dark after 80px scroll
   ------------------------------------------------------------------ */
header.scrolled,
.site-header.scrolled,
nav.scrolled {
  background: #0f1922 !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
  transition: background 200ms ease;
}

/* ------------------------------------------------------------------
   10. Reduced motion — disable pulses + counter animations
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------------
   11. Z-index ladder — keep widget above content but below modals
   ------------------------------------------------------------------ */
.ci-mobile-cta-bar { z-index: 1000; }
/* GHL widget typically sits at z-index 2147483647 — leave it. */

/* ------------------------------------------------------------------
   12. Hide ALL CAPS treatments on legacy hero lines
       (existing style.css uses text-transform:uppercase in a few places)
   ------------------------------------------------------------------ */
.banner h1,
.banner h2,
#answer-strip h1,
#answer-strip h2,
.hero-subhead,
.bnn_cnt_wrp h1,
.bnn_cnt_wrp .hero-subhead {
  text-transform: none !important;
}

/* 3.3 CTA pulse ring (2026-05-06) */
.btn-primary, .cta-amber { position: relative; }
.btn-primary::after, .cta-amber::after {
  content: ''; position: absolute; inset: -4px; border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(245, 185, 66, 0.55);
  animation: ci-cta-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes ci-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 185, 66, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(245, 185, 66, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after, .cta-amber::after { animation: none; }
}
