/* Mobile hero layouts — Figma mobile mockups (desktop unchanged) */

@media (max-width: 768px) {
  :root {
    --mobile-hero-bg: #f7f7f9;
    --mobile-hero-card: #fff;
    --mobile-hero-radius: 24px;
    --mobile-hero-image-radius: 16px;
    --mobile-hero-thumb: 38%;
  }

  /* ——— 1. Главная ——— */
  .home-hero {
    padding: 16px 0 32px;
    background: var(--mobile-hero-bg);
  }

  .home-hero .container {
    padding-inline: 16px;
  }

  .home-hero__banner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    padding: 24px 16px;
    background: var(--mobile-hero-card);
    border-radius: var(--mobile-hero-radius);
    overflow: hidden;
  }

  .home-hero__banner::before {
    display: none;
  }

  .home-hero__content {
    position: static;
    display: contents;
    max-width: none;
    padding: 0;
  }

  .home-hero__title {
    order: 1;
    margin: 0 0 16px;
    text-align: center;
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.2;
  }

  .home-hero__text {
    order: 2;
    margin: 0 0 20px;
    max-width: none;
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
  }

  .home-hero__media {
    order: 3;
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0 0 20px;
    border-radius: var(--mobile-hero-image-radius);
    object-fit: cover;
  }

  .home-hero__content .btn--cta {
    order: 4;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  /* ——— 2. О компании ——— */
  .about-hero {
    padding: 16px 0 32px;
    background: var(--mobile-hero-bg);
  }

  .about-hero .container {
    padding-inline: 16px;
  }

  .about-hero__banner {
    display: grid;
    grid-template-areas:
      "slogan slogan"
      "title media";
    grid-template-columns: 1fr minmax(96px, var(--mobile-hero-thumb));
    gap: 12px 16px;
    align-items: center;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    padding: 16px;
    background: var(--mobile-hero-card);
    border-radius: var(--mobile-hero-radius);
    overflow: hidden;
  }

  .about-hero__content {
    display: contents;
    position: static;
    max-width: none;
    padding: 0;
  }

  .about-hero__title {
    display: contents;
    width: auto;
    margin: 0;
  }

  .about-hero__title-line {
    grid-area: slogan;
    grid-column: 1 / -1;
    margin: 0 0 4px;
    text-align: center;
    text-transform: none;
    font-size: clamp(14px, 3.8vw, 16px);
    font-weight: 600;
    line-height: 1.35;
    color: var(--about-blue, #326ea3);
  }

  .about-hero__title-line--dark {
    grid-area: title;
    align-self: center;
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.15;
    color: var(--about-blue, #326ea3);
  }

  .about-hero__text {
    display: none;
  }

  .about-hero__media {
    grid-area: media;
    position: static;
    width: 100%;
    height: auto;
    min-height: 88px;
    max-height: 120px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* ——— 3. Product-style card (MED / PHARM / DENTAL + inner pages) ——— */
  .med-hero,
  .pharm-hero,
  .dental-hero,
  .page-hero--dist,
  .page-hero--news,
  .page-hero--contacts,
  .page-hero--products,
  .page-hero--info,
  .page-hero--requisites {
    width: 100%;
    margin-inline: 0;
    padding: 16px;
    background: var(--mobile-hero-bg);
  }

  .med-hero__banner,
  .pharm-hero__banner,
  .dental-hero__banner,
  .dist-hero__banner {
    display: grid;
    grid-template-areas:
      "tag tag"
      "title media"
      "btn btn";
    grid-template-columns: 1fr minmax(96px, var(--mobile-hero-thumb));
    gap: 12px 16px;
    align-items: center;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    padding: 16px;
    background: var(--mobile-hero-card);
    border-radius: var(--mobile-hero-radius);
    overflow: hidden;
  }

  .med-hero__banner .container,
  .pharm-hero__banner .container,
  .dental-hero__banner .container,
  .dist-hero__banner .container {
    position: static;
    inset: auto;
    display: contents;
    width: auto;
    margin: 0;
    padding: 0;
    min-height: 0;
  }

  .med-hero__content,
  .pharm-hero__content,
  .dental-hero__content,
  .dist-hero__content {
    display: contents;
    max-width: none;
    padding: 0;
  }

  .med-hero__tag,
  .pharm-hero__tag,
  .dental-hero__tag {
    grid-area: tag;
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
    text-transform: none;
    font-size: clamp(14px, 3.8vw, 16px);
    font-weight: 600;
    line-height: 1.35;
  }

  .med-hero__title,
  .pharm-hero__title,
  .dental-hero__title,
  .dist-hero__title {
    grid-area: title;
    align-self: center;
    margin: 0;
    font-size: clamp(22px, 6.5vw, 30px);
    line-height: 1.1;
  }

  .med-hero__media,
  .pharm-hero__media,
  .dental-hero__media,
  .dist-hero__media {
    grid-area: media;
    position: static;
    width: 100%;
    height: auto;
    min-height: 88px;
    max-height: 120px;
    opacity: 1;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .med-hero__text,
  .pharm-hero__text,
  .dental-hero__text,
  .dist-hero__lead {
    display: none;
  }

  .med-hero__btn,
  .pharm-hero__btn,
  .dental-hero__btn {
    grid-area: btn;
    justify-self: center;
    width: 100%;
    max-width: 320px;
    min-width: 0;
    margin: 4px 0 0;
    text-align: center;
  }

  /* Background-image heroes (news, contacts, products, info, requisites) */
  .news-hero__banner,
  .contacts-hero__banner,
  .products-hero__banner,
  .info-hero__banner,
  .req-hero__banner {
    position: relative;
    display: flex;
    align-items: stretch;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    background-color: var(--mobile-hero-card);
    border-radius: var(--mobile-hero-radius);
    overflow: hidden;
  }

  .news-hero__banner--has-photo,
  .contacts-hero__banner--has-photo,
  .products-hero__banner--has-photo,
  .info-hero__banner--has-photo,
  .req-hero__banner--has-photo {
    background-size: var(--mobile-hero-thumb) 100%;
    background-position: right center;
    background-repeat: no-repeat;
  }

  .news-hero__banner:not(.news-hero__banner--has-photo) .news-hero__content,
  .contacts-hero__banner:not(.contacts-hero__banner--has-photo) .contacts-hero__content,
  .products-hero__banner:not(.products-hero__banner--has-photo) .products-hero__content,
  .info-hero__banner:not(.info-hero__banner--has-photo) .info-hero__content,
  .req-hero__banner:not(.req-hero__banner--has-photo) .req-hero__content {
    max-width: 100%;
  }

  .news-hero__banner .container,
  .contacts-hero__banner .container,
  .products-hero__banner .container,
  .info-hero__banner .container,
  .req-hero__banner .container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 16px;
    min-height: 0;
  }

  .news-hero__content,
  .contacts-hero__content,
  .products-hero__content,
  .info-hero__content,
  .req-hero__content {
    max-width: calc(100% - var(--mobile-hero-thumb) - 8px);
    padding: 0;
    background: none;
  }

  .news-hero__title,
  .contacts-hero__title,
  .products-hero__title,
  .info-hero__title,
  .req-hero__title {
    margin: 0;
    font-size: clamp(22px, 6.5vw, 30px);
    line-height: 1.15;
  }

  .news-hero__lead {
    display: none;
  }

  .products-hero__btn,
  .req-hero__btn {
    align-self: center;
    width: 100%;
    max-width: 320px;
    min-width: 0;
    margin: 0;
    text-align: center;
  }

  .contacts-hero__banner .container > .btn.link {
    width: 100%;
    max-width: 320px;
    min-width: 0;
    margin: 0;
    align-self: center;
    text-align: center;
  }
}
