/* ═══════════════════════════════════════════════
   KORMAN HEALTHCARE — UNIVERSAL RESPONSIVE CSS
   Applies across: home, patient, facility, 
   learning center, continuing education, employee
   ═══════════════════════════════════════════════ */

/* ════ LARGE DESKTOP (1400px+) ════ */
@media (min-width: 1400px){
  .container-lg{ max-width: 1320px; }
}

/* ════ TABLET LANDSCAPE (992px–1199px) ════ */
@media (max-width: 1199px){
  /* Hero sections */
  .hp-hero, .learning-hero, .emp-hero,
  .fac-hero, .pat-hero, .continuing-hero{
    min-height: 80vh;
  }
  /* Provider badge on home hero */
  .hp-hero__provider{
    bottom: 20px; right: 16px;
    padding: 14px 18px;
  }
  .hp-hero__provider img{ width: 72px; height: 72px; }
}

/* ════ TABLET PORTRAIT (768px–991px) ════ */
@media (max-width: 991px){

  /* ── All hero sections ── */
  .hp-hero, .learning-hero, .emp-hero,
  .fac-hero, .pat-hero, .continuing-hero{
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 64px;
  }

  /* Home hero provider badge — flow into layout */
  .hp-hero__provider{
    position: static;
    margin-top: 28px;
    width: fit-content;
  }

  /* Hero text widths */
  .hp-hero__sub,
  .fac-hero__sub,
  .emp-hero__sub,
  .pat-hero__sub,
  .learning-hero p,
  .continuing-hero p{
    max-width: 100%;
  }

  /* Button rows — allow wrap */
  .hp-hero__btns,
  .fac-hero__actions,
  .emp-hero .d-flex.gap-3,
  .pat-hero__actions,
  .learning-hero__actions,
  .continuing-hero__actions{
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Stats rows */
  .fac-hero__stats,
  .emp-hero__stats,
  .learning-hero__stats{
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 28px;
    gap: 8px;
  }

  /* ── All main sections ── */
  .hp-solutions,
  .hp-services,
  .hp-mobilerx,
  .hp-hours,
  .hp-accred,
  .fac-access,
  .fac-forms,
  .fac-partners,
  .emp-resources,
  .emp-strip,
  .lc-location,
  .lc-classes,
  .lc-caregiver,
  .lc-cta,
  .pat-resources,
  .pat-form-section,
  .pat-status,
  .pat-quick,
  .continuing-featured,
  .continuing-covers,
  .continuing-schedule,
  .continuing-cta{
    padding-top: 64px;
    padding-bottom: 64px;
  }

  /* ── Solution cards ── */
  .sol-primary{ margin-bottom: 0; }
  .sol-stats{ flex-wrap: wrap; }
  .sol-stat{ min-width: 30%; }

  /* ── Service cards ── */
  .svc-mini-card{ padding: 22px 20px; }

  /* ── MobileRx phone ── */
  .mrx-phone-wrap{ margin-bottom: 32px; }
  .mrx-features{ grid-template-columns: 1fr; gap: 10px; }

  /* ── Hours & Map ── */
  .map-wrap{ min-height: 320px; height: 320px; }
  .map-wrap iframe{ min-height: 320px; }

  /* ── Accred strip ── */
  .hp-accred .col-lg-1{ display: none !important; }

  /* ── Facility forms grid ── */
  .forms-grid{ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .forms-header{ flex-direction: column; align-items: flex-start; gap: 16px; }
  .forms-search input{ width: 160px; }

  /* ── Partner cards ── */
  .partner-card{ padding: 28px 24px; }

  /* ── Facility strip ── */
  .fac-strip .strip-item{
    border-right: none;
    border-bottom: 1px solid var(--k-line);
    padding: 16px 0;
  }
  .fac-strip .strip-item:last-child{ border-bottom: none; }

  /* ── Employee card ── */
  .emp-hero__card{
    position: static;
    max-width: 100%;
    width: 100%;
    margin-top: 32px;
  }

  /* ── Learning center map ── */
  .lc-map-panel{ min-height: 320px; }
  .lc-map-panel iframe{ min-height: 320px; }

  /* ── Caregiver visual ── */
  .lc-caregiver__visual{ margin-top: 28px; }
  .lc-caregiver__stat-grid{ grid-template-columns: repeat(4, 1fr); }

  /* ── Patient form wrapper ── */
  .pat-form-wrapper{ padding: 28px 22px; }

  /* ── CTA sections ── */
  .lc-cta .col-lg-5,
  .continuing-cta__inner{
    flex-direction: column;
    gap: 24px;
  }
  .lc-cta .d-flex.justify-content-lg-end{
    justify-content: flex-start !important;
  }
}

/* ════ MOBILE (max 767px) ════ */
@media (max-width: 767px){

  /* ── Container padding ── */
  .container, .container-lg{ padding-left: 16px; padding-right: 16px; }

  /* ── All section paddings ── */
  .hp-solutions, .hp-services, .hp-mobilerx,
  .hp-hours, .hp-accred,
  .fac-access, .fac-forms, .fac-partners,
  .emp-resources, .emp-strip,
  .lc-location, .lc-classes, .lc-caregiver, .lc-cta,
  .pat-resources, .pat-form-section, .pat-status, .pat-quick,
  .continuing-featured, .continuing-covers,
  .continuing-schedule, .continuing-cta{
    padding-top: 52px;
    padding-bottom: 52px;
  }

  /* ── Section titles ── */
  .ds-title{ font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .sec-title, .lc-section-title,
  .sec-h2, .continuing-schedule__header h2{
    font-size: clamp(1.6rem, 5.5vw, 2.2rem);
  }

  /* ── Hero headings ── */
  .hp-hero #hp-hero-title,
  .fac-hero h1,
  .emp-hero h1,
  .learning-hero h1,
  .continuing-hero h1,
  .pat-hero h1{
    font-size: clamp(1.9rem, 6.5vw, 2.8rem);
  }

  /* ── Hero buttons — full width on mobile ── */
  .hp-btn-primary,
  .hp-btn-ghost,
  .btn-hero-primary,
  .btn-hero-ghost,
  .btn-pat-primary,
  .btn-pat-outline,
  .learning-button--primary,
  .learning-button--outline,
  .continuing-hero__button,
  .lc-btn{
    width: 100%;
    justify-content: center;
  }
  .hp-hero__btns,
  .fac-hero__actions,
  .pat-hero__actions,
  .learning-hero__actions,
  .continuing-hero__actions,
  .lc-cta .d-flex,
  .continuing-cta__buttons{
    flex-direction: column;
    gap: 12px;
  }

  /* ── Sol stats ── */
  .sol-stats{ flex-direction: column; }
  .sol-stat{ border-right: none; border-bottom: 1px solid var(--k-line); padding: 14px 0; }
  .sol-stat:last-child{ border-bottom: none; }

  /* ── Service cards ── */
  .svc-mini-card__tags{ flex-wrap: wrap; }

  /* ── MobileRx ── */
  .mrx-phone{ width: 220px; height: 460px; }
  .mrx-store-btns{ flex-direction: column; gap: 10px; }
  .mrx-store-btn{ width: 100%; }

  /* ── Hours ── */
  .hours-card{ padding: 24px 20px; }
  .map-wrap{ min-height: 260px; height: 260px; }
  .map-wrap iframe{ min-height: 260px; }

  /* ── Accred strip ── */
  .hp-accred .row{ flex-direction: column; gap: 32px; }
  .hp-accred .col-lg-4,
  .hp-accred .col-lg-2{ width: 100%; }

  /* ── Facility cards ── */
  .access-card--featured{ padding: 24px 20px; }
  .partner-card{ padding: 24px 20px; }
  .forms-grid{ grid-template-columns: 1fr; }
  .forms-search{ width: 100%; }
  .forms-search input{ width: 100%; flex: 1; }

  /* ── Employee strip ── */
  .emp-strip .row > div{ margin-bottom: 24px; }
  .emp-strip .row > div:last-child{ margin-bottom: 0; }
  .hours-pill{ padding: 10px 14px; }

  /* ── Learning center ── */
  .lc-class-grid{ grid-template-columns: 1fr; }
  .lc-caregiver__modules{ grid-template-columns: 1fr; }
  .lc-caregiver__stat-grid{ grid-template-columns: 1fr 1fr; }
  .lc-classes__header{ flex-direction: column; gap: 16px; }
  .lc-classes__calendar-btn{ width: 100%; justify-content: center; }
  .lc-location__card{ padding: 24px 20px; }
  .lc-caregiver__card{ padding: 24px 20px; }

  /* ── Patient form ── */
  .pat-form-wrapper{ padding: 22px 16px; }
  .sig-box{ padding: 12px; }

  /* ── Continuing ed ── */
  .continuing-covers__grid{ grid-template-columns: 1fr; }
  .continuing-schedule__header{ flex-direction: column; gap: 16px; }
  .continuing-schedule__dashboard{ width: 100%; justify-content: center; }
  .continuing-featured-card__header{ flex-direction: column; }
  .continuing-featured-card__seal{ align-self: flex-start; }
  .continuing-contact-card{ margin-top: 24px; }

  /* ── Patient quick links ── */
  .pat-quick .row > div{ margin-bottom: 16px; }

  /* ── MobileRx section layout ── */
  .hp-mobilerx .col-lg-4{ margin-bottom: 32px; }
}

/* ════ SMALL MOBILE (max 480px) ════ */
@media (max-width: 480px){

  /* ── Tighter hero padding ── */
  .hp-hero, .learning-hero, .emp-hero,
  .fac-hero, .pat-hero, .continuing-hero{
    padding-top: 70px !important;
    padding-bottom: 50px !important;
  }

  /* ── Stat chips ── */
  .emp-hero__stats,
  .fac-hero__stats{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .emp-hero__stat,
  .fac-hero__stat{ min-width: 0; }

  /* ── MobileRx phone ── */
  .mrx-phone{ width: 200px; height: 420px; }

  /* ── Card paddings ── */
  .sol-primary{ padding: 26px 20px; }
  .sol-support{ padding: 20px 18px; }
  .hours-card{ padding: 20px 16px; }
  .res-card{ padding: 20px 16px; }
  .quick-card{ padding: 22px 18px; }
  .svc-mini-card{ padding: 20px 16px; }

  /* ── Caregiver stat grid ── */
  .lc-caregiver__stat-grid{ grid-template-columns: 1fr 1fr; gap: 8px; }
  .lc-caregiver__stat-item{ padding: 12px 10px; }

  /* ── Patient area ── */
  .pat-hero__actions{ flex-direction: column; }
  .accred-badge-card{ flex-direction: column; text-align: center; }

  /* ── Forms grid ── */
  .forms-grid{ gap: 8px; }
  .form-item{ padding: 10px 12px; }

  /* ── Typography scale down ── */
  .lc-caregiver__card h2{ font-size: 1.6rem; }
  .lc-caregiver__price strong{ font-size: 1.7rem; }
  .continuing-cta .continuing-cta__content h2{ font-size: 1.5rem; }
}

/* ════ REDUCED MOTION ════ */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation: none !important;
    transition: none !important;
  }
}

/* ════ PRINT ════ */
@media print{
  .hp-hero, .learning-hero, .emp-hero,
  .fac-hero, .pat-hero, .continuing-hero{
    min-height: auto;
    background: none !important;
    color: #000 !important;
  }
  .hp-hero__overlay,
  .hp-hero__grid,
  .fac-hero__bg,
  .emp-hero__bg{ display: none; }
  .hp-btn-primary, .hp-btn-ghost,
  .btn-hero-primary, .btn-hero-ghost{ display: none; }
}