/* Homepage styles for new.medpribor.pro — tuned to medpribor.pro etalon */

.mp-main--home {
  padding-top: 0;
  overflow: hidden; /* green bars / hero stay inside white canvas */
}

.mp-home {
  overflow: hidden;
}

/* --- Hero / wallpaper --- */
.mp-home-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  margin: -22px 0 0; /* etalon: tuck under header */
  padding: 40px 20px;
  background-color: #2a2a2a;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  text-align: center;
  color: #fff;
}

/* Etalon Elementor overlay: rgba(71,71,71,0.78) @ opacity 0.89 */
.mp-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(71, 71, 71, 0.78);
  opacity: 0.89;
  pointer-events: none;
}

.mp-home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  padding: 0 15px;
}

.mp-home-hero__brand {
  margin: 0;
  font-family: Roboto, "Exo 2", sans-serif;
  font-size: 35px;
  font-weight: 700; /* etalon: <b>МЕДПРИБОР ПРО</b> */
  letter-spacing: normal;
  line-height: 42px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.mp-home-hero__lead {
  margin: 0;
  font-family: Roboto, "Exo 2", sans-serif;
  font-size: 35px;
  font-weight: 300;
  line-height: 42px;
  text-transform: uppercase;
  letter-spacing: normal;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.mp-home__body {
  padding-top: 0;
  padding-bottom: 2rem;
}

/* --- Section title bars (mint gradient, canvas-width only) --- */
.mp-home-cats {
  margin: 0;
}

.mp-home-cats--row {
  margin: 0 0 8px;
}

/* First green bar sits flush under hero (etalon gap ≈ 0) */
.mp-home__body > .mp-home-cats:first-child .mp-home-cats__title {
  margin-top: 0;
}

.mp-home-cats__title {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* Stay inside .mp-canvas (1300), never spill onto grey page bg */
  width: min(100vw, var(--mp-canvas, 1300px));
  max-width: min(100vw, var(--mp-canvas, 1300px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  /* etalon: ~37px from bar bottom to tile images (tile has 5px pad) */
  margin: 0 0 32px;
  padding: 20px 16px;
  font-family: "Exo 2", Roboto, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  color: #54595f;
  text-align: center;
  background-color: transparent;
  background-image: linear-gradient(180deg, #c0e6d2 0%, rgba(192, 230, 210, 0.37) 100%);
  border-radius: 0;
  box-shadow: none;
}

.mp-home-cats__title span {
  display: inline-block;
}

.mp-home-tiles {
  margin-top: 0;
  margin-bottom: 12px;
}

/* --- Category tiles --- */
.mp-home .mp-cat-tiles {
  margin-left: -5px;
  margin-right: -5px;
}

.mp-home .mp-cat-tile {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 5px 8px;
  text-decoration: none !important;
}

.mp-home .mp-cat-tile:hover {
  z-index: 1;
}

.mp-home .mp-cat-tile__box {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: none !important;
}

.mp-home .mp-cat-tile:hover .mp-cat-tile__box {
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.mp-home .mp-cat-tile__media {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  aspect-ratio: 178 / 111;
}

.mp-home .mp-cat-tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.75;
  background: #fff;
  box-shadow: none;
  transition: opacity 1s ease; /* etalon transition-duration: 1s */
}

.mp-home .mp-cat-tile:hover .mp-cat-tile__img,
.mp-home .mp-cat-tile:focus-visible .mp-cat-tile__img {
  opacity: 1;
}

.mp-home .mp-cat-tile__title {
  display: block;
  margin: 10px 0 0;
  padding: 0 4px;
  min-height: 0;
  font-family: "Exo 2", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 400; /* Exo 2 kit has no 500; etalon Roboto 500 ≈ regular here */
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  color: #54595f;
  background: transparent;
  transition: color 0.25s ease;
}

.mp-home .mp-cat-tile:hover .mp-cat-tile__title {
  color: #00bf80;
}

/* Subsequent section titles keep a bit of air above */
.mp-home__body > .mp-home-cats:not(:first-child) .mp-home-cats__title,
.mp-home__body > .mp-home-cats--row + .mp-home-cats .mp-home-cats__title,
.mp-home-promo + .mp-home-cats .mp-home-cats__title,
.mp-home-cats--row + .mp-home-cats .mp-home-cats__title {
  margin-top: 12px;
}

.mp-home-promo + .mp-home-cats--row,
.mp-home-cats + .mp-home-promo {
  margin-top: 4px;
}

/* --- Promo banners (dashed top+bottom only, full canvas width) --- */
.mp-home-promo {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px 24px;
  align-items: center;
  /* Match green bars: edge-to-edge of .mp-canvas, ignore .mp-container pad */
  width: min(100vw, var(--mp-canvas, 1300px));
  max-width: min(100vw, var(--mp-canvas, 1300px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 20px 0;
  padding: 16px 40px;
  background-color: rgba(255, 229, 229, 0.46);
  border: 0;
  border-top: 2px dashed #7a7a7a;
  border-bottom: 2px dashed #7a7a7a;
  border-radius: 0;
  box-shadow: none;
}

.mp-home-promo--pink {
  background-color: rgba(255, 229, 229, 0.46);
}

.mp-home-promo--mint {
  background-color: rgba(232, 247, 241, 0.7);
}

.mp-home-promo__logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.mp-home-promo__text {
  font-family: Roboto, "Exo 2", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: #000;
  text-align: right;
}

.mp-home-promo__product {
  max-height: 200px;
  width: auto;
  object-fit: contain;
}

.mp-home-promo__btn {
  display: inline-block;
  padding: 12px 24px;
  background: #23a455;
  color: #fff !important;
  font-family: Roboto, "Exo 2", sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.mp-home-promo__btn:hover {
  background: #1e8f4a;
  color: #fff !important;
}

/* --- About --- */
.mp-home-about {
  margin: 28px 0 32px;
  padding: 8px 0 0;
  color: #54595f;
}

.mp-home-about__title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 400;
  color: #54595f;
}

.mp-home-about p {
  margin: 0 0 12px;
  line-height: 1.6;
  font-size: 15px;
}

.mp-home-about__list {
  margin: 14px 0 16px;
  padding-left: 1.25rem;
}

.mp-home-about__list li {
  margin: 6px 0;
  line-height: 1.5;
  font-size: 15px;
}

.mp-home-about__cta {
  margin-top: 18px;
  padding: 14px 18px;
  background: #f2f3f5;
  border-left: 3px solid #00bf80;
  box-shadow: none;
}

.mp-home-about__cta h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #54595f;
}

.mp-home-about__cta p {
  margin: 0;
  font-size: 15px;
}

/* --- Product grids --- */
.mp-home-products {
  margin: 0 0 32px;
}

.mp-home-products__title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 400;
  color: #54595f;
  text-align: center;
}

.mp-home-products__title--sm {
  font-size: 20px;
  font-weight: 500;
}

.mp-home-products .mp-catalog-grid {
  margin-top: 0;
}

.mp-home-products .mp-catalog-grid.columns-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mp-home-products .mp-card__inner {
  box-shadow: none;
}

.mp-home-products .mp-card:hover .mp-card__inner {
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

/* --- FAQ (Elementor toggle cards on etalon) --- */
.mp-home-faq {
  margin: 24px 0 16px;
  max-width: none;
  width: 100%;
}

.mp-home-faq__item {
  margin: 0 0 32px;
  border: 0;
  background: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.12);
}

.mp-home-faq__item:last-child {
  margin-bottom: 0;
}

.mp-home-faq__item summary {
  position: relative;
  display: block;
  padding: 30px 52px 30px 30px;
  font-family: Roboto, "Exo 2", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  letter-spacing: normal;
  cursor: pointer;
  list-style: none;
  color: #54595f;
  text-transform: uppercase;
}

.mp-home-faq__item summary::-webkit-details-marker {
  display: none;
}

/* Chevron-right (closed) / chevron-up (open) — like Elementor FA */
.mp-home-faq__item summary::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #54595f;
  border-bottom: 2px solid #54595f;
  transform: translateY(-50%) rotate(-45deg);
  pointer-events: none;
}

.mp-home-faq__item[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.mp-home-faq__item[open] summary {
  color: #54595f;
}

.mp-home-faq__item p {
  margin: 0;
  padding: 0 35px 28px;
  font-family: Roboto, "Exo 2", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  color: #7a7a7a;
}

@media (max-width: 1100px) {
  .mp-home-products .mp-catalog-grid.columns-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mp-home-promo {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    padding: 16px 20px;
  }

  .mp-home-promo__text {
    text-align: center;
  }

  .mp-home-faq {
    max-width: none;
  }

  .mp-home-faq__item summary {
    padding: 22px 44px 22px 20px;
  }

  .mp-home-faq__item p {
    padding: 0 20px 20px;
  }

  .mp-home-hero {
    min-height: 240px;
    margin-top: -12px;
    padding: 32px 16px;
  }

  .mp-home-hero__brand,
  .mp-home-hero__lead {
    font-size: 28px;
    line-height: 34px;
  }

  .mp-home-cats__title {
    font-size: 20px;
    line-height: 1.2;
    padding: 16px 12px;
    margin-bottom: 20px;
  }

  .mp-home-products .mp-catalog-grid.columns-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mp-home-products .mp-catalog-grid.columns-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mp-home-hero__brand,
  .mp-home-hero__lead {
    font-size: 22px;
    line-height: 28px;
  }

  .mp-home-cat-tile__title,
  .mp-home .mp-cat-tile__title {
    font-size: 14px;
  }

  .mp-home-cats__title {
    font-size: 18px;
  }
}
