/**
 * DMG MORI lathe landing — page-only CSS overrides.
 * Scoped via .lathe-lp-* widget classes on this page.
 */

/* —— 1) Hero cover: percentage width + vertical margin —— */
.body-container .row-fluid-wrapper.dnd-section:first-of-type .relative.min-h-\[300px\] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 0 !important;
  padding: 1.75rem 5% !important;
}

.body-container .row-fluid-wrapper.dnd-section:first-of-type .relative.min-h-\[300px\] img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 1265px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (min-width: 768px) {
  .body-container .row-fluid-wrapper.dnd-section:first-of-type .relative.min-h-\[300px\] {
    padding: 2.25rem 5% !important;
  }

  .body-container .row-fluid-wrapper.dnd-section:first-of-type .relative.min-h-\[300px\] img {
    width: 90% !important;
  }
}

@media (min-width: 1024px) {
  .body-container .row-fluid-wrapper.dnd-section:first-of-type .relative.min-h-\[300px\] {
    padding: 2.75rem 5% !important;
  }

  .body-container .row-fluid-wrapper.dnd-section:first-of-type .relative.min-h-\[300px\] img {
    width: 83% !important;
  }
}

/* Hero: compact empty blue bar on mobile */
@media (max-width: 767px) {
  .body-container .row-fluid-wrapper.dnd-section:first-of-type
    section.w-full.bg-white
    > .bg-primary-500 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}

/* Mid-page banner image: lighter vertical padding on mobile */
@media (max-width: 767px) {
  .body-container #hs_cos_wrapper_widget_1785330051556 {
    padding-top: 2rem !important;
    padding-bottom: 3rem !important;
  }
}

/* —— 2) DMQP + Turning row-grid images: smaller with margin —— */
.lathe-lp-row-grid .relative.min-h-\[360px\] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 0 !important;
  background: #f4f6f8 !important;
  padding: 1.5rem 1.25rem !important;
}

@media (max-width: 767px) {
  .lathe-lp-row-grid .relative.min-h-\[360px\] {
    min-height: 220px !important;
  }
}

.lathe-lp-row-grid .relative.min-h-\[360px\] img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: 276px !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (min-width: 768px) {
  .lathe-lp-row-grid .relative.min-h-\[360px\] {
    padding: 2rem 1.5rem !important;
  }

  .lathe-lp-row-grid .relative.min-h-\[360px\] img {
    width: 94% !important;
    max-height: 368px !important;
  }
}

@media (min-width: 1024px) {
  .lathe-lp-row-grid .relative.min-h-\[360px\] img {
    width: 86% !important;
    max-height: 414px !important;
  }
}

/* Row-grid: centered separators */
.lathe-lp-row-grid section.w-full.bg-white span.block.h-px.bg-\[\#9d9d9d\] {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Row-grid: mobile text column rhythm (match product rows) */
@media (max-width: 767px) {
  .lathe-lp-row-grid .flex.min-h-\[600px\] {
    min-height: 0 !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .lathe-lp-feeders-header section.bg-white {
    padding-top: 3rem !important;
    padding-bottom: 2.5rem !important;
  }
}

/* Row-grid: vertically centered text on desktop */
@media (min-width: 768px) {
  .lathe-lp-row-grid section.w-full.bg-white > .grid {
    align-items: stretch !important;
  }

  .lathe-lp-row-grid section.w-full.bg-white > .grid > div {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
  }

  .lathe-lp-row-grid section.w-full.bg-white .bg-white.flex {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 100% !important;
    align-items: center !important;
  }

  .lathe-lp-row-grid .flex.min-h-\[600px\] {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .lathe-lp-row-grid section.w-full.bg-white > .grid > div:has(.relative.min-h-\[360px\]) {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
  }

  .lathe-lp-row-grid section.w-full.bg-white > .grid > div:has(.relative.min-h-\[360px\])
    > .relative.min-h-\[360px\] {
    flex: 1 1 auto !important;
    min-height: 100% !important;
  }
}

/* —— 3) Product rows: gray panels flush (no gap between BOSS / MAESTRO) —— */
.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-boss),
.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-boss)
  + .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.lathe-lp-product-boss section.w-full.bg-white,
.lathe-lp-product-maestro section.w-full.bg-white {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.lathe-lp-product-boss .flex.min-h-\[600px\] {
  padding-bottom: 0 !important;
}

.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-boss)
  + .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
  .lathe-lp-product-maestro
  .flex.min-h-\[600px\] {
  padding-top: 0 !important;
}

@media (min-width: 768px) {
  .lathe-lp-product section.w-full.bg-white > .grid > div:has(.relative.min-h-\[360px\]) {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
  }

  .lathe-lp-product section.w-full.bg-white > .grid > div:has(.relative.min-h-\[360px\])
    > .relative.min-h-\[360px\] {
    flex: 1 1 auto !important;
    min-height: 100% !important;
  }
}

/* —— Product image panels (BOSS / MAESTRO): gray bg + contain —— */
.lathe-lp-product .relative.min-h-\[360px\] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 220px !important;
  background: #f4f6f8 !important;
  padding: 1.25rem !important;
}

@media (min-width: 768px) {
  .lathe-lp-product .relative.min-h-\[360px\] {
    min-height: 0 !important;
    padding: 1.5rem !important;
  }
}

.lathe-lp-product .relative img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: 276px !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (min-width: 768px) {
  .lathe-lp-product .relative img {
    width: 94% !important;
    max-height: 345px !important;
  }
}

/* —— 4) Product text column: vertically centered —— */
@media (min-width: 768px) {
  .lathe-lp-product section.w-full.bg-white > .grid {
    align-items: stretch !important;
  }

  .lathe-lp-product section.w-full.bg-white > .grid > div {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
  }

  .lathe-lp-product section.w-full.bg-white .bg-white.flex {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 100% !important;
    align-items: center !important;
  }

  .lathe-lp-product .flex.min-h-\[600px\] {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 767px) {
  .lathe-lp-product .flex.min-h-\[600px\] {
    min-height: 0 !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* —— 5) Success stories: top spacing ≈ 20% of product row height —— */
.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
  + .row-fluid-wrapper.dnd-section.pt-8,
.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
  + .row-fluid-wrapper.dnd-section.md\:pt-12 {
  padding-top: 2.5rem !important;
  margin-top: 0 !important;
}

@media (min-width: 768px) {
  .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
    + .row-fluid-wrapper.dnd-section.pt-8,
  .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
    + .row-fluid-wrapper.dnd-section.md\:pt-12 {
    padding-top: 5rem !important;
  }
}

@media (min-width: 1024px) {
  .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
    + .row-fluid-wrapper.dnd-section.pt-8,
  .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
    + .row-fluid-wrapper.dnd-section.md\:pt-12 {
    /* 20% of ~600px product row */
    padding-top: 7.5rem !important;
  }
}

.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
  + .row-fluid-wrapper.dnd-section
  section.mt-10 {
  margin-top: 0 !important;
}

.row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
  + .row-fluid-wrapper.dnd-section
  .container.pt-8 {
  padding-top: 1.5rem !important;
}

@media (min-width: 768px) {
  .row-fluid-wrapper.dnd-section:has(.lathe-lp-product-maestro)
    + .row-fluid-wrapper.dnd-section
    .container.pt-8 {
    padding-top: 2rem !important;
  }
}
