/* AleVi shared hero system — compiled from scss/components/_hero-system.scss */
:root {
  --hero-column-gap: clamp(20px, 3vw, 44px);
  --hero-media-width: 580px;
  --hero-media-height: 375px;
  --hero-media-ratio: 16 / 9;
  --hero-copy-basis: 48%;
  --hero-visual-basis: 52%;
  --hero-cta-height: 48px;
  --hero-cta-width: 224px;
  --hero-cta-gap: 16px;
  --hero-cta-radius: 9px;
}

.page-home .hero .hero__inner,
.about-page .about-intro__grid,
.contacts-page .contact-intro__grid,
.service-page .services-intro__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--hero-column-gap);
  min-width: 0;
}

.page-home .hero .hero__content,
.about-page .about-intro__copy,
.contacts-page .contact-intro__grid > div:first-child,
.service-page .services-intro__layout > div:first-child {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  align-self: center;
}

.page-home .hero .hero__visual,
.about-page .about-intro__art,
.contacts-page .contact-intro__picture,
.service-page .services-intro__photo {
  position: relative;
  inset: auto;
  flex: 0 1 auto;
  width: 100%;
  max-width: var(--hero-media-width);
  max-height: var(--hero-media-height);
  aspect-ratio: var(--hero-media-ratio);
  height: auto;
  min-height: 0;
  margin: 0;
  transform: none;
  align-self: center;
  border-radius: var(--hero-radius);
  overflow: hidden;
  background: var(--color-bg-soft);
}

.page-home .hero .hero__visual::before,
.page-home .hero .hero__visual::after { display: none; }

.page-home .hero .hero__visual img,
.about-page .about-intro__figure--hero img,
.contacts-page .contact-intro__picture img,
.service-page .services-intro__photo img,
.service-page .services-intro__photo .services-intro__photo-main {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: none;
  filter: none;
}

.about-page .about-intro__art {
  display: block;
  min-height: 0;
}
.about-page .about-intro__figure--hero {
  width: 100%;
  height: 100%;
  margin: 0;
  transform: none;
  box-shadow: none;
}
.about-page .about-intro__figure--detail { display: none; }

.page-home .hero .hero__actions,
.about-page .about-intro .info-actions,
.contacts-page .contact-intro .info-actions,
.service-page .services-intro .info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hero-cta-gap);
  align-items: center;
  justify-content: flex-start;
  margin-top: var(--space-6);
}

.page-home .hero .hero__actions > .btn,
.about-page .about-intro .info-actions > .btn,
.contacts-page .contact-intro .info-actions > .btn,
.service-page .services-intro .info-actions > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 var(--hero-cta-width);
  width: var(--hero-cta-width);
  max-width: 100%;
  min-width: 0;
  height: var(--hero-cta-height);
  min-height: var(--hero-cta-height);
  padding: 0 var(--space-4);
  border-radius: var(--hero-cta-radius);
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

.page-home .hero .hero__inner {
  min-height: 0;
  padding-block: clamp(14px, 2vw, 28px);
}
.page-home .hero .hero__visual { box-shadow: var(--shadow-card); }

.about-page .about-intro__grid,
.contacts-page .contact-intro__grid,
.service-page .services-intro__layout { padding-block: var(--space-3); }

.catalog-page .catalog-intro__layout,
.certificates-page .cert-intro__layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
}

.account-landing .account-auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
}
.account-landing .account-auth__form,
.account-landing .account-auth__visual {
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  width: 100%;
}
.account-landing .account-auth__visual > img {
  width: 100%;
  height: auto;
  max-height: var(--hero-media-height);
  aspect-ratio: var(--hero-media-ratio);
  object-fit: contain;
  object-position: center;
}
.account-landing .account-auth__visual-image {
  max-height: var(--hero-media-height);
  aspect-ratio: var(--hero-media-ratio);
  overflow: hidden;
  align-content: center;
}

.product-page .product-detail { align-items: start; }
.product-page .product-detail__image-frame {
  max-height: var(--hero-media-height);
  aspect-ratio: 4 / 3;
}
.product-page .product-detail__main-image { object-fit: contain; }

@media (min-width: 768px) {
  .page-home .hero .hero__inner,
  .about-page .about-intro__grid,
  .contacts-page .contact-intro__grid,
  .service-page .services-intro__layout {
    flex-direction: row;
    align-items: center;
    gap: var(--hero-column-gap);
  }

  .page-home .hero .hero__content,
  .about-page .about-intro__copy,
  .contacts-page .contact-intro__grid > div:first-child,
  .service-page .services-intro__layout > div:first-child {
    flex: 0 1 var(--hero-copy-basis);
    width: var(--hero-copy-basis);
    align-self: center;
  }

  .page-home .hero .hero__visual,
  .about-page .about-intro__art,
  .contacts-page .contact-intro__picture,
  .service-page .services-intro__photo {
    flex: 0 1 var(--hero-visual-basis);
    width: var(--hero-visual-basis);
    max-width: var(--hero-media-width);
    align-self: center;
  }

  .account-landing .account-auth { flex-direction: row; align-items: center; }
  .account-landing .account-auth__form,
  .account-landing .account-auth__visual {
    flex: 0 1 50%;
    align-self: center;
    width: 50%;
  }
  .product-page .product-detail { align-items: center; }
}

@media (max-width: 767px) {
  .page-home .hero .hero__inner,
  .about-page .about-intro__grid,
  .contacts-page .contact-intro__grid,
  .service-page .services-intro__layout { gap: var(--space-4); }

  .page-home .hero .hero__visual,
  .about-page .about-intro__art,
  .contacts-page .contact-intro__picture,
  .service-page .services-intro__photo { width: 100%; max-width: 500px; }

  .page-home .hero .hero__actions > .btn,
  .about-page .about-intro .info-actions > .btn,
  .contacts-page .contact-intro .info-actions > .btn,
  .service-page .services-intro .info-actions > .btn { flex-basis: min(100%, 240px); }
}

@media (max-width: 420px) {
  .page-home .hero .hero__actions > .btn,
  .about-page .about-intro .info-actions > .btn,
  .contacts-page .contact-intro .info-actions > .btn,
  .service-page .services-intro .info-actions > .btn { flex-basis: 100%; width: 100%; }
}
