@media (hover: hover) {
  .header__menu-toggle:hover,
  .header__burger:hover,
  .header__phone-mobile:hover {
    box-shadow: 0 0 12px 0 var(--s-malina-5);
  }
}

/* ================= TABLET — 1200px ================= */
@media (max-width: 1200px) {
  .container {
    padding: 0 40px;
  }

  header .nav__list {
    gap: 20px;
  }

  header .nav__link {
    white-space: nowrap;
  }

  .catalog__grid,
  .steps__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .footer__col {
    padding-right: 20px;
  }

  .footer__col:nth-child(2n) {
    padding-right: 0;
    border-right: none;
  }

  .footer__col:nth-child(n + 3) {
    margin-top: 40px;
    padding-top: 0;
    border-top: none;
  }

  .service-page__sidebar {
    width: auto;
  }
  .service-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header__menu-toggle[aria-expanded="true"],
  .header__burger[aria-expanded="true"],
  .header__phone-mobile[aria-expanded="true"] {
    box-shadow: 0 0 12px 0 var(--s-malina-5);
  }
}

/* ================= TABLET — 769–1024px (скрін 4, розгорнутий хедер) ================= */
@media (max-width: 1024px) and (min-width: 769px) {
  .topbar__slogan {
    display: none;
  }

  .header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0;
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .header.is-nav-open .header__inner {
    padding-bottom: 0;
  }

  .header__logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .header__logo img {
    width: 200px;
    max-height: 80px;
  }

  .header__menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .header__phone-tablet {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .header__phone-desktop,
  .header__burger,
  .header__phone-mobile {
    display: none;
  }

  .header__menu-label,
  .nav__link {
    text-transform: uppercase;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    justify-content: center;
    width: 100%;
    margin-top: 0;
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
  }

  .header.is-nav-open .nav {
    display: flex;
  }

  .nav__list {
    gap: 24px;
  }

  /* На планшетах — тільки розгорнутий хедер, без мобільного оверлею */
  .mobile-nav,
  .mobile-nav.is-open {
    display: none !important;
  }

  body.menu-open {
    overflow: auto;
  }

  /* HERO SLIDER */
  .hero {
    min-height: calc(100svh - 128px);
  }

  .hero__bg img {
    object-position: center top;
  }

  .hero__overlay {
    justify-content: flex-end;
    padding-bottom: 32px;
  }

  .hero__content {
    flex-direction: column;
  }

  .hero__title {
    font-size: 32px;
  }

  .hero__subtitle {
    font-size: 20px;
  }

  .hero__actions {
    width: 100%;
    padding-top: 0;
  }

  /* STATS */
  .stats__inner {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .stat {
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  .stat__value {
    flex-shrink: 0;
  }

  /* ABOUT */
  .about__inner {
    grid-template-columns: 1fr;
  }

  /* CTA */
  .cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta__actions {
    width: 100%;
  }

  /* FAQ */
  .faq__question {
    font-size: 20px;
  }
}

@media (max-width: 1023px) {
  .pricing-card {
    flex-direction: column;
  }

  .pricing-card__body {
    gap: 12px;
  }

  .pricing-card__image-wrap {
    max-width: 100%;
  }

  .pricing-card__aside {
    align-items: start;
    padding-block-start: 0;
    padding-block-end: 24px;
    gap: 20px;
  }

  .contacts__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card--messengers {
    order: 5;
  }

  .service-page__layout {
    flex-direction: column;
  }
  .service-page__sidebar {
    width: 100%;
  }
}

/* ================= MOBILE — 768px (ГОЛОВНА МОБ, Figma 2103:470) ================= */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  /* TOPBAR */
  .topbar {
    display: none;
  }

  /* HEADER */
  .header {
    position: sticky;
    top: 0;
    z-index: 202;
    background: var(--color-dark);
    border-bottom: 1px solid var(--color-border);
  }

  .header__inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    min-height: 107px;
    gap: 12px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .header__logo {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
  }

  .header__logo img {
    width: 200px;
    max-width: 100%;
    max-height: 67px;
  }

  .header__menu-toggle,
  .nav,
  .header__phone-tablet,
  .header__phone-desktop {
    display: none;
  }

  .header__burger,
  .header__phone-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border: 2px solid var(--color-accent);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
  }

  .header__burger {
    order: -1;
  }

  .header__logo {
    order: 0;
  }

  .header__phone-mobile {
    order: 1;
  }

  .header__burger svg {
    width: 28px;
    height: 19px;
  }

  .header__burger svg rect {
    transform-box: fill-box;
    transform-origin: center;
    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }

  .header__burger[aria-expanded="true"] svg rect:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .header__burger[aria-expanded="true"] svg rect:nth-child(2) {
    opacity: 0;
  }

  .header__burger[aria-expanded="true"] svg rect:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header__phone-mobile img {
    width: 30px;
    height: 30px;
    filter: brightness(0) saturate(100%) invert(93%);
  }

  .mobile-nav {
    top: 107px;
  }

  body.menu-open .header {
    border-bottom: none;
  }

  .mobile-nav__link {
    font-size: 16px;
    text-transform: none;
  }

  .mobile-nav__messengers-title {
    text-transform: none;
  }

  /* HERO */
  .hero {
    --mobile-header-h: 107px;
    height: calc(100svh - var(--mobile-header-h));
    min-height: calc(100svh - var(--mobile-header-h));
    max-height: calc(100svh - var(--mobile-header-h));
  }

  .inner-page .hero--small {
    min-height: 240px;
    height: auto;
  }

  .hero__bg img {
    object-position: center 20%;
  }

  .hero__overlay {
    height: 100%;
    justify-content: flex-end;
    padding: 16px 0 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 49.52%, #000 100%);
  }

  .inner-page .hero--small .hero__overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
  }

  .hero__content {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex-shrink: 0;
  }

  .hero__title {
    max-width: none;
    font-size: 36px;
    line-height: 1.15;
  }

  .hero__subtitle {
    margin-top: 12px;
    font-size: 24px;
    line-height: 1.25;
  }

  .hero__actions {
    width: 100%;
    margin-top: 20px;
    gap: 20px;
    padding-top: 0;
  }

  .hero__actions .btn--outline {
    text-transform: uppercase;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    min-height: 44px;
  }

  /* Короткі екрани — щоб текст і кнопки вміщались без скролу */
  /*   @media (max-height: 740px) {
    .hero__title {
      font-size: 30px;
    }

    .hero__subtitle {
      font-size: 20px;
      margin-top: 10px;
    }

    .hero__actions {
      margin-top: 12px;
      gap: 10px;
    }

    .hero__overlay {
      padding: 12px 0 16px;
    }

    .hero__actions .btn--outline {
      font-size: 14px;
      padding: 10px 16px;
      min-height: 40px;
    }
  } */

  /* STATS */
  .stats {
    padding: 40px 0;
  }

  .stats__inner {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .stat {
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  .stat__value {
    width: auto;
    min-width: 0;
    flex-shrink: 0;
    font-size: 32px;
  }

  .stat__label {
    font-size: 16px;
    flex: 0 1 auto;
    text-align: left;
  }

  /* SECTION HEADINGS — по центру (моб. макет) */
  .catalog__header .section-title,
  .catalog__header .section-subtitle,
  .steps__header .section-title,
  .steps__header .section-subtitle,
  .faq__header .section-title,
  .faq__header .section-subtitle,
  .cta__title,
  .cta__text {
    text-align: center;
  }

  .section-title {
    font-size: 32px;
    line-height: 1.2;
  }

  .section-title--left {
    text-align: left;
    font-size: 32px;
  }

  .section-subtitle {
    font-size: 20px;
    line-height: 1.3;
  }

  .catalog__header,
  .steps__header,
  .faq__header {
    margin-bottom: 40px;
  }

  .catalog__header .section-subtitle {
    margin-top: 24px;
  }

  .steps__header .section-subtitle--light {
    margin-top: 12px;
  }

  .faq__header .section-subtitle {
    margin-top: 12px;
  }

  /* CATALOG */
  .catalog,
  .steps,
  .about,
  .faq,
  .seo,
  .pricing,
  .cta {
    padding: 40px 0;
  }

  .catalog__grid,
  .steps__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card__image {
    aspect-ratio: 390 / 260;
    height: auto;
  }

  .card--vertical .card__image {
    aspect-ratio: 420 / 560;
  }

  .card__body {
    gap: 32px;
  }

  .card__title,
  .card__title a {
    font-size: 24px;
    line-height: 1.2;
  }

  .card__actions {
    flex-direction: row;
    gap: 20px;
  }

  .card__actions .btn {
    flex: 1;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 16px;
  }

  /* STEPS */
  .step {
    padding: 28px 20px;
    gap: 24px;
  }

  .step__title {
    font-size: 26px;
  }

  .step__text {
    font-size: 16px;
  }

  /* ABOUT */
  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__list {
    margin-top: 40px;
  }

  .about__image {
    width: 100%;
    border-radius: 20px;
  }

  /* CTA */
  .cta__inner {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
  }

  .cta__inner > div:first-child {
    width: 100%;
  }

  .cta__title {
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
  }

  .cta__text {
    margin-top: 24px;
    font-size: 20px;
    line-height: 1.3;
    text-align: center;
  }

  .cta__actions {
    width: 100%;
  }

  .cta__actions .btn--outline {
    text-transform: uppercase;
    font-family: "Inter", sans-serif;
  }

  /* FAQ */
  .faq__question {
    justify-content: flex-start;
    gap: 16px;
    font-size: 24px;
    line-height: 1.3;
    padding: 28px 24px;
  }

  .faq__toggle {
    margin-left: 0;
    flex-shrink: 0;
  }

  .faq__answer {
    font-size: 18px;
    line-height: 1.5;
    padding-left: 16px;
    padding-right: 16px;
  }

  .faq__item.is-open .faq__answer {
    padding: 0 16px 28px;
  }

  /* SEO */
  .seo__block {
    text-align: left;
  }

  .seo__block h2 {
    font-size: 32px;
    line-height: 1.2;
  }

  .seo__block p,
  .seo__block li {
    font-size: 16px;
  }

  /* FOOTER */
  .footer {
    padding-top: 40px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer__col {
    padding-right: 0;
    border-right: none;
  }

  .footer__col:not(:first-child) {
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
  }

  .footer__logo img {
    width: 100%;
    max-width: 370px;
    margin-bottom: 24px;
  }

  .footer__links {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer__links ul + ul {
    margin-top: 0;
  }

  .footer__phone {
    padding: 12px 16px;
    font-size: 14px;
  }

  .footer__bottom {
    margin-top: 40px;
    padding: 40px 0;
  }

  .footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    text-align: left;
  }

  .contacts__grid {
    grid-template-columns: 1fr;
  }
}

/* ================= MOBILE — 480px ================= */
@media (max-width: 480px) {
  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 24px;
  }

  .section-title {
    font-size: 28px;
  }

  .catalog__header .section-title {
    font-size: 32px;
  }

  .catalog__header .section-subtitle {
    font-size: 20px;
  }

  .card__title,
  .card__title a {
    font-size: 24px;
  }

  .section-title--left {
    font-size: 32px;
  }

  .faq__header .section-title {
    font-size: 32px;
  }

  .seo__block h2 {
    font-size: 32px;
  }

  .faq__question {
    font-size: 24px;
    line-height: 1.1;
    padding: 20px 16px;
  }

  .faq__answer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .faq__item.is-open .faq__answer {
    padding: 0 16px 20px;
    font-size: 18px;
  }

  .service-media__grid {
    flex-direction: column;
  }

  .service-media__grid .service-media {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .step__title {
    font-size: 22px;
  }
}
