/* GERCEK V183 - wide-screen stability and bounded homepage slider.
   Presentation only: CMS content, database, routing and admin controls unchanged. */

/* Grid/flex children can otherwise keep an intrinsic width larger than their
   track, especially when Turkish labels or imported editor text are long. */
body.cms-theme :is(
  .why-us-panel, .why-copy, .why-stats, .managed-grid, .managed-tabs,
  .managed-card, .managed-list, .v83-services-layout, .v83-side-panel,
  .v82-photo-grid, .v82-photo-card, .v82-card-content,
  .partner-head, .faq-v20-list, .footer-grid, .v116-layout,
  .v116-category-stack, .v116-category, .gb155-product-grid,
  .gb155-detail-grid, .gb155-product-card
) {
  min-width: 0;
  max-width: 100%;
}
body.cms-theme :is(.why-us-panel, .why-stats, .managed-grid,
  .v83-services-layout, .v82-photo-grid, .footer-grid,
  .v116-layout, .gb155-product-grid, .gb155-detail-grid) > * {
  min-width: 0;
}
body.cms-theme :is(.hero-copy-v19, .why-copy, .managed-copy,
  .v83-side-content, .v82-card-content, .faq-v20-list) :is(h1,h2,h3,h4,p) {
  max-width: 100%;
  overflow-wrap: break-word;
}
body.cms-theme :is(.managed-media,.v82-photo-card,.gb155-product-visual) img {
  max-width: 100%;
}

/* The original 100vw slider and CMS-width text become disconnected on
   ultra-wide displays (including low browser zoom). Keep one visual frame. */
@media (min-width: 1024px) {
  body.v91-home.cms-theme > .site-header {
    background: linear-gradient(180deg, #f8fcff, #eff7fc);
  }
  body.v91-home.cms-theme .site-header [data-hero-slider].hero-slider-v19 {
    box-sizing: border-box !important;
    width: calc(100% - 48px) !important;
    max-width: 1550px !important;
    margin: 18px auto 26px !important;
    border: 1px solid #d7e8f3;
    border-radius: 22px !important;
    box-shadow: 0 14px 42px rgba(13, 64, 102, .08);
    overflow: hidden !important;
  }
  body.v91-home.cms-theme .site-header [data-hero-slider] > .hero-slide {
    max-width: 100%;
  }
  body.v91-home.cms-theme .site-header [data-hero-slider] .hero-content {
    box-sizing: border-box !important;
    width: min(var(--cms-container, 1320px), calc(100% - 88px)) !important;
    max-width: 100% !important;
    min-width: 0;
  }
  body.v91-home.cms-theme .site-header [data-hero-slider] .hero-copy-v19 {
    flex: 0 1 auto !important;
    width: min(690px, 58%) !important;
    min-width: 0;
    max-width: 100%;
  }
  body.v91-home.cms-theme .site-header [data-hero-slider] .v91-hero-bottom,
  body.v91-home.cms-theme .site-header [data-hero-slider] .hero-features-v19 {
    min-width: 0;
    max-width: 100%;
  }
}

/* Respect large-monitor widths without stretching the site's interior grids.
   This intentionally caps only the presentation width, not images in the CMS. */
@media (min-width: 1800px) {
  body.cms-theme .container {
    width: min(var(--cms-container,1320px), 1480px, calc(100% - 88px)) !important;
    max-width: 1480px !important;
  }
  body.cms-theme #services-showcase.v82-showcase .v82-service-container,
  body.cms-theme #services-showcase.v83-showcase .v82-service-container {
    width: min(var(--cms-container,1320px), 1480px, calc(100% - 88px)) !important;
    max-width: 1480px !important;
  }
  body.cms-theme #architecture.v92-it-map .v92-map-shell {
    max-width: 1480px;
  }
  body.cms-theme .v83-services-layout {
    grid-template-columns: minmax(230px, 285px) minmax(0, 1fr) !important;
  }
}

/* Keep the approved full-bleed mobile hero and its existing mobile paddings. */
@media (max-width: 1023px) {
  body.v91-home.cms-theme .site-header [data-hero-slider].hero-slider-v19 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none;
  }
}
@media (max-width: 640px) {
  body.cms-theme .container { min-width: 0; }
  body.cms-theme :is(.hero-actions,.hero-features-v19,.managed-grid,
    .v82-photo-grid,.faq-v20-list,.gb155-product-grid) { max-width: 100%; }
}
