/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   MOBILE ENHANCEMENTS + FIXES, Beneficios Medicare

   IMPORTANT: This stylesheet must be loaded AFTER the CMS disclaimer
   <style> block in the <body>. Place this <link> tag right before </body>:
   <link rel="stylesheet" href="mobile-enhancements.css">

   Alternatively, paste these rules into the BOTTOM of your existing
   inline <style> block so they take priority.
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */

/* ââ 0a. DESKTOP HERO FIX: Prevent h1 clipping on all screens ââ */
body .hero,
section.hero {
  /* padding-top handled by brand.css */
  overflow: visible;
}

/* ââ 0b. "ASI FUNCIONA" SECTION: Center heading + subtitle ââ */
.how-it-works .section-label,
.how-it-works .section-title,
.how-it-works h2,
.how-it-works > div > p:first-of-type,
.how-it-works > div > div > p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ââ 1. HERO FIX: Prevent h1 clipping under CMS banner + fixed header ââ */
/*    Uses body prefix for specificity over the inline !important rule      */
@media (max-width: 768px) {
  body .hero,
  section.hero {
    padding-top: 4px !important;
    padding-bottom: 80px !important;
    overflow: visible !important;
  }
  .hero h1 {
    font-size: 40px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    margin-bottom: 12px !important;
    white-space: normal !important;
  }
  .hero p {
    font-size: 14px !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
  }
  .hero p[style*="font-size:20px"] {
    font-size: 15px !important;
    margin-bottom: 8px !important;
  }
  .hero-ctas {
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .hero-ctas .btn {
    padding: 14px 16px !important;
    font-size: 15px !important;
  }
}

/* ââ 2. CARRIER TRUST BAR: Scroll hint + fade edges ââ */
@media (max-width: 768px) {
  .carrier-trust-bar {
    padding: 28px 0 28px 16px !important;
    position: relative;
  }
  .trust-bar-label {
    padding-left: 0;
    padding-right: 16px;
    font-size: 11px !important;
    margin-bottom: 16px !important;
  }
  .carrier-logos {
    padding-right: 24px !important;
    gap: 8px !important;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
  .carrier-pill {
    font-size: 13px !important;
    padding: 8px 14px !important;
  }
}

/* ââ 3. THREE-STEP PROCESS: Tighter mobile layout ââ */
@media (max-width: 768px) {
  .how-it-works {
    padding: 40px 16px !important;
  }
  .how-it-works .section-title,
  .how-it-works h2 {
    font-size: 22px !important;
  }
  .steps-grid {
    gap: 0 !important;
  }
  .steps-grid > div {
    padding: 20px 8px !important;
  }
  .steps-grid > div > div:first-child {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 12px !important;
  }
  .steps-grid > div > div:first-child span {
    font-size: 1.6rem !important;
  }
  .steps-grid > div > div:nth-child(2) {
    font-size: 1.8rem !important;
    margin-bottom: 8px !important;
  }
  .steps-grid h3 {
    font-size: 1.1rem !important;
    margin-bottom: 6px !important;
  }
  .steps-grid p {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
  }
}

/* ââ 4. TEAM SECTION: More scannable on mobile ââ */
@media (max-width: 768px) {
  .team-grid {
    gap: 16px !important;
  }
  .team-grid > div {
    padding: 20px 16px !important;
  }
  .team-grid > div > div:first-child {
    gap: 12px !important;
    margin-bottom: 14px !important;
  }
  .team-grid > div > div:first-child > div:first-child {
    width: 64px !important;
    height: 64px !important;
  }
  .team-grid > div > div:first-child > div:last-child > div:first-child {
    font-size: 16px !important;
  }
  .team-grid > div > p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
  }
  .team-grid > div > p:last-child {
    font-size: 13px !important;
  }
  /* Yosemite photo: shorter */
  .team-grid + div {
    max-height: 280px !important;
    margin-top: 24px !important;
  }
}

/* ââ 5. STATS BAR: Bigger numbers, tighter layout ââ */
@media (max-width: 768px) {
  .stats-bar {
    padding: 28px 16px !important;
  }
  .stats-grid {
    gap: 12px !important;
  }
  .stat-item h3 {
    font-size: 34px !important;
    line-height: 1.1 !important;
  }
  .stat-item p {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
}

/* ââ 6. FAQ ACCORDION: Bigger touch targets ââ */
@media (max-width: 768px) {
  section details summary,
  section button[aria-expanded] {
    min-height: 56px !important;
    padding: 16px !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
  }
}

/* ââ 7. CTA BANNERS: Tighter on mobile ââ */
@media (max-width: 768px) {
  .cta-banner {
    padding: 32px 16px !important;
  }
  .cta-banner h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
  }
  .cta-banner p {
    font-size: 14px !important;
    margin-bottom: 20px !important;
  }
  .cta-buttons .btn {
    padding: 14px 24px !important;
    font-size: 15px !important;
    width: 100% !important;
    max-width: 320px !important;
    justify-content: center;
  }
}

/* ââ 8. FOOTER: Better tap targets ââ */
@media (max-width: 768px) {
  footer {
    padding: 36px 16px 90px !important;
  }
  footer a {
    display: inline-block !important;
    padding: 4px 8px !important;
    font-size: 15px !important;
    min-height: 44px;
    line-height: 2 !important;
  }
  footer p:last-child {
    font-size: 11px !important;
    line-height: 1.5 !important;
  }
}

/* ââ 9. WHATSAPP FLOAT: Above sticky CTA bar ââ */
@media (max-width: 768px) {
  .wa-float {
    bottom: 72px !important;
    right: 12px !important;
    width: 52px !important;
    height: 52px !important;
  }
}

/* ââ 10. CMS DISCLAIMER: Compact ââ */
@media (max-width: 768px) {
  #cms-disclaimer {
    font-size: 10px !important;
    padding: 6px 10px !important;
    line-height: 1.4 !important;
  }
}

/* ââ 11. GLOBAL MOBILE POLISH ââ */
@media (max-width: 768px) {
  section {
    padding: 36px 16px !important;
  }
  .section-label {
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 8px !important;
  }
  .section-title,
  section h2 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin-bottom: 10px !important;
  }
  /* Better tap feedback */
  .btn:active,
  .widget-opt:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s !important;
  }
}

/* ââ 12. WIDGET: Better mobile flow ââ */
@media (max-width: 768px) {
  .widget-q {
    font-size: 18px !important;
    line-height: 1.3 !important;
    padding-left: 0 !important;
    text-align: left !important;
  }
  .widget-qsub {
    font-size: 13px !important;
    margin-bottom: 16px !important;
  }
  .widget-opt {
    padding: 12px !important;
    gap: 12px !important;
    min-height: 64px !important;
    border-width: 1.5px !important;
  }
  .widget-opt-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }
  .widget-opt-text h4 {
    font-size: 15px !important;
  }
  .widget-opt-text p {
    font-size: 12px !important;
  }
  .widget-opt-badge {
    font-size: 9px !important;
    padding: 3px 8px !important;
  }
  #widget-progress-bar {
    height: 4px !important;
  }
  .widget-back {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }
  .widget-result h3 {
    font-size: 20px !important;
  }
  .widget-result p {
    font-size: 14px !important;
  }
}

/* ââ 13. MOBILE STICKY CTA: Smooth slide-up ââ */
@media (max-width: 768px) {
  .mobile-sticky-cta {
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  .mobile-sticky-cta.visible {
    transform: translateY(0);
  }
  .mobile-sticky-cta button {
    border-radius: 10px !important;
    font-size: 15px !important;
    padding: 14px 20px !important;
  }
}

/* ââ 14. LANDSCAPE PHONE ââ */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding-top: 4px !important;
    padding-bottom: 60px !important;
  }
  .hero h1 {
    font-size: 24px !important;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ââ 15. REDUCED MOTION ââ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ââ 16. LAZY LOAD PLACEHOLDERS ââ */
img[loading="lazy"] {
  background: var(--lt-gray);
  transition: opacity 0.3s;
}

/* -- 17. LOGO & HEADER: Matches benefits/contact pages -- */
@media (max-width: 768px) {
  .logo {
    font-size: 22px !important;
    gap: 8px !important;
  }
  .logo-icon {
    height: 48px !important;
    width: 48px !important;
  }
  .header-inner {
    height: 70px !important;
    padding: 0 16px !important;
  }
}

/* -- 18. NARROW PHONE (320px) -- */
@media (max-width: 374px) {
  .logo {
    font-size: 20px !important;
    gap: 6px !important;
  }
  .logo-icon {
    height: 40px !important;
    width: 40px !important;
  }
  .hero h1 {
    font-size: 24px !important;
  }
  .hero p {
    font-size: 14px !important;
  }
  .hero-ctas .btn {
    font-size: 15px !important;
    padding: 14px 16px !important;
  }
  .widget-q {
    font-size: 16px !important;
  }
  .widget-opt-text h4 {
    font-size: 14px !important;
  }
  .section-title,
  section h2 {
    font-size: 20px !important;
  }
}
