/**
 * Hero carousel — tablet & mobile only.
 * Load after css/hero-carousel.css.
 */

/* ---------- All tablet + phone: copy flush left (panel + type + CTA) ---------- */
@media (max-width: 991.98px) {
  .ph-hero-carousel .ph-hero-content {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .ph-hero-carousel .ph-hero-content.ph-align-center,
  .ph-hero-carousel .ph-hero-content.ph-align-right,
  .ph-hero-carousel .ph-hero-content.ph-align-left,
  .ph-hero-carousel .ph-hero-content.ph-align-together {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .ph-hero-carousel .ph-hero-text-overlay {
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .ph-hero-carousel .ph-hero-inner,
  .ph-hero-carousel .ph-h1,
  .ph-hero-carousel .ph-h2,
  .ph-hero-carousel .ph-desc {
    text-align: left !important;
  }

  .ph-hero-carousel .ph-cta {
    margin-left: 0 !important;
    margin-right: auto !important;
  }
}

/* ---------- Tablet (576px – 991px) ---------- */
@media (min-width: 576px) and (max-width: 991.98px) {
  .ph-hero-carousel .carousel-item {
    padding-top: 48%;
  }

  .ph-hero-carousel .ph-hero-content {
    padding: 0.75rem 3.5rem;
  }

  .ph-hero-carousel .ph-hero-content.ph-align-left,
  .ph-hero-carousel .ph-hero-content.ph-align-right,
  .ph-hero-carousel .ph-hero-content.ph-align-center {
    padding-left: 3.5rem;
    padding-right: 3.5rem;
  }

  .ph-hero-carousel .ph-hero-text-overlay {
    padding: 0.8rem 1rem;
    width: min(82vw, 400px);
    max-width: 82vw;
  }

  .ph-hero-carousel .ph-align-left .ph-hero-text-overlay,
  .ph-hero-carousel .ph-align-right .ph-hero-text-overlay {
    border-radius: 12px;
  }

  .ph-hero-carousel .ph-hero-inner {
    max-width: 100%;
    width: 100%;
  }

  .ph-hero-carousel .ph-h1 {
    font-size: clamp(1.05rem, 2.2vw + 0.35rem, 1.32rem) !important;
    font-weight: 700 !important;
    color: #014ab2 !important;
    margin: 0 0 0.35rem 0;
    line-height: 1.18;
  }

  .ph-hero-carousel .ph-h2 {
    font-size: clamp(0.92rem, 1.6vw + 0.3rem, 1.08rem) !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 0 0.45rem 0;
    line-height: 1.25;
  }

  .ph-hero-carousel .ph-desc {
    font-size: clamp(0.82rem, 1.3vw + 0.25rem, 0.95rem) !important;
    font-weight: 400 !important;
    color: #000 !important;
    margin: 0 0 0.65rem 0;
    line-height: 1.45;
  }

  .ph-hero-carousel .ph-cta {
    font-size: clamp(0.75rem, 1.1vw + 0.2rem, 0.88rem) !important;
    font-weight: 600 !important;
    padding: 0.42rem 1.1rem !important;
  }

  .ph-hero-carousel .carousel-control-prev,
  .ph-hero-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
  }

  .ph-hero-carousel .carousel-control-prev {
    left: 0.5rem;
  }

  .ph-hero-carousel .carousel-control-next {
    right: 0.5rem;
  }

  .ph-hero-carousel .carousel-indicators {
    bottom: 0.65rem;
  }
}

/* ---------- Phones (≤575px) ---------- */
@media (max-width: 575.98px) {
  .ph-hero-carousel .carousel-item {
    padding-top: 56%;
  }

  .ph-hero-carousel .ph-hero-content {
    padding: 0.4rem 2.55rem 0.4rem 2rem;
  }

  .ph-hero-carousel .ph-hero-content.ph-align-left,
  .ph-hero-carousel .ph-hero-content.ph-align-right,
  .ph-hero-carousel .ph-hero-content.ph-align-center {
    padding-left: 2rem;
    padding-right: 2.55rem;
  }

  .ph-hero-carousel .ph-hero-text-overlay {
    padding: 0.4rem 0.55rem 0.45rem 0.3rem !important;
    width: min(68vw, 255px) !important;
    max-width: 68vw !important;
    box-sizing: border-box;
  }

  .ph-hero-carousel .ph-align-left .ph-hero-text-overlay,
  .ph-hero-carousel .ph-align-right .ph-hero-text-overlay {
    border-radius: 10px;
  }

  .ph-hero-carousel .ph-hero-inner {
    max-width: 100%;
    width: 100%;
  }

  .ph-hero-carousel .ph-h1 {
    font-size: calc(clamp(0.8rem, 3.4vw, 0.95rem) - 0.25rem) !important;
    font-weight: 700 !important;
    color: #014ab2 !important;
    margin: 0 0 0.2rem 0 !important;
    line-height: 1.12 !important;
  }     

  .ph-hero-carousel .ph-h2 {
    font-size: calc(clamp(0.72rem, 3vw, 0.84rem) - 0.25rem) !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 0 0.28rem 0 !important;
    line-height: 1.2 !important;
  }

  .ph-hero-carousel .ph-desc {
    font-size: calc(clamp(0.65rem, 2.6vw, 0.76rem) - 0.25rem) !important;
    font-weight: 400 !important;
    color: #000 !important;
    margin: 0 0 0.4rem 0 !important;
    line-height: 1.32 !important;
  }

  .ph-hero-carousel .ph-cta {
    font-size: calc(clamp(0.58rem, 2.3vw, 0.68rem) - 0.25rem) !important;
    font-weight: 600 !important;
    padding: 0.32rem 0.75rem !important;
    letter-spacing: 0.03em;
  }

  .ph-hero-carousel .carousel-control-prev,
  .ph-hero-carousel .carousel-control-next {
    width: 32px !important;
    height: 32px !important;
    opacity: 0.92;
  }

  .ph-hero-carousel .carousel-control-prev {
    left: 0.3rem;
  }

  .ph-hero-carousel .carousel-control-next {
    right: 0.3rem;
  }

  .ph-hero-carousel .carousel-indicators {
    bottom: 0.3rem;
    margin-bottom: 0;
  }

  .ph-hero-carousel .carousel-indicators [data-bs-target] {
    width: 6px;
    height: 6px;
    margin: 0 3px;
  }
}

@media (max-width: 380px) {
  .ph-hero-carousel .ph-hero-content {
    padding-left: 1.85rem;
    padding-right: 2.35rem;
  }

  .ph-hero-carousel .ph-hero-text-overlay {
    width: min(70vw, 235px) !important;
    max-width: 70vw !important;
    padding: 0.38rem 0.5rem 0.42rem 0.28rem !important;
  }

  .ph-hero-carousel .ph-h1 {
    font-size: calc(clamp(0.76rem, 3.2vw, 0.88rem) - 0.25rem) !important;
  }

  .ph-hero-carousel .ph-h2 {
    font-size: calc(clamp(0.68rem, 2.8vw, 0.78rem) - 0.25rem) !important;
  }

  .ph-hero-carousel .ph-desc {
    font-size: calc(clamp(0.62rem, 2.4vw, 0.72rem) - 0.25rem) !important;
  }
}
