/* Общая адаптация для телефонов и небольших планшетов. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

img {
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  max-width: 100%;
}

input,
select,
textarea {
  font-size: 16px;
}

@media (max-width: 760px) {
  body > nav {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 14px !important;
    margin: 0 !important;
    padding: 16px 20px 0 !important;
    width: 100% !important;
  }

  body > nav a {
    margin-left: 0 !important;
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
  }

  body > nav .language {
    margin-left: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  body > nav select {
    min-height: 44px;
  }

  header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 18px 20px !important;
  }

  header img {
    width: 118px !important;
  }

  header nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 10px 14px !important;
    width: 100%;
  }

  header > div {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 14px !important;
  }

  header a,
  header select {
    min-height: 44px;
  }

  header select {
    margin-left: 0 !important;
    width: auto !important;
  }

  header a {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
  }

  main {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.25rem) !important;
    line-height: 1.04 !important;
  }

  h2 {
    font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
    line-height: 1.12 !important;
  }

  .hero {
    gap: 28px !important;
    min-height: auto !important;
    padding-top: 36px !important;
  }

  .hero,
  .split,
  .form,
  .banner,
  .upload,
  .calendar,
  .principles,
  .footer-inner,
  .cards,
  .pricing,
  .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .top {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

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

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

  .gallery img {
    min-height: 150px;
    object-fit: cover;
  }

  .journey {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 78vw);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .journey > * {
    scroll-snap-align: start;
  }

  .hero img.portrait {
    max-height: 440px !important;
    object-position: center top !important;
  }

  .block {
    margin-top: 52px !important;
  }

  .panel,
  .card,
  .feature,
  .form {
    padding: 20px !important;
  }

  .button,
  button[type="submit"] {
    width: 100% !important;
    min-height: 50px;
    text-align: center;
  }

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

  .times label,
  .payment label {
    min-height: 54px;
    display: flex;
    align-items: center;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}

/* Copyright notice in the language of the current page. */
footer::after {
  content: "© 2026 Second Opinion Cancer Center · Все права защищены.";
  display: block;
  margin-top: 16px;
  font-size: 0.86rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: inherit;
  opacity: 0.76;
}

html[lang="en"] footer::after {
  content: "© 2026 Second Opinion Cancer Center · All rights reserved.";
}

html[lang="kk"] footer::after {
  content: "© 2026 Second Opinion Cancer Center · Барлық құқықтар қорғалған.";
}

@media (max-width: 390px) {
  .times {
    grid-template-columns: 1fr !important;
  }

  .steps,
  .gallery {
    grid-template-columns: 1fr !important;
  }
}
