/* Clean mobile-first homepage surface. */

.ms-home-section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  background: #fff;
}

body:has(.ms-home-hero) .wp-site-blocks {
  display: flex;
  flex-direction: column;
}

body:has(.ms-home-hero) .wp-site-blocks > header,
body:has(.ms-home-hero) .wp-site-blocks > .wp-block-template-part:has(.ms-site-header-wrap) {
  order: 0;
}

body:has(.ms-home-hero) .ms-home-hero {
  order: 1;
}

body:has(.ms-home-hero) .ms-home-services {
  order: 2;
}

body:has(.ms-home-hero) .ms-home-benefits {
  order: 3;
}

body:has(.ms-home-hero) .ms-home-process {
  order: 4;
}

body:has(.ms-home-hero) .ms-home-pricing {
  order: 5;
}

body:has(.ms-home-hero) .ms-home-guarantee {
  order: 6;
}

body:has(.ms-home-hero) .ms-home-testimonials {
  order: 7;
}

body:has(.ms-home-hero) .ms-home-masters {
  order: 8;
}

body:has(.ms-home-hero) .ms-home-faq {
  order: 9;
}

body:has(.ms-home-hero) .ms-home-geo {
  order: 10;
}

body:has(.ms-home-hero) .ms-home-contacts {
  order: 11;
}

body:has(.ms-home-hero) .wp-site-blocks > footer,
body:has(.ms-home-hero) .wp-site-blocks > .wp-block-template-part:has(.ms-site-footer) {
  order: 12;
}

.ms-home-hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(1.2rem, 3vw, 2rem) !important;
  padding-bottom: clamp(3rem, 6vw, 5rem) !important;
  background: #fff !important;
  color: var(--ms-text);
}

.ms-home-hero::before {
  display: none;
}

.ms-home-hero .alignwide {
  position: relative;
  z-index: 1;
}

.ms-home-hero .alignwide::before {
  content: "Miele";
  display: grid;
  align-content: start;
  width: min(100%, 600px);
  aspect-ratio: 1 / 0.68;
  margin: 0 auto clamp(1.2rem, 2.4vw, 1.7rem);
  padding-top: clamp(1.15rem, 3vw, 1.55rem);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  background-color: #b3292e;
  background-image: url("/wp-content/uploads/2024/03/Miele.webp"), linear-gradient(145deg, #b3292e 0%, #9e2328 100%);
  background-repeat: no-repeat;
  background-position: center bottom, center;
  background-size: 92% auto, cover;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 6.5vw, 5.2rem);
  line-height: 0.85;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.ms-hero-grid {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.ms-hero-grid > .wp-block-column:last-child {
  display: none;
}

.ms-hero-copy {
  margin-inline: auto;
}

.ms-hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 0 0.9rem;
  border: 1px solid rgba(183, 34, 52, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--ms-red) !important;
  font-size: 0.82rem;
  font-weight: 780;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ms-hero-copy h1 {
  max-width: 720px;
  margin: 0.85rem auto 0.8rem;
  color: var(--ms-text) !important;
  text-wrap: balance;
}

.ms-hero-copy p {
  max-width: 680px;
  margin-inline: auto;
  color: var(--ms-muted) !important;
}

.ms-hero-copy ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.ms-hero-copy li {
  position: relative;
  min-height: 78px;
  padding: 0.85rem 0.9rem 0.85rem 2.1rem;
  border: 1px solid var(--ms-line);
  border-radius: 18px;
  background: #fff;
  color: #475467 !important;
  box-shadow: var(--ms-shadow-card);
}

.ms-hero-copy li::before {
  content: "";
  position: absolute;
  top: 1.08rem;
  left: 0.85rem;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: var(--ms-red);
}

.ms-hero-actions {
  justify-content: center;
  margin-top: 1.35rem;
  gap: 0.65rem;
}

.ms-hero-actions .wp-block-button:last-child .wp-element-button {
  border: 1px solid var(--ms-line);
  background: #fff;
  color: var(--ms-text);
  box-shadow: none;
}

.ms-home-services,
.ms-home-pricing,
.ms-home-testimonials,
.ms-home-faq {
  background: var(--ms-app-soft);
}

.ms-home-process,
.ms-home-benefits,
.ms-home-guarantee,
.ms-home-masters,
.ms-home-geo {
  background: #fff;
}

.ms-home-contacts {
  background: #111827;
  color: #fff;
}

.ms-home-contacts .wp-block-heading,
.ms-home-contacts p,
.ms-home-contacts a {
  color: inherit;
}

.ms-home-services-query .wp-block-post-template,
.ms-home-pricing-query .wp-block-post-template,
.ms-home-testimonials-query .wp-block-post-template,
.ms-home-masters-query .wp-block-post-template {
  margin: 0;
  padding-left: 0;
  list-style: none;
  gap: 1rem;
}

.ms-home-services-query .wp-block-post-template > li,
.ms-home-pricing-query .wp-block-post-template > li,
.ms-home-testimonials-query .wp-block-post-template > li,
.ms-home-masters-query .wp-block-post-template > li {
  height: 100%;
}

.ms-home-services-query .wp-block-post-template > li .ms-service-card,
.ms-home-pricing-query .wp-block-post-template > li .ms-pricing-card,
.ms-home-testimonials-query .wp-block-post-template > li .ms-testimonial-card,
.ms-home-masters-query .wp-block-post-template > li .ms-master-card {
  height: 100%;
}

.ms-home-services .ms-service-card::before,
.ms-home-pricing .ms-pricing-card::before,
.ms-home-benefits .ms-feature-card::before {
  content: "";
  position: static;
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: var(--ms-app-soft-2);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.07);
  opacity: 1;
}

.ms-home-services .ms-service-card::after,
.ms-home-pricing .ms-pricing-card::after,
.ms-home-benefits .ms-feature-card::after {
  position: absolute;
  top: 1.22rem;
  left: 1.31rem;
  color: var(--ms-red);
  font-weight: 850;
}

.ms-home-services .ms-service-card::after {
  content: "▧";
}

.ms-home-pricing .ms-pricing-card::after {
  content: "₽";
}

.ms-home-benefits .ms-feature-card::after {
  content: "✓";
}

.ms-home-services .ms-service-card > *,
.ms-home-pricing .ms-pricing-card > *,
.ms-home-benefits .ms-feature-card > * {
  position: relative;
}

.ms-home-services .wp-block-post-excerpt,
.ms-home-pricing .ms-pricing-note,
.ms-home-testimonials .ms-testimonial-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.ms-home-services .wp-block-post-excerpt {
  -webkit-line-clamp: 3;
}

.ms-home-pricing .ms-pricing-note,
.ms-home-testimonials .ms-testimonial-card p {
  -webkit-line-clamp: 4;
}

.ms-home-services .wp-block-buttons,
.ms-home-pricing .wp-block-buttons,
.ms-home-testimonials .wp-block-buttons {
  justify-content: center;
  margin-top: 1.25rem;
}

.ms-process-grid {
  gap: 1rem;
}

.ms-step-card {
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

.ms-guarantee-list,
.ms-geo-list {
  margin: 0;
  padding-left: 1.2rem;
}

.ms-guarantee-list li,
.ms-geo-list li {
  margin-bottom: 0.55rem;
}

.ms-map-placeholder {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  text-align: left;
  background: #fff;
}

.ms-cta-banner {
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ms-radius-xl);
  background: rgba(255, 255, 255, 0.05);
}

.ms-contact-card,
.ms-form-shell {
  background: #fff;
  color: var(--ms-text);
}

@media (max-width: 781px) {
  .ms-home-section {
    padding-block: 2.35rem;
  }

  .ms-home-hero {
    padding-top: 1.25rem !important;
    padding-bottom: 2.35rem !important;
    background: var(--ms-app-soft) !important;
  }

  .ms-home-hero .alignwide::before {
    display: none;
  }

  .ms-hero-grid {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
  }

  .ms-hero-copy::before {
    content: "Miele";
    display: grid;
    align-content: start;
    width: 100%;
    aspect-ratio: 1 / 0.92;
    margin: 0 0 1.1rem;
    padding-top: clamp(1.05rem, 5vw, 1.35rem);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background-color: #b3292e;
    background-image: url("/wp-content/uploads/2024/03/Miele.webp"), linear-gradient(145deg, #b3292e 0%, #9e2328 100%);
    background-repeat: no-repeat;
    background-position: center bottom, center;
    background-size: 108% auto, cover;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.6rem, 18vw, 5rem);
    line-height: 0.85;
    font-weight: 900;
    letter-spacing: 0;
    text-align: center;
  }

  .ms-home-hero .wp-block-heading.has-xxl-font-size {
    font-size: 1.85rem !important;
    line-height: 1.12;
  }

  .ms-home-hero .has-m-font-size {
    font-size: 1rem !important;
    line-height: 1.55;
  }

  .ms-hero-copy ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
    margin-top: 1rem;
  }

  .ms-hero-copy li {
    min-height: 0;
  }

  .ms-hero-actions .wp-block-button,
  .ms-hero-actions .wp-block-button__link {
    width: 100%;
  }

  .ms-home-services-query .wp-block-post-template,
  .ms-home-pricing-query .wp-block-post-template,
  .ms-home-testimonials-query .wp-block-post-template,
  .ms-home-process .ms-process-grid {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(252px, 84%);
    grid-template-columns: none !important;
    gap: 0.85rem;
    margin-inline: -1rem;
    padding: 0 1rem 0.45rem;
    overflow-x: auto;
    scroll-padding-inline: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .ms-home-services-query .wp-block-post-template::-webkit-scrollbar,
  .ms-home-pricing-query .wp-block-post-template::-webkit-scrollbar,
  .ms-home-testimonials-query .wp-block-post-template::-webkit-scrollbar,
  .ms-home-process .ms-process-grid::-webkit-scrollbar {
    display: none;
  }

  .ms-home-services-query .wp-block-post-template > li,
  .ms-home-pricing-query .wp-block-post-template > li,
  .ms-home-testimonials-query .wp-block-post-template > li,
  .ms-home-process .ms-process-grid > .wp-block-column {
    width: 100%;
    scroll-snap-align: start;
  }

  .ms-service-card,
  .ms-pricing-card {
    min-height: 232px;
  }
}
