/* v121 | Can EBIRI ekran uyumu | 11.11.2026
 * 1920px referans tasarimi korunur. Sadece kirilan genislikler iyilestirilir.
 * Admin panelini etkilemez; sadece ziyaretci site CSS'inden sonra yuklenir.
 */

/* Global, non-destructive overflow protection for public content. */
html body .site-box, html body .site-box > main {min-width:0;}
html body .site-box .wrap, html body .site-box :is(.gallery-panel,.article-card,.content-card,.cms-home-content-section) {min-width:0;}
html body .site-box :is(.rich-content,.about-description,.detail-card,.article-body) :is(img,video,iframe) {
  max-width:100%;
}
html body .site-box :is(.rich-content,.about-description,.detail-card,.article-body) img {height:auto;}

/* Desktop mid widths: retain the 22-inch reference's two-row layout,
 * prevent the menu and contact pills from competing for a fixed width. */
@media (min-width:1251px) and (max-width:1599px) {
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header > .nav {
    column-gap:10px!important;
    width:calc(100% - 44px)!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .cms-header-contact-social {
    min-width:0!important;
    gap:clamp(5px,.6vw,11px)!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .cms-header-contact-item {
    padding:7px 9px!important;
    gap:5px!important;
    font-size:clamp(10.5px,.78vw,12.5px)!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .cms-header-social-icons {
    gap:4px!important;
    padding-left:9px!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .cms-header-social-link {width:29px!important;height:29px!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav {
    flex-wrap:nowrap!important;
    justify-content:space-between!important;
    gap:clamp(1px,.3vw,5px)!important;
    min-width:0!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav .cms-nav-item {flex:0 1 auto!important;min-width:0!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav .cms-nav-item > a {
    font-size:clamp(10.5px,.8vw,12.5px)!important;
    padding:9px clamp(3px,.46vw,8px)!important;
    gap:4px!important;
    white-space:nowrap!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav .t1-nav-icon {font-size:14px!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .headercta {
    font-size:clamp(12px,.87vw,14px)!important;
    padding:9px 14px!important;
  }
}

/* Narrow desktops and tablets: navigation turns into an accessible drawer.
 * Keeping 8 full-length labels on one line is the actual source of breakage. */
@media (min-width:768px) and (max-width:1250px) {
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header {z-index:100!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header > .nav {
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto auto!important;
    grid-template-rows:minmax(75px,auto)!important;
    grid-template-areas:'brand contacts cta toggle'!important;
    align-items:center!important;
    justify-content:stretch!important;
    column-gap:clamp(8px,1.1vw,18px)!important;
    row-gap:0!important;
    width:calc(100% - 32px)!important;
    max-width:none!important;
    padding:10px 0!important;
    height:auto!important;
    min-height:0!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .brand {
    grid-area:brand!important;
    min-width:0!important;
    justify-self:start!important;
    max-width:100%!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .cms-header-contact-social {
    grid-area:contacts!important;
    display:flex!important;
    min-width:0!important;
    gap:0!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .cms-header-mail,
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .cms-header-social-icons {display:none!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .cms-header-phone {
    font-size:11.5px!important;
    padding:7px 10px!important;
    white-space:nowrap!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .headercta {
    grid-area:cta!important;
    justify-self:end!important;
    min-height:42px!important;
    margin:0!important;
    padding:8px 13px!important;
    font-size:12px!important;
    white-space:nowrap!important;
    width:auto!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .hamburger {
    grid-area:toggle!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative!important;
    z-index:106!important;
    margin:0!important;
    width:44px!important;height:44px!important;
    border:1px solid #cae8f9!important;
    border-radius:13px!important;
    background:#f0f9ff!important;
    color:#1269a1!important;
    font-size:25px!important;
    cursor:pointer;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav {
    display:none!important;
    position:absolute!important;
    grid-area:unset!important;
    top:100%!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-height:calc(100dvh - 90px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    gap:3px!important;
    margin:0!important;
    padding:14px!important;
    z-index:105!important;
    background:#fff!important;
    border:1px solid #d9eefa!important;
    border-radius:0 0 17px 17px!important;
    box-shadow:0 17px 32px rgba(15,68,113,.17)!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav.open {display:flex!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav #mainNav .cms-nav-item {
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav #mainNav .cms-nav-item > a {
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    padding:11px 13px!important;
    font-size:13px!important;
    white-space:normal!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav #mainNav .cms-submenu {
    position:static!important;
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    padding:4px 0 4px 10px!important;
    margin:0!important;
    border:0!important;
    border-left:2px solid #cce6f6!important;
    box-shadow:none!important;
    background:#f8fcff!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav #mainNav .cms-submenu a {white-space:normal!important;}
}

@media (min-width:768px) and (max-width:960px) {
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .cms-header-contact-social {display:none!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header > .nav {
    grid-template-columns:minmax(0,1fr) auto auto!important;
    grid-template-areas:'brand cta toggle'!important;
  }
  /* Feature and service cards may reflow; the content and colors stay intact. */
  html.cms-home-template1 body .site-box #anasayfa > .stats.cms-v83-feature-strip {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html.cms-home-template1 body .site-box #anasayfa #hizmetler .clinic-v91-service-grid {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html.cms-layout-semi body .site-box #anasayfa .cms-home-content-section .article-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* The previous menu stylesheet only covered <=760px even though the header
 * used <=767px. Fill that seven-pixel gap without modifying the mobile look. */
@media (min-width:761px) and (max-width:767px) {
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .hamburger {display:flex!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav {
    display:none!important;
    position:absolute!important;
    top:100%!important;left:0!important;right:0!important;
    width:100%!important;max-height:calc(100dvh - 100px)!important;
    overflow-y:auto!important;
    flex-direction:column!important;align-items:stretch!important;
    margin:0!important;padding:14px!important;
    z-index:110!important;background:#fff!important;
    box-shadow:0 14px 28px rgba(18,58,112,.17)!important;
  }
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > #mainNav.open {display:flex!important;}
}

/* More compact text only on very small phones, without shrinking the logo. */
@media (max-width:400px) {
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .brand {min-width:0!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .brand .template1-brand-text {min-width:0!important;}
  html:is(.cms-home-template1,.cms-unified-header) body .site-box > header.header .nav > .brand .template1-brand-text strong {
    font-size:clamp(13.5px,3.9vw,16px)!important;
  }
}
