/* Главная страница — вёрстка по макету Figma */

:root {
  --home-blue: #326ea3;
  --home-blue-dark: #285882;
  --home-blue-deep: #122638;
  --home-teal: #1a9a92;
  --home-teal-dark: #147a73;
  --home-gray-bg: #f7f7f9;
  --home-radius-xl: 24px;
}

body.home .site-main {
  overflow-x: hidden;
}

/* ——— Hero ——— */
.home-hero {
  padding: 32px 0 48px;
  background: #fff;
}

.home-hero__banner {
  position: relative;
  display: flex;
  align-items: center;
  aspect-ratio: 1440 / 771;
  min-height: 514px;
  max-height: 771px;
  border-radius: 4px;
  background-color: #f8fbfd;
  overflow: hidden;
}

.home-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
  user-select: none;
}

.home-hero__banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.93) 34%,
    rgba(255, 255, 255, 0.72) 48%,
    rgba(255, 255, 255, 0.35) 58%,
    rgba(255, 255, 255, 0.08) 68%,
    transparent 78%
  );
  pointer-events: none;
}

.home-hero__content {
  position: absolute;
  z-index: 1;
  top: 0;
  max-width: min(52%, 560px);
  padding: 10px 0 0 20px;
}

.home-hero__title {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.home-hero__title-line {
  display: block;
  color: var(--home-blue);
}

.home-hero__title-line--dark {
  color: #282828;
}

.home-hero__text {
  margin: 0 0 32px;
  max-width: 530px;
  font-size: 16px;
  line-height: 1.5;
  color: #4a6278;
}

.home-hero__products {
  position: absolute;
  top: 48px;
  right: clamp(24px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.home-hero__product-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 40px;
  padding: 8px 20px;
  background: rgba(15, 77, 130, 0.88);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.home-hero__product-link:hover {
  background: var(--home-blue-dark);
  color: #fff;
  text-decoration: none;
}

.btn--cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 264px;
  min-height: 55px;
  padding: 16px 32px;
  background: var(--home-blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: var(--radius-sm);
  border: none;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(26, 110, 181, 0.25);
  transition: background 0.2s, transform 0.15s;
}

.btn--cta:hover {
  background: #2280cc;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ——— Solutions ——— */
.home-solutions {
  padding: 72px 0 48px;
  background: #fff;
}

.home-solutions__title {
  margin: 0 0 16px;
  text-align: center;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
}

.text-accent {
  color: var(--home-blue);
}

.text-dark {
  color: var(--home-blue-deep);
}

.home-solutions__lead {
  margin: 0 auto 56px;
  max-width: 720px;
  text-align: center;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.6;
}

.solution-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 24px;
  margin-bottom: 32px;
  min-height: 360px;
  overflow: visible;
  box-shadow: 0 12px 40px rgba(15, 77, 130, 0.12);
  background: linear-gradient(135deg, #7eb3eb 0%, #5d9cec 55%, #4a86c8 100%);
}

.solution-card--reverse .solution-card__media {
  order: 2;
  border-radius: 0 var(--home-radius-xl) var(--home-radius-xl) 0;
}

.solution-card--reverse .solution-card__panel {
  order: 1;
  border-radius: var(--home-radius-xl) 0 0 var(--home-radius-xl);
}

.solution-card__media {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #fff;
  border-radius: var(--home-radius-xl) 0 0 var(--home-radius-xl);
  background: border-box;
}

.solution-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.solution-card__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 40px 32px;
  color: #fff;
  overflow: hidden;
  border-radius: 0 var(--home-radius-xl) var(--home-radius-xl) 0;
}

.solution-card__panel::before {
  content: '';
  position: absolute;
  top: 0%;
  left: -15%;
  width: 70%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
  pointer-events: none;
}


.solution-card--pharm {
  background: linear-gradient(135deg, #4a9fd8 0%, #2a6ba8 50%, #0d3d6e 100%);
}

.solution-card--pharm .solution-card__panel::before {
  left: auto;
  right: -15%;
}

.solution-card--dental  {
  background: linear-gradient(135deg, #3eb8c4 0%, #1a8e9b 55%, #0d6e7a 100%);
}

.solution-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  text-align: center;
}

.solution-card__tag {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  border-radius: 999px;
}

.solution-card__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.1;
}

.solution-card__text {
  margin: 0 0 24px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.95;
}

.btn--solution {
  display: inline-block;
  padding: 12px 32px;
  background: #fff;
  border: none;
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn--solution:hover {
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

/* ——— Advantages ——— */
.home-advantages {
  padding: 72px 0;
  background: var(--home-gray-bg);
}

.home-advantages__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 32px;
}

.home-advantages__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
}

.home-advantages__title .text-accent {
  display: block;
  color: var(--home-blue);
}

.home-advantages__title .text-dark-advantages {
  display: block;
  color: #292929;
}

.home-advantages__intro {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.6;
  text-align: end;
}

.home-advantages__cards-panel {
  background: #eceff4;
  border-radius: 20px;
  padding: 24px;
}

.home-advantages__panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--home-radius-xl);
  padding: 48px 40px 40px;
  box-shadow: 0 8px 32px rgba(15, 77, 130, 0.06);
  margin-top: 48px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.advantage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 260px;
  padding: 36px 24px 32px;
  background: #fff;
  border: none;
  border-radius: 15px;
  box-shadow: 0 2px 16px rgba(15, 77, 130, 0.05);
}

.advantage-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 2px solid rgba(50, 110, 163, 0.4);
  background: #fff;
  flex-shrink: 0;
}

.advantage-card__icon {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.advantage-card__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--home-blue-deep);
  line-height: 1.35;
}

.advantage-card__text {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.advantage-card--cta {
  background: linear-gradient(180deg, #72a1d1 0%, #4a85bc 45%, #3e74ab 100%);
  border: none;
  color: #fff;
  justify-content: center;
  box-shadow: none;
}

.advantage-card--cta .advantage-card__icon-wrap {
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

.advantage-card--cta .advantage-card__title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  max-width: 260px;
  margin-bottom: 18px;
}

.advantage-card--cta .btn--white {
  margin-top: auto;
  min-width: 210px;
}

.btn--white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 24px;
  background: #fff;
  color: var(--home-blue);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.btn--white:hover {
  background: #f0f7ff;
  text-decoration: none;
}

.btn--white-outline {
  display: inline-flex;
  padding: 12px 28px;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}

.btn--white-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}

/* ——— Certificates ——— */
.home-certificates {
  padding-top: 0;
}

.home-certificates__inner {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 32px 40px;
  align-items: center;
}

.home-certificates__aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  min-height: 280px;
}

.home-certificates__title {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  color: var(--home-blue-deep);
  line-height: 1.25;
}

.certificates-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-bottom: 8px;
}

.certificates-carousel__viewport {
  flex: 1;
  overflow: hidden;
}

.certificates-carousel__track {
  display: flex;
  gap: 12px;
  transition: transform 0.35s ease;
}

.certificate-slide {
  flex: 0 0 calc(33.333% - 8px);
  min-width: calc(33.333% - 8px);
}

.certificate-slide__zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.certificate-slide__zoom:hover img,
.certificate-slide__zoom:focus-visible img {
  outline: 2px solid var(--color-primary, #326ea3);
  outline-offset: 2px;
}

.certificate-slide img,
.certificate-slide__zoom img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.certificate-slide__zoom img {
  pointer-events: none;
}

.cert-lightbox[hidden] {
  display: none !important;
}

.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 61, 92, 0.72);
}

.cert-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(920px, 92vw);
  max-height: 90vh;
  padding: 48px 56px;
}

.cert-lightbox__image {
  display: block;
  max-width: min(800px, 80vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.cert-lightbox__close,
.cert-lightbox__prev,
.cert-lightbox__next {
  position: absolute;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: #fff;
  color: #1a3d5c;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.cert-lightbox__close:hover,
.cert-lightbox__prev:hover,
.cert-lightbox__next:hover {
  transform: scale(1.05);
}

.cert-lightbox__close {
  top: 0;
  right: 0;
}

.cert-lightbox__prev {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.cert-lightbox__next {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.cert-lightbox__prev:hover,
.cert-lightbox__next:hover {
  transform: translateY(-50%) scale(1.05);
}

body.is-cert-lightbox-open {
  overflow: hidden;
}

.certificates-carousel__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #e8f2fa;
  color: var(--home-blue);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.certificates-carousel__arrow:hover {
  background: #d4e6f5;
  color: var(--home-blue-dark);
}

.certificates-carousel__dots {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.certificates-carousel__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
}

.certificates-carousel__dots button.is-active {
  background: var(--home-blue);
}

/* ——— Consultation ——— */
.home-consultation {
  padding: 72px 0 88px;
  background: var(--home-gray-bg);
}

.home-consultation__title {
  margin: 0 auto 48px;
  max-width: 830px;
  text-align: center;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  line-height: 1.3;
}

.home-consultation__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}

.home-consultation__form-box {
  background: var(--home-blue);
  border-radius: var(--home-radius-xl);
  padding: 40px 40px 36px;
  color: #fff;
}

.home-consultation__title-line {
  display: block;
}

.home-consultation__form-lead {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0.95;
}

.home-form__field {
  display: block;
  margin-bottom: 12px;
}

.home-form__field input,
.home-form__field textarea {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: #fff;
}

.home-form__field textarea {
  resize: vertical;
  min-height: 100px;
}

.home-form__consent {
  display: flex;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  align-items: flex-start;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.home-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.home-form__footer .btn--submit {
  width: auto;
  min-width: 220px;
  flex-shrink: 0;
}

.home-form__consent a {
  color: #9ec9ef;
}

.btn--submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: #2d9cdb;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn--submit:hover {
  background: #3aadf0;
}

.home-consultation__info-box {
  position: relative;
  background: var(--home-blue);
  border-radius: var(--home-radius-xl);
  padding: 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.home-consultation__info-box::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 140px;
  height: 140px;
  opacity: 0.2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96a7.07 7.07 0 00-1.63-.94l-.36-2.54A.49.49 0 0014 2h-4a.49.49 0 00-.49.42l-.36 2.54c-.6.24-1.17.56-1.7.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.13.22.39.3.59.22l2.39-.96c.53.38 1.1.7 1.7.94l.36 2.54A.49.49 0 0010 22h4c.24 0 .45-.18.49-.42l.36-2.54c.6-.24 1.17-.56 1.7-.94l2.39.96c.22.09.47 0 .59-.22l1.92-3.32a.49.49 0 00-.12-.61l-2.01-1.58zM12 15.5A3.5 3.5 0 1112 8a3.5 3.5 0 010 7.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.home-consultation__info-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.home-consultation__info-icon {
  display: none;
}

.home-consultation__info-text {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.5;
  max-width: 280px;
  position: relative;
  z-index: 1;
}

/* Form notice on home */
.home-consultation .form-notice {
  max-width: 720px;
  margin: 0 auto 24px;
}

/* Responsive */
@media (max-width: 1024px) {
  .home-hero__content {
    max-width: 58%;
    padding: 32px 28px;
  }

  .home-hero__products {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
    margin-top: -24px;
    margin-bottom: 32px;
    padding: 0 16px;
    justify-content: center;
  }

  .home-hero__product-link {
    min-width: 140px;
  }

  .solution-card,
  .solution-card--reverse {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .solution-card__media,
  .solution-card--reverse .solution-card__media {
    order: 0;
    min-height: 220px;
    border-radius: var(--home-radius-xl) var(--home-radius-xl) 0 0;
  }

  .solution-card--reverse .solution-card__media {
    border-radius: var(--home-radius-xl) var(--home-radius-xl) 0 0;
  }

  .solution-card__photo {
    min-height: 220px;
  }

  .solution-card__panel,
  .solution-card--reverse .solution-card__panel {
    order: 1;
    min-height: 260px;
    padding: 32px 24px;
    border-radius: 0 0 var(--home-radius-xl) var(--home-radius-xl);
  }

  .home-advantages__panel {
    padding: 32px 24px 28px;
    margin-top: 32px;
  }

  .home-advantages__cards-panel {
    padding: 16px;
  }

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

  .home-advantages__head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-advantages__intro {
    text-align: left;
  }

  .home-consultation__grid {
    grid-template-columns: 1fr;
  }

  .home-certificates__inner {
    grid-template-columns: 1fr;
  }

  .home-certificates__aside {
    min-height: 0;
  }

  .certificate-slide {
    flex: 0 0 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }

  .home-form__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .home-form__footer .btn--submit {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .home-hero__products {
    flex-direction: column;
    align-items: stretch;
  }

  .btn--cta {
    width: 100%;
    min-width: 0;
  }

  .home-advantages__panel {
    padding: 24px 16px 20px;
    margin-top: 24px;
  }

  .home-advantages__cards-panel {
    padding: 12px;
  }

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

  .advantage-card {
    min-height: 0;
  }

  .certificate-slide {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .cert-lightbox__dialog {
    padding: 40px 8px;
  }

  .cert-lightbox__prev,
  .cert-lightbox__next {
    width: 40px;
    height: 40px;
  }

  .certificates-carousel__arrow {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
