/* Responsive layout guardrails (loaded after page blocks). Full-bleed bands/banners exempt via overflow on section. */

:root {
  --site-gutter: 3rem;
}

@media screen and (max-width: 1400px) {
  :root {
    --site-gutter: 2.8rem;
  }
}

@media screen and (max-width: 1220px) {
  :root {
    --site-gutter: 2.6rem;
  }
}

@media screen and (max-width: 1000px) {
  :root {
    --site-gutter: 2.4rem;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --site-gutter: 20px;
  }
}

@media screen and (max-width: 500px) {
  :root {
    --site-gutter: 16px;
  }
}

body {
  overflow-x: clip;
}

/* Horizontal inset for contained sections (nested .content stays flush per public.css). */
.content {
  box-sizing: border-box;
}

@media screen and (min-width: 769px) {
  .content {
    padding-left: var(--site-gutter);
    padding-right: var(--site-gutter);
  }
}

@media screen and (max-width: 768px) {
  .content {
    padding-left: var(--site-gutter);
    padding-right: var(--site-gutter);
  }
}

header > nav.mega_menu .mega_panel > .content,
header > nav.mega_menu .apps_panel > .content {
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.tcon h1,
.tcon h2,
.tcon h3,
.kh2,
.inner_banner .tcon h1 {
  overflow-wrap: break-word;
}

/* Split section heads: avoid cramped two-column titles between tablet and small laptop */
@media screen and (min-width: 769px) and (max-width: 1220px) {
  .khead.split,
  .application_boards .khead.split,
  .product_related .khead.split {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
  }

  .khead.split > .r {
    max-width: none;
  }
}

/* —— Home: products slider (text vs image vs side list) —— */
@media screen and (min-width: 1025px) and (max-width: 1400px) {
  .home_products .slider {
    padding-left: 6rem;
    padding-right: 6rem;
  }

  .home_products .swiper-slide {
    height: auto;
    min-height: 50rem;
    padding-bottom: 7rem;
  }

  .home_products .swiper-slide .text {
    left: 5rem;
    top: 4.8rem;
    width: min(36rem, 40%);
  }

  .home_products .swiper-slide h3 {
    font-size: 3.6rem;
    line-height: 1.12;
  }

  .home_products .swiper-slide .pic {
    left: auto;
    right: 2rem;
    top: 3.2rem;
    width: min(48rem, 46vw);
    height: 26rem;
  }

  .home_products .side {
    left: 5rem;
    top: auto;
    bottom: 3.2rem;
    right: auto;
    max-width: calc(100% - 10rem);
  }

  .home_products .swiper_btns .btn_prev {
    left: 0;
  }

  .home_products .swiper_btns .btn_next {
    right: 0;
  }

  .home_products .swiper_btns div {
    top: auto;
    bottom: 3.2rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  .home_products .slider {
    padding-left: 0;
    padding-right: 0;
  }
}

/* —— Home: applications —— */
@media screen and (min-width: 769px) and (max-width: 1220px) {
  .home_applications .swiper-slide {
    gap: 2.4rem;
    align-items: stretch;
  }

  .home_applications .info {
    width: min(38rem, 44%);
    min-width: 0;
    padding-bottom: 2rem;
  }

  .home_applications .info h3 {
    font-size: 3.2rem;
    line-height: 1.15;
  }

  .home_applications .pic {
    height: min(52rem, 70vh);
    min-width: 0;
  }
}

@media screen and (max-width: 768px) {
  .home_applications .pic {
    margin-left: calc(-1 * var(--site-gutter));
    margin-right: calc(-1 * var(--site-gutter));
  }
}

/* —— Home: quality carousel (peek without labels off-screen) —— */
.home_quality {
  overflow: hidden;
}

.home_quality .slider {
  overflow: hidden;
}

@media screen and (max-width: 1400px) {
  .home_quality .swiper {
    overflow: hidden;
  }
}

/* —— Home: process (watermark / car / step titles) —— */
@media screen and (min-width: 1025px) and (max-width: 1400px) {
  .home_process .top {
    height: auto;
    min-height: 52rem;
    padding-bottom: 10rem;
  }

  .home_process .watermark {
    top: 22rem;
    margin-left: -55rem;
    font-size: 30rem;
    line-height: 1;
  }

  .home_process .car {
    left: var(--site-gutter);
    width: min(54rem, 44vw);
    height: auto;
    aspect-ratio: 61 / 37;
  }

  .home_process .band {
    height: auto;
    padding-bottom: 6rem;
  }

  .home_process .steps {
    flex-wrap: wrap;
    gap: 2.4rem 0;
  }

  .home_process .steps li {
    width: 25%;
    padding-right: 1.6rem;
    box-sizing: border-box;
  }

  .home_process h3 {
    white-space: normal;
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .home_process .steps p {
    max-width: none;
  }
}

.home_reviews {
  overflow: hidden;
}

.home_reviews .logos {
  overflow: hidden;
}

/* —— Application boards —— */
@media screen and (min-width: 1025px) and (max-width: 1400px) {
  .application_boards .pane {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .application_boards .stage {
    order: -1;
    height: 46rem;
    min-height: 46rem;
  }

  .application_boards .info {
    padding: 4rem;
  }

  .application_boards .info h3 {
    font-size: 3rem;
    line-height: 1.2;
  }
}

.application_boards .panes {
  display: grid;
}

.application_boards .panes > li {
  grid-area: 1 / 1;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none !important;
}

.application_boards .panes > li.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  animation: none !important;
}

/* —— Product related carousel —— */
.product_related .khead.split > .r {
  align-items: flex-start;
}

@media screen and (min-width: 769px) and (max-width: 1220px) {
  .product_related .swiper {
    margin-inline: 0;
    padding-inline: 1.6rem;
  }

  .product_related .txt {
    padding-right: 7rem;
  }
}

/* —— Inner heroes: keep copy off photo edge on medium laptops —— */
@media screen and (min-width: 769px) and (max-width: 1220px) {
  .inner_banner .tcon h1 + p {
    max-width: 52rem;
  }

  .inner_banner.product_hero .hero_row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 46rem);
    gap: 2.4rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1000px) {
  .inner_banner.product_hero .hero_row {
    grid-template-columns: minmax(0, 1fr);
  }

  .inner_banner.product_hero .hero_board {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* —— Blog / news / contact cards —— */
@media screen and (min-width: 769px) and (max-width: 1220px) {
  .blog_list .grid,
  .home_blog .list {
    gap: 2rem;
  }

  .home_blog .list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 500px) {
  .home_products .thumbs {
    grid-template-columns: minmax(0, 1fr);
  }

  .home_products .thumbs li {
    height: auto;
    min-height: 96px;
  }

  footer .f_grid {
    gap: 28px;
  }
}

/* —— Blog: prevent main + sidebar squeezing / overlap between 769px and 1100px —— */
@media screen and (min-width: 769px) and (max-width: 1100px) {
  .blogd_article .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }

  .blogd_article .side {
    position: static;
    max-width: 42rem;
  }
}

@media screen and (min-width: 1025px) and (max-width: 1180px) {
  .blog_news .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1000px) {
  .blog_list .feat {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* —— Contact: form column is 72–80rem; stack before overlap on laptop widths —— */
@media screen and (min-width: 1025px) and (max-width: 1320px) {
  .contact_main .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 5.6rem;
  }

  .contact_main .box {
    max-width: 72rem;
  }
}

/* —— Products listing density —— */
@media screen and (min-width: 769px) and (max-width: 1220px) {
  .products_cat1 .cards,
  .products_cat2 .grid {
    gap: 2rem;
  }
}

/* Product / application FE bands: keep copy off viewport edge */
@media screen and (min-width: 769px) and (max-width: 1220px) {
  .product_apps .body {
    grid-template-columns: minmax(0, 38rem) minmax(0, 1fr);
    gap: 2.4rem;
  }

  .product_apps .tiles span {
    font-size: 1.9rem;
    line-height: 2.4rem;
  }
}