/* English pages have longer navigation labels and need their mobile header sooner. */
@media (max-width: 1100px) {
  header {
    position: relative;
    gap: 10px;
  }

  header nav {
    display: none;
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 20px;
    left: 20px;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgb(21 46 85 / 16%);
  }

  header nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
  }

  header nav > a,
  header .nav-parent {
    display: block;
    padding: 10px 12px;
    border-radius: 5px;
  }

  header .nav-group {
    display: block;
  }

  header .submenu {
    position: static;
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    margin: 0 8px 7px;
    padding: 3px;
    border: 0;
    background: #f5f7fa;
    box-shadow: none;
  }

  header .submenu a {
    padding: 7px 9px;
    white-space: normal;
  }

  header .nav-group > .nav-parent::after {
    display: none;
  }

  header .menu {
    display: block;
    flex: 0 0 auto;
    padding: 8px;
    background: none;
    color: var(--navy);
    font-size: 22px;
    line-height: 1;
  }

  header .brand {
    padding-right: 0;
  }

  header .language-switch {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  header nav {
    top: 100%;
  }

  header nav.open {
    grid-template-columns: 1fr;
  }

  header .language-switch {
    position: static;
    margin-left: auto;
  }

  .page-hero h1,
  .seo-hero h1,
  .app-hero h1,
  .news-hero h1 {
    overflow-wrap: anywhere;
  }

  .actions {
    flex-wrap: wrap;
  }

  .news-filters {
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
  }
}

@media (max-width: 430px) {
  header {
    padding-inline: 16px;
  }

  header .brand img {
    width: 62px;
  }

  header .language-switch {
    padding: 2px;
  }

  header .language-switch a,
  header .language-switch strong {
    min-width: 23px;
    padding: 3px;
  }

  header .header-actions .btn.small {
    padding: 8px;
  }

  .page-hero,
  .seo-hero,
  .news-hero {
    padding-inline: 18px;
  }

  .page-hero h1,
  .seo-hero h1,
  .app-hero h1 {
    font-size: clamp(36px, 11.5vw, 46px);
    letter-spacing: -2.2px;
  }

  .news-hero h1 {
    font-size: clamp(40px, 13vw, 50px);
  }

  .page-hero p,
  .seo-hero > div > p {
    font-size: 16px;
  }

  .page-hero aside,
  .seo-hero aside,
  .contact-card {
    padding: 24px 20px;
  }

  .content-section,
  .seo-content,
  .seo-related,
  .app-purpose,
  .app-steps,
  .app-faq,
  .news-list {
    padding-inline: 18px;
  }

  .content-intro p,
  .seo-main p {
    font-size: 16px;
  }

  .info-card,
  .app-feature-grid article {
    min-height: 0;
  }

  .steps-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .page-cta,
  .seo-cta,
  .app-cta,
  .news-cta,
  .language-band {
    padding-inline: 18px;
  }

  footer {
    grid-template-columns: 62px minmax(0, 1fr);
    padding-inline: 18px;
  }

  footer img {
    max-width: 100%;
  }
}

@media (max-width: 350px) {
  header .header-actions {
    display: none;
  }

  header nav {
    right: 10px;
    left: 10px;
  }

  .btn {
    width: 100%;
  }
}
