/* Responsive rules for 360px — 1440px+ */

@media (min-width: 1440px) {
  .container { max-width: 1320px; }
  .section { padding: 5.5rem 0; }
}

@media (max-width: 1199.98px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__inner { gap: 2.5rem; }
}

@media (max-width: 991.98px) {
  .site-header .navbar { min-height: 64px; }
  .navbar-collapse {
    padding: 1rem 0 1.25rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--dg-border);
  }
  .navbar-nav { gap: 0.25rem; }
  .navbar-nav .nav-link { padding: 0.7rem 0.85rem; }
  .nav-actions { margin-left: 0; margin-top: 0.75rem; justify-content: flex-start; }
  .hero { padding: 3.5rem 0 4rem; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__content h1 { max-width: 20ch; }
  .hero__visual { min-height: 300px; max-width: 520px; width: 100%; }
  .hero-card--small { right: 0.5rem; }
  .feature-grid, .selection-grid, .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-teaser-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  .section { padding: 3.25rem 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .hero { padding: 2.75rem 0 3.25rem; }
  .hero::before { width: 300px; height: 300px; top: -150px; right: -140px; }
  .hero__content h1 { font-size: clamp(2.1rem, 8.5vw, 2.9rem); max-width: none; }
  .hero__subtitle { font-size: 1rem; }
  .hero__actions .btn { flex: 1 1 190px; }
  .hero__trust { gap: 0.75rem 1rem; font-size: 0.8rem; }
  .hero__visual { min-height: 285px; }
  .hero-card--main { transform: none; }
  .hero-card--small { transform: none; bottom: 0; }
  .page-hero { padding: 2.5rem 0 2rem; }
  .content-card { padding: 1.4rem; }
  .final-cta__box { padding: 2.5rem 1.25rem; border-radius: 18px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 575.98px) {
  .brand__mark { font-size: 1.25rem; }
  .brand__sub { font-size: 0.82rem; }
  .stats-grid, .feature-grid, .selection-grid, .chapter-grid, .subject-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 1rem; }
  .stat-card__icon { width: 40px; height: 40px; }
  .stat-card__value { font-size: 1.45rem; }
  .feature-card, .selection-card, .chapter-card, .subject-card, .chapter-teaser { padding: 1.15rem; }
  .chapter-teaser { align-items: flex-start; flex-direction: column; }
  .chapter-card__actions { grid-template-columns: 1fr; }
  .selection-card__counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chapter-card__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chapter-stat { padding: 0.55rem; }
  .chapter-stat span { font-size: 0.66rem; }
  .chapter-stat strong { font-size: 1rem; }
  .hero__visual { min-height: 260px; }
  .hero-card--main { padding: 1.15rem; }
  .hero-card--small { width: 170px; padding: 1rem; }
  .hero-card--small strong { font-size: 1.6rem; }
  .hero-card__question { font-size: 1rem; }
  .more-exams { align-items: flex-start; flex-direction: column; }
  .content-card__contact { word-break: break-word; }
  .contact-topic { gap: 0.75rem; }
  .toast-region { left: 1rem; right: 1rem; max-width: none; }
  .digrow-breadcrumb .breadcrumb { font-size: 0.76rem; flex-wrap: wrap; }
}

@media (max-width: 389.98px) {
  .hero__actions .btn { flex-basis: 100%; }
  .hero__trust { flex-direction: column; gap: 0.4rem; }
  .eyebrow { font-size: 0.7rem; }
  .selection-card__counts { gap: 0.35rem; }
  .selection-card__counts strong { font-size: 1.1rem; }
  .selection-card__counts span { font-size: 0.68rem; }
  .language-switch__btn { padding: 0.3rem 0.45rem; min-width: 38px; }
}

@media (min-width: 360px) and (max-width: 430px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
}
