/* Mobile Responsive Fixes - v2 */
@media (max-width: 768px) {

  /* ── TOP BAR ── */
  .bg-blue-royal .text-button {
    font-size: 11px !important;
  }
  .bg-blue-royal .h-20, .bg-blue-royal .lg\:h-14 {
    height: 44px !important;
  }

  /* #11 - Contact Us button in nav - much smaller */
  header a.inline-flex[href*="contact"] {
    padding: 6px 12px !important;
    font-size: 12px !important;
    gap: 4px !important;
  }
  header a.inline-flex[href*="contact"] span.w-9 {
    width: 18px !important;
    height: 18px !important;
  }
  header a.inline-flex[href*="contact"] span.w-9 img {
    width: 10px !important;
    height: 8px !important;
  }

  /* ── HERO SECTION ── */
  section[aria-label="Hero banner"] video {
    object-position: center center;
    transform: scale(1) !important;
  }
  section[aria-label="Hero banner"] > div:first-child {
    transform: none !important;
  }
  /* #1 - Hero text - larger for mobile readability */
  section[aria-label="Hero banner"] h1 span.block {
    font-size: 46px !important;
    line-height: 1.1 !important;
  }
  section[aria-label="Hero banner"] p {
    font-size: 23px !important;
  }
  /* #1 - Hero buttons - equal size, no text wrapping */
  section[aria-label="Hero banner"] .flex.flex-col.sm\:flex-row {
    flex-direction: row !important;
    gap: 10px !important;
    justify-content: center !important;
  }
  section[aria-label="Hero banner"] a.inline-flex {
    padding: 10px 14px !important;
    font-size: 13px !important;
    gap: 6px !important;
    white-space: nowrap !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  section[aria-label="Hero banner"] a.inline-flex span {
    width: 24px !important;
    height: 24px !important;
  }
  /* More space between subtitle and buttons */
  section[aria-label="Hero banner"] .space-y-6 {
    gap: 16px !important;
  }
  section[aria-label="Hero banner"] .mt-8 {
    margin-top: 40px !important;
  }

  /* ── GLOBAL TEXT SCALING ── */
  .text-h1, [class*="text-h1"] {
    font-size: 30px !important;
    line-height: 1.2 !important;
  }
  .text-h2, [class*="text-h2"] {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }
  .text-h3, [class*="text-h3"] { font-size: 20px !important; }
  .text-h4, [class*="text-h4"] { font-size: 18px !important; }
  .text-h5, [class*="text-h5"] { font-size: 16px !important; }
  .text-body, [class*="text-body"] {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  /* ── BUTTONS - SITEWIDE ── */
  /* Buttons should be compact, centered, fit their content, no text wrap */
  a.inline-flex, button.inline-flex {
    width: fit-content !important;
    max-width: 90% !important;
    font-size: 14px !important;
    padding: 10px 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
  }
  a.inline-flex span.w-11, a.inline-flex span.w-9 {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
  }
  a.inline-flex span.w-11 img, a.inline-flex span.w-9 img {
    width: 12px !important;
    height: 10px !important;
  }
  /* Override for buttons that should stay inline (nav, etc) */
  header a.inline-flex {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
  }

  /* ── SPACING REDUCTION ── */
  /* #3, #12 - Reduce vertical padding globally */
  .py-16 { padding-top: 32px !important; padding-bottom: 32px !important; }
  .py-20 { padding-top: 36px !important; padding-bottom: 36px !important; }
  .lg\:py-\[120px\] { padding-top: 36px !important; padding-bottom: 36px !important; }
  .lg\:py-\[100px\] { padding-top: 32px !important; padding-bottom: 32px !important; }
  .lg\:py-\[80px\] { padding-top: 28px !important; padding-bottom: 28px !important; }
  .mb-12 { margin-bottom: 24px !important; }
  .mb-16 { margin-bottom: 28px !important; }
  .lg\:mb-24 { margin-bottom: 20px !important; }
  .lg\:mb-\[60px\] { margin-bottom: 24px !important; }
  .gap-12 { gap: 24px !important; }
  .gap-16 { gap: 28px !important; }
  .lg\:gap-20 { gap: 24px !important; }
  .lg\:gap-\[60px\] { gap: 24px !important; }
  .lg\:gap-\[50px\] { gap: 20px !important; }

  /* ── #3 CONDITIONS SECTION ── */
  .bg-blue-royal .flex-col.lg\:flex-row {
    flex-direction: column-reverse !important;
    gap: 16px !important;
  }
  .bg-blue-royal .flex-col.lg\:flex-row > div:last-child {
    width: 100% !important;
    min-height: 250px !important;
    height: 250px !important;
  }
  .bg-blue-royal .flex-col.lg\:flex-row > div:first-child {
    width: 100% !important;
  }
  .bg-blue-royal .flex-col.lg\:flex-row button {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  .bg-blue-royal .flex-col.lg\:flex-row button span[class*="whitespace-nowrap"] {
    font-size: 15px !important;
  }
  /* Reduce conditions section top/bottom padding */
  section.bg-blue-royal.border-b {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  section.bg-blue-royal.border-b .lg\:gap-\[50px\] {
    gap: 16px !important;
  }
  section.bg-blue-royal.border-b .lg\:gap-\[30px\] {
    gap: 12px !important;
  }

  /* ── #4 CAROUSEL GRADIENT ── */
  .shadow-2xl .absolute.inset-0.bg-gradient-to-t {
    background: linear-gradient(to top, rgba(19,25,92,0.85) 0%, rgba(19,25,92,0.3) 30%, transparent 50%) !important;
  }

  /* ── #7 PROVIDERS SECTION ── */
  /* Button is now structurally after the carousel — no reorder needed */

  /* ── #8 TESTIMONIALS ── */
  #testimonialCarousel .flex-col.lg\:flex-row {
    gap: 16px !important;
  }
  #testimonialCarousel blockquote {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  #testimonialCarousel .flex.gap-2 {
    justify-content: center !important;
    margin-top: 8px !important;
  }
  /* Reduce space above testimonials heading */
  .bg-purple-gradient.w-full {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  .bg-purple-gradient .lg\:mb-24 {
    margin-bottom: 12px !important;
  }

  /* ── #9 CTA BANNER ── */
  section[class*="overflow-hidden"] > div[class*="relative z-10"] {
    gap: 20px !important;
  }
  section[class*="overflow-hidden"] > div[class*="relative z-10"] h2 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }

  /* ── FOOTER ── */
  footer .container {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }
  footer .mb-10 { margin-bottom: 20px !important; }
  footer [style*="gap:24px"] {
    gap: 6px !important;
    margin-bottom: 16px !important;
  }
  footer [style*="padding:10px 20px"] {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }

  /* ── #13 PROVIDER CARDS ── */
  .provider-card {
    height: 380px !important;
  }
  .provider-card .provider-bio {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  .provider-card .provider-info h3 {
    font-size: 16px !important;
  }
  .provider-card .provider-info p {
    font-size: 13px !important;
  }
  /* Make provider bio always visible on mobile since tap doesn't hover */
  .provider-card .provider-bio {
    max-height: 100px !important;
    opacity: 1 !important;
    margin-top: 6px !important;
  }

  /* ── #15 BREADCRUMBS ── */
  .flex.flex-wrap.items-center.gap-2.text-blue-basic {
    display: none !important;
  }

  /* ── #17 TREATMENT OPTIONS ── */
  /* Treatment card grids - 2 columns instead of 3, smaller padding */
  section[class*="bg-blue-royal"] .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  section[class*="bg-blue-royal"] .grid .rounded-\[16px\] {
    padding: 12px !important;
  }
  section[class*="bg-blue-royal"] .grid .text-lg {
    font-size: 13px !important;
  }
  section[class*="bg-blue-royal"] .grid .text-base {
    font-size: 11px !important;
  }

  /* ── SUBPAGE HEROES ── */
  section[style*="min-height:400px"] {
    min-height: 240px !important;
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  section[style*="min-height:400px"] h1[style*="font-size:64px"] {
    font-size: 32px !important;
  }
  section[style*="min-height:400px"] h1[style*="font-size:56px"] {
    font-size: 28px !important;
  }
  section[style*="min-height:500px"] {
    min-height: 240px !important;
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  section[style*="min-height:500px"] h1 {
    font-size: 28px !important;
  }

  /* #2 - Reduce white space between hero and intro section */
  section.bg-purple-gradient:first-of-type > .container,
  section.w-full.bg-purple-gradient > .container {
    padding-top: 6px !important;
    padding-bottom: 20px !important;
  }
  /* Intro section: text first, image second, button third on mobile */
  section.w-full.bg-purple-gradient .flex-col.lg\:flex-row {
    flex-direction: column !important;
    gap: 16px !important;
  }
  section.w-full.bg-purple-gradient .flex-col.lg\:flex-row > div:first-child {
    order: 1 !important;
    gap: 12px !important;
  }
  section.w-full.bg-purple-gradient .flex-col.lg\:flex-row > div:nth-child(2) {
    order: 2 !important;
  }
  section.w-full.bg-purple-gradient .flex-col.lg\:flex-row > div:last-child {
    order: 3 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }
  /* Learn About Us button — compact and centered */
  section.w-full.bg-purple-gradient .flex-col.lg\:flex-row > div:last-child a.inline-flex {
    padding: 10px 16px !important;
    font-size: 14px !important;
    width: fit-content !important;
    max-width: none !important;
    margin: 0 auto !important;
  }

  /* Provider carousel nav buttons centered */
  section[data-slides*="Fatima"] .flex.items-center.justify-center.gap-4.mb-8 {
    justify-content: center !important;
    margin-bottom: 12px !important;
  }

  /* #11 - Treatment option cards glow on active/focus */
  .treatment-card:active, .treatment-card:focus {
    background: rgba(255,255,255,0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(255,255,255,0.1) !important;
  }

  /* #12 - Insurance carousel - prevent touch from hiding it */
  .carousel-track-wrapper {
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .carousel-track {
    pointer-events: none !important;
  }

  /* #13 - Affiliates page spacing */
  section[style*="min-height:400px"] + section .text-xl.lg\:text-2xl {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  /* ── CHAT WIDGET ── */
  #fpr-chat-bubble span { display: none !important; }
  #fpr-chat-bubble {
    width: 56px !important;
    height: 56px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }

  /* ── COMMON SYMPTOMS / CHECKLIST ── */
  /* 2 columns instead of 3 */
  .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .text-h1, [class*="text-h1"] {
    font-size: 24px !important;
    line-height: 1.2 !important;
  }
  .text-h2, [class*="text-h2"] {
    font-size: 22px !important;
  }
  section[aria-label="Hero banner"] h1 span.block {
    font-size: 34px !important;
  }
  /* Treatment grid single column on very small screens */
  section[class*="bg-blue-royal"] .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ── FOOTER LINK HOVER — all screen sizes ── */
footer div[style*="display:flex"] > a {
  transition: all 0.3s ease !important;
  border-left: 2px solid transparent !important;
  border-right: 2px solid transparent !important;
}
footer div[style*="display:flex"] > a:hover {
  border-left-color: rgba(255,255,255,0.5) !important;
  border-right-color: rgba(255,255,255,0.5) !important;
  color: #A8C4E6 !important;
}
