/* Home page ? immersive extensions on top of avtoyurist-* stack */

.page-home.page-imm .service-category--plain {
  letter-spacing: 0.16em;
}

.page-home.page-imm .service-stat {
  padding: 18px 14px !important;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.page-home.page-imm .service-stat__value {
  font-family: var(--font-serif, "Playfair Display", Georgia, serif) !important;
  font-weight: 700 !important;
  font-size: clamp(1.35rem, 2vw, 1.7rem) !important;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #f4c563 !important;
  color: #f4c563 !important;
}

.page-home.page-imm .service-stat__label {
  font-family: var(--font-sans, system-ui, sans-serif) !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(247, 244, 238, 0.78) !important;
}

.page-home.page-imm .home-about {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 26px;
  align-items: start;
}

.page-home.page-imm .home-about__main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.page-home.page-imm .home-about__copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-home.page-imm .home-about__copy p {
  margin: 0;
  color: var(--imm-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.page-home.page-imm .home-about__copy strong {
  color: var(--imm-text);
  font-weight: 700;
}

.page-home.page-imm .home-director-portrait {
  position: sticky;
  top: 96px;
  height: auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
}

.page-home.page-imm .home-director-portrait .portrait-card__media {
  position: relative;
  flex: 0 0 auto;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: auto !important;
  max-height: none !important;
  line-height: 0;
  background: #0a0712;
}

.page-home.page-imm .home-director-portrait .portrait-card__media img {
  position: static !important;
  inset: auto;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center top !important;
}

.page-home.page-imm .home-director-portrait .portrait-card__meta {
  flex-shrink: 0;
  padding: 20px 22px 22px !important;
}

.page-home.page-imm .home-director-portrait .portrait-card__name {
  font-size: clamp(1.2rem, 1.6vw, 1.45rem) !important;
}

/* DNA embedded under about copy */
.page-home.page-imm .home-dna {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(244, 197, 99, 0.28);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(18, 14, 40, 0.55));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.page-home.page-imm .home-dna__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-home.page-imm .home-dna__title {
  margin: 0;
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  color: #f7f4ee;
  line-height: 1.2;
}

.page-home.page-imm .home-dna__lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(247, 244, 238, 0.72);
}

.page-home.page-imm .home-dna__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-home.page-imm .home-dna__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 8, 22, 0.4);
}

.page-home.page-imm .home-dna__icon {
  width: 120px !important;
  height: 120px !important;
}

.page-home.page-imm .home-dna__name {
  margin: 0 0 4px;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #f7f4ee;
  -webkit-text-fill-color: #f7f4ee;
}

.page-home.page-imm .home-dna__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(247, 244, 238, 0.78);
}

.page-home.page-imm .home-quote {
  margin: 4px 0 0;
  padding: 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(244, 197, 99, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: var(--imm-text);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.05rem;
  line-height: 1.45;
}

.page-home.page-imm .home-quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--imm-gold);
}

.page-home.page-imm .home-svc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1440px) {
  .page-home.page-imm .home-svc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.page-home.page-imm .home-svc {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 14px;
  row-gap: 8px;
  align-items: start;
  min-height: 168px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.page-home.page-imm .home-svc:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 197, 99, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.page-home.page-imm .home-svc__icon {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  width: 120px !important;
  height: 120px !important;
}

.page-home.page-imm .home-svc:hover .home-svc__icon {
  transform: scale(1.04);
}

.page-home.page-imm .home-svc__title {
  grid-column: 2;
  margin: 0;
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(1.4rem, 1.9vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
  color: #f7f4ee;
  -webkit-text-fill-color: #f7f4ee;
}

/* Prevent long titles from escaping their cards */
.page-home.page-imm .home-svc__title {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-home.page-imm #sec-citizens .imm-block__title,
.page-home.page-imm #sec-orgs .imm-block__title {
  font-size: clamp(2rem, 3.2vw, 2.65rem) !important;
}

.page-home.page-imm .home-svc__go {
  grid-column: 2;
  align-self: end;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(244, 197, 99, 0.85);
}

/* Keep "Подробнее" link inside block on narrow laptop widths */
.page-home.page-imm .home-svc__go {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.page-home.page-imm .home-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.page-home.page-imm .home-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--imm-text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.page-home.page-imm .home-tabs a.is-active,
.page-home.page-imm .home-tabs a:hover {
  border-color: rgba(244, 197, 99, 0.5);
  color: #120e22;
  background: linear-gradient(135deg, #f4c563, #d4a574);
}

@media (max-width: 980px) {
  .page-home.page-imm .home-about,
  .page-home.page-imm .home-svc-grid {
    grid-template-columns: 1fr;
  }

  .page-home.page-imm .home-director-portrait {
    position: static;
    min-height: 0;
    max-width: 480px;
    width: 100%;
    margin-inline: auto;
    order: -1;
  }

  .page-home.page-imm .home-about {
    display: flex;
    flex-direction: column;
  }

  .page-home.page-imm .home-director-portrait .portrait-card__media {
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }

  .page-home.page-imm .home-svc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-home.page-imm .home-svc-grid {
    grid-template-columns: 1fr;
  }

  .page-home.page-imm .home-svc__icon,
  .page-home.page-imm .home-dna__icon {
    width: 120px !important;
    height: 120px !important;
  }
}

/* Reviews on homepage ? light type on blue glass, site style */
.page-home .home-reviews {
  display: grid;
  gap: 22px;
  width: 100%;
}

.page-home .home-reviews__rating {
  width: 100%;
  max-width: 28rem;
  margin: 0;
  color: #f7f4ee;
  background: linear-gradient(145deg, rgba(74, 31, 24, 0.55), rgba(18, 12, 34, 0.75));
  border: 1px solid rgba(244, 197, 99, 0.4);
}

.page-home .home-reviews__rating .reviews-rating__score,
.page-home .home-reviews__rating .reviews-rating__stars {
  color: #f4c563;
}

.page-home .home-reviews__rating .reviews-rating__meta {
  color: rgba(247, 244, 238, 0.78);
}

.page-home .home-reviews .review-card__stars {
  margin: 0 0 10px;
  color: #f4c563;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  line-height: 1;
}

.page-home .home-reviews .review-card__text {
  color: rgba(247, 244, 238, 0.88) !important;
}

.page-home .home-reviews .review-card__author {
  color: #f7f4ee !important;
}

.page-home .home-reviews .review-card__place {
  color: rgba(247, 244, 238, 0.62) !important;
}

.page-home .home-reviews .review-card__foot {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.page-home .home-reviews .review-card:hover {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(20, 14, 40, 0.55) 100%
  ) !important;
  border-color: rgba(244, 197, 99, 0.35) !important;
}

.page-home .home-reviews__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

.page-home .home-reviews__actions .btn--ghost {
  color: #f7f4ee;
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
}

.page-home .home-reviews__actions .btn--ghost:hover {
  border-color: #f4c563;
  color: #f4c563;
}
