/**
 * Prompt 4 — Screen 4 + final mobile homepage consistency
 * Patient Portal · Final CTA · FAQ · Footer · Sticky/chat clearance
 * Light A–Z consistency only; does not rebuild Screens 1–3.
 */

@media (max-width: 767px) {
  /* ========== PATIENT PORTAL ========== */
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal {
    background: #071b46 !important;
    padding: 1.15rem 0.85rem 1.25rem !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(108px, 38%) !important;
    grid-template-areas:
      "copy copy"
      "checklist phone"
      "actions actions" !important;
    gap: 0.7rem 0.55rem !important;
    padding: 1rem 0.85rem 1.05rem !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 18px !important;
    background:
      radial-gradient(circle at 88% 18%, rgba(46, 140, 255, 0.22), transparent 34%),
      linear-gradient(160deg, #0a2a5c 0%, #071b46 55%, #051433 100%) !important;
    box-shadow: 0 12px 28px rgba(2, 12, 36, 0.35) !important;
    overflow: hidden !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__panel::before {
    display: none !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__copy {
    grid-area: copy !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__eyebrow {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #86efac !important;
    font-size: 0.68rem !important;
    min-height: 24px !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal h2,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal h2 span,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal h2 strong {
    color: #fff !important;
    font-size: clamp(1.28rem, 5.4vw, 1.55rem) !important;
    line-height: 1.18 !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal h2 strong {
    color: #7dd3fc !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__subtitle {
    color: rgba(226, 238, 255, 0.88) !important;
    font-size: 0.86rem !important;
    line-height: 1.4 !important;
    max-width: 36ch !important;
    margin-top: 0.45rem !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__self-service,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__trust {
    display: none !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__timeline,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__checklist {
    grid-area: checklist !important;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 0.35rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    align-self: center !important;
    width: 100% !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__step {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.45rem !important;
    padding: 0.2rem 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: start !important;
    min-height: 28px !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__icon,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__check {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #22c55e !important;
    box-shadow: none !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__check svg,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__label {
    color: #f8fbff !important;
    font-size: 0.78rem !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__visual {
    grid-area: phone !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0 !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__blob,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__dots {
    opacity: 0.35 !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__phone {
    width: min(118px, 34vw) !important;
    max-width: 118px !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__screen img,
  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__screen picture img {
    object-fit: cover !important;
    object-position: top center !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__actions {
    grid-area: actions !important;
    gap: 0.55rem !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__quick-ctas {
    display: none !important; /* sticky bar already covers Chat / WA / Call / Upload */
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__cta {
    min-height: 48px !important;
    border-radius: 14px !important;
    background: #16a34a !important;
    color: #fff !important;
    font-size: 0.92rem !important;
    font-weight: 750 !important;
    justify-content: center !important;
  }

  body.page-home.public-home-v2 .hp-track-journey.pub-p2.hp-track-journey--portal .hp-track-journey__actions > p {
    color: rgba(220, 235, 250, 0.72) !important;
    font-size: 0.72rem !important;
    text-align: center !important;
    margin: 0 !important;
  }

  /* ========== FINAL CTA ========== */
  body.page-home.public-home-v2 .ilj-fcta.pub-p3 {
    background: linear-gradient(180deg, #12407a 0%, #1d4ed8 55%, #1e40af 100%) !important;
    padding: 1.35rem 0.9rem 1.45rem !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__wrap {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__title,
  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__title * {
    color: #fff !important;
    text-align: center !important;
    font-size: clamp(1.35rem, 5.5vw, 1.65rem) !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__title em {
    color: #bbf7d0 !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__lead {
    color: rgba(235, 242, 255, 0.9) !important;
    text-align: center !important;
    margin-inline: auto !important;
    max-width: 34ch !important;
    font-size: 0.9rem !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__actions {
    display: grid !important;
    gap: 0.7rem !important;
    margin-top: 1rem !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__btn {
    min-height: 54px !important;
    border-radius: 14px !important;
    font-size: 0.98rem !important;
    font-weight: 750 !important;
    gap: 0.55rem !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__btn--cb {
    background: #16a34a !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.28) !important;
    border: 0 !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__btn--chat {
    background: #fff !important;
    color: #15803d !important;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
  }

  body.page-home.public-home-v2 .ilj-fcta.pub-p3 .ilj-fcta__visual {
    display: none !important;
  }

  /* ========== FAQ ========== */
  body.page-home.public-home-v2 .faq-section {
    background: #fff !important;
    padding: 1.25rem 0 1.1rem !important;
  }

  body.page-home.public-home-v2 .faq-section .section-heading h2 {
    font-size: clamp(1.28rem, 5vw, 1.5rem) !important;
    color: #0b2f5b !important;
    margin: 0 0 0.85rem !important;
  }

  body.page-home.public-home-v2 .faq-section .faq-card {
    border: 1px solid #e2ebf5 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(11, 47, 91, 0.05) !important;
  }

  body.page-home.public-home-v2 .faq-section .accordion-item {
    border-bottom: 1px solid #e8eef6 !important;
  }

  body.page-home.public-home-v2 .faq-section .accordion-item:last-child {
    border-bottom: 0 !important;
  }

  body.page-home.public-home-v2 .faq-section .accordion-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    width: 100% !important;
    min-height: 54px !important;
    padding: 0.85rem 1rem !important;
    background: #fff !important;
    border: 0 !important;
    text-align: start !important;
    font-size: 0.94rem !important;
    font-weight: 650 !important;
    color: #0b2f5b !important;
    line-height: 1.3 !important;
  }

  body.page-home.public-home-v2 .faq-section .accordion-trigger svg {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 auto !important;
    color: #1d4ed8 !important;
  }

  body.page-home.public-home-v2 .faq-section .accordion-panel {
    padding: 0 1rem 0.95rem !important;
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    color: #475569 !important;
  }

  body.page-home.public-home-v2 .faq-section .accordion-item:not(.is-open) .accordion-panel {
    display: none !important;
  }

  /* ========== FOOTER (contact + social visible) ========== */
  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__contact,
  .ilj-footer.ilj-footer--compact .ilj-footer__contact {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.45rem !important;
    margin: 0 !important;
    padding: 0.15rem 0 0.25rem !important;
    list-style: none !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__contact a,
  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__address,
  .ilj-footer.ilj-footer--compact .ilj-footer__contact a,
  .ilj-footer.ilj-footer--compact .ilj-footer__address {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    color: rgba(235, 245, 255, 0.92) !important;
    text-decoration: none !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__contact svg,
  .ilj-footer.ilj-footer--compact .ilj-footer__contact svg {
    width: 16px !important;
    height: 16px !important;
    margin-top: 2px !important;
    flex: 0 0 auto !important;
    color: #7dd3fc !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__social,
  .ilj-footer.ilj-footer--compact .ilj-footer__social {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.55rem !important;
    margin: 0.15rem 0 0.2rem !important;
    padding: 0 !important;
    list-style: none !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__social a,
  .ilj-footer.ilj-footer--compact .ilj-footer__social a {
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__social svg,
  .ilj-footer.ilj-footer--compact .ilj-footer__social svg {
    width: 18px !important;
    height: 18px !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__tagline {
    max-width: 40ch !important;
    font-size: 0.8rem !important;
  }

  body.page-home .ilj-footer.ilj-footer--compact .ilj-footer__legal a {
    font-size: 0.8rem !important;
  }

  /* Clear sticky bar + safe area under footer */
  body.pb-mobile-bar .ilj-footer.ilj-footer--compact .ilj-footer__shell {
    padding-bottom: calc(18px + var(--mobile-bar-h, 52px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ========== STICKY / LIVE CHAT ========== */
  body.page-home .mobile-action-bar.hp-mab,
  body.page-home .hp-mab {
    height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: none !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    z-index: 90 !important;
  }

  body.page-home .ilaj-chat__launcher {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    bottom: calc(var(--mobile-bar-h, 52px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
    inset-inline-end: 12px !important;
    z-index: 85 !important;
  }

  body.page-home .ilaj-chat__panel {
    bottom: calc(var(--mobile-bar-h, 52px) + 68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ========== LIGHT A–Z CONSISTENCY ========== */
  body.page-home.public-home-v2 .hp-page {
    overflow-x: clip !important;
  }

  body.page-home.public-home-v2 .hp-page section {
    max-width: 100vw !important;
  }

  body.page-home.public-home-v2 .hp-page h2 {
    letter-spacing: -0.02em;
  }

  body.page-home.public-home-v2 .hp-why-trust,
  body.page-home.public-home-v2 .hp-visa-travel,
  body.page-home.public-home-v2 .faq-section {
    scroll-margin-bottom: calc(var(--mobile-bar-h, 52px) + 12px);
  }

  /* Prevent FAQ last items being covered when sticky bar is present */
  body.pb-mobile-bar.page-home.public-home-v2 .faq-section {
    padding-bottom: 0.5rem !important;
  }
}

/* Desktop: portal checklist remains usable, keep quick CTAs */
@media (min-width: 768px) {
  body.page-home.public-home-v2 .hp-track-journey--portal .hp-track-journey__checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1rem;
  }

  body.page-home.public-home-v2 .hp-track-journey--portal .hp-track-journey__step {
    flex-direction: row;
    align-items: center;
    text-align: start;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.2rem 0;
  }

  body.page-home.public-home-v2 .hp-track-journey--portal .hp-track-journey__check {
    color: #16a34a;
    width: 24px;
    height: 24px;
    background: transparent;
  }

  .ilj-footer.ilj-footer--compact .ilj-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .ilj-footer.ilj-footer--compact .ilj-footer__contact a,
  .ilj-footer.ilj-footer--compact .ilj-footer__address {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    color: rgba(235, 245, 255, 0.92);
    text-decoration: none;
    font-size: 0.92rem;
  }

  .ilj-footer.ilj-footer--compact .ilj-footer__contact svg {
    width: 18px;
    height: 18px;
    color: #7dd3fc;
    flex: 0 0 auto;
    margin-top: 2px;
  }

  .ilj-footer.ilj-footer--compact .ilj-footer__social {
    display: flex;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .ilj-footer.ilj-footer--compact .ilj-footer__social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .ilj-footer.ilj-footer--compact .ilj-footer__social svg {
    width: 18px;
    height: 18px;
  }
}

/* RTL */
[dir="rtl"] body.page-home.public-home-v2 .hp-track-journey--portal .hp-track-journey__step,
[dir="rtl"] body.page-home .ilj-footer__contact a,
[dir="rtl"] body.page-home .ilj-footer__address {
  text-align: right;
}
