/* Mobile-first homepage refinements: a guaranteed visible psychologist hero image, shorter page flow and calmer visual hierarchy. */
.home-hero .hero-media {
  background: #0a2140 url('/assets/images/hero-consultation-1200.webp') center center / cover no-repeat;
}

.mobile-hero-still {
  display: none;
  margin: 0;
}

@media (min-width: 701px) {
  .home-hero {
    min-height: 700px;
  }

  .home-hero .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 21, 43, 0.82) 0%, rgba(7, 31, 63, 0.62) 43%, rgba(7, 31, 63, 0.10) 75%),
      linear-gradient(0deg, rgba(5, 21, 43, 0.58), transparent 48%);
  }
}

@media (max-width: 700px) {
  .home-hero {
    --mobile-hero-image-height: clamp(290px, 72vw, 405px);
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #10233f !important;
  }

  .home-hero .mobile-hero-still {
    position: relative;
    order: 0;
    display: block;
    width: 100%;
    height: var(--mobile-hero-image-height);
    min-height: var(--mobile-hero-image-height);
    flex: 0 0 var(--mobile-hero-image-height);
    overflow: hidden;
    background: #0a2140 url('/assets/images/hero-consultation-800.webp') center center / cover no-repeat;
  }

  .home-hero .mobile-hero-still img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    filter: saturate(0.94) contrast(1.02);
  }

  .home-hero .mobile-hero-still::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 21, 43, 0.30) 0%, rgba(5, 21, 43, 0.03) 52%, transparent 78%);
    pointer-events: none;
  }

  .home-hero .mobile-hero-still figcaption {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 14px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(7, 31, 63, 0.72);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
  }

  .home-hero .hero-media,
  .home-hero .hero-controls {
    display: none !important;
  }

  .home-hero .hero-content {
    position: relative !important;
    z-index: 4 !important;
    order: 1 !important;
    display: block !important;
    padding: 30px 0 40px !important;
    color: #10233f !important;
  }

  .home-hero .hero-kicker {
    color: #2563eb !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.11em !important;
  }

  .home-hero h1 {
    max-width: 100% !important;
    margin: 14px 0 18px !important;
    color: #10233f !important;
    font-size: clamp(2.45rem, 12.8vw, 3.5rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.05em !important;
  }

  .home-hero h1 em {
    color: #2563eb !important;
  }

  .home-hero .lead {
    max-width: 100% !important;
    margin-bottom: 0 !important;
    color: #395f80 !important;
    font-size: 1rem !important;
    line-height: 1.58 !important;
  }

  .home-hero .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 22px !important;
  }

  .home-hero .hero-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
  }

  .home-hero .btn.secondary {
    border-color: #b9cae0 !important;
    background: #ffffff !important;
    color: #10233f !important;
  }

  .home-hero .hero-proof {
    margin-top: 18px !important;
    padding: 16px 17px !important;
    border: 1px solid #cfe1f3 !important;
    border-radius: 18px !important;
    background: #eef6ff !important;
    color: #10233f !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .home-hero .hero-proof strong {
    color: #174f79 !important;
    font-size: 1.05rem !important;
  }

  .home-hero .hero-proof span {
    color: #486a82 !important;
    font-size: 0.88rem !important;
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .trust-item {
    min-height: 112px;
    padding: 20px 16px !important;
    border-bottom: 1px solid var(--line);
  }

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  main > section:not(.home-hero):not(.trust) {
    padding-top: 62px !important;
    padding-bottom: 62px !important;
  }

  .section-head {
    display: block !important;
    margin-bottom: 28px !important;
  }

  .section-head p {
    margin-top: 16px !important;
  }

  .practice-gallery-grid {
    gap: 14px !important;
  }

  .practice-photo-card img,
  .practice-photo-card.primary img {
    aspect-ratio: 4 / 3 !important;
  }

  .assessment-help-row {
    gap: 14px !important;
  }

  .assessment-fees-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  #latest .post-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 390px) {
  .home-hero {
    --mobile-hero-image-height: 280px;
  }

  .home-hero .hero-content {
    padding-top: 26px !important;
  }

  .home-hero h1 {
    font-size: 2.4rem !important;
  }

  .trust-item {
    min-height: 104px;
    padding-inline: 13px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero .hero-slide,
  .home-hero .hero-slide.active {
    animation: none !important;
    transition: none !important;
  }
}
