/*
  layout.css
  [KPZ] PURPOSE: Structural layout — container, header row, section spacing, footer grid.
  [KPZ] SCOPE: Site-wide.
  [KPZ] DEPENDENCY: variables.css
*/

.wrap{max-width:var(--container-width);margin:0 auto;padding:0 var(--container-padding);}
.wrap.narrow{max-width:900px;}
/* [KPZ] Wide content block — used where a page's main content should use more of the
   page width than .narrow (900px) allows. 2026-08-13: reverted from flush-left
   (margin-left:0) back to centered — user felt the hard-left version ("sayfanın soluna
   yapışık") looked wrong; this now matches Home's approach instead: a centered container
   with left-aligned text inside it (see also the max-width caps added directly to
   paragraph-level text in components.css, which keep line length readable). */
.wrap.wide-left{max-width:1160px;margin:0 auto;}
/* [KPZ] 2026-08-14, user request: "our team tablolarini 4 profil gorunecek sekilde genislet"
   — team.php's accordion wrap needs more room so 4 enlarged cards (320px + 26px gaps, see
   components.css .team-wrap rules) fit per row. Scoped to .team-wrap (team.php only) rather
   than widening .wrap.wide-left itself, since that class is also used by about.php,
   careers-partner.php and services.php — this keeps those pages' layout untouched. */
.wrap.wide-left.team-wrap{max-width:1524px;}
/* [KPZ] Full-width variant for the Contact page 4-quadrant layout (2026-08-12). */
.wrap.contact-full{max-width:1400px;}
/* [KPZ] BUGFIX 2026-08-13: header-only wide variant. At the site's normal --container-width
   (1220px), the full desktop nav (6 items) + header-actions (Request Consultation + lang
   switch + KPZ SRV Login) need ~1320-1360px of real content width once rendered — more than
   1220px leaves room for. Because .nav-row's outer columns are "1fr" with no minimum, the
   grid silently gave the .brand column 0px (not an overflow/wrap — the logo just vanished)
   on every desktop-width screen (>1560px, i.e. wherever the full nav is shown, regardless of
   how much wider the actual monitor is — this is why it looked fine on a narrowed/mobile
   window but broke on a normal-width or wide desktop screen). Widening just the header's own
   .wrap (not the site-wide --container-width, which other sections still rely on at 1220px)
   gives the row enough real estate for all three columns to size correctly. */
.wrap.wide-header{max-width:1560px;}

/* ---------- HEADER ---------- */
header{position:sticky;top:0;z-index:100;background:var(--header-bg);backdrop-filter:blur(16px);border-bottom:1px solid var(--line);}
/* [KPZ] 2026-08-13: 3-column grid (brand / nav / actions) instead of flex+space-between —
   with flex, the middle nav block wasn't truly centered on the page because the brand and
   header-actions blocks have different widths. Equal 1fr side columns guarantee nav.main-nav
   sits dead-center on desktop regardless of how wide the logo or the actions cluster are. */
.nav-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:var(--header-height);}
/* [KPZ] BUGFIX 2026-08-13: explicit min-width so this column can never be squeezed to 0 again
   the way it just was (see .wrap.wide-header note above) — if content ever again exceeds the
   available row width, the nav/actions columns will now be the ones forced to wrap/overflow
   instead of the logo silently disappearing. Sized comfortably above the logo's own natural
   width (see components.css .brand img) so it never becomes the active constraint in normal use. */
.nav-row .brand{margin-right:0;justify-self:start;min-width:100px;}
.nav-row nav.main-nav{justify-self:center;}
.nav-row .header-actions{justify-self:end;}
/* [KPZ] BUGFIX 2026-08-13: the 100px above is a base floor covering ALL widths, including
   very narrow phones (~375px and below) — verified via automated testing that grid/flex
   items with an image-only child and no explicit min-width can collapse to 0 in a tight
   auto/1fr layout even though display:block on the same markup sizes correctly (a browser
   auto-min-size edge case, not a content problem). Small enough to never fight mobile's
   already-tight header-actions column, but non-zero so the logo can never vanish again. */
/* [KPZ] The larger min-width below only applies once nav.main-nav is actually visible (>1560px,
   see responsive.css) — below that breakpoint the nav column is display:none and there's
   no competition for space, so forcing a floor here would just eat into the room mobile/
   tablet layouts need for header-actions (verified: without this media guard it caused a
   375px-wide viewport to overflow to ~530px). */
@media (min-width:1561px){
  .nav-row .brand{min-width:160px;}
  /* [KPZ] 2026-08-13, user request: logo sat too close to the first nav item. Scoped to this
     same >1560px breakpoint as the min-width above — column-gap only matters once nav.main-nav
     is actually in the middle column (mobile/tablet drop to a 2-column brand|actions row via
     responsive.css, where this extra 40px isn't needed and previously caused ~40px of
     unwanted horizontal overflow by being set unconditionally). */
  .nav-row{column-gap:40px;}
}

/* ---------- PAGE HERO ---------- */
.page-hero{padding:80px 0 60px;}

/* ---------- SECTION ---------- */
.section{padding:80px 0;}
.section-head{margin-bottom:44px;}
/* [KPZ] 2026-08-14 BUGFIX: unlike .section-heading, .section-head never had its own h2
   font-size/weight rule, so headings using it (e.g. Home's "Temel Hizmet Alanlarımız",
   "Referanslar", "Kepez Solutions Hizmet Lokasyonları") fell back to the browser default
   (~24px, regular weight) instead of the site's intended heading style. Found while
   standardizing Home's section headings. */
.section-head h2{font-size:clamp(28px,3.6vw,42px);font-weight:700;color:var(--text);}

/* ---------- FOOTER ---------- */
footer{background:var(--void);color:var(--text-dim);padding:56px 0 24px;border-top:1px solid var(--line);}
.foot-grid{display:grid;grid-template-columns:1.4fr repeat(4,1fr);gap:32px;margin-bottom:40px;}
.foot-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:20px;border-top:1px solid var(--line);font-size:12px;color:#5a5d66;flex-wrap:wrap;gap:12px;}
.foot-bottom-centered{flex-direction:column;justify-content:center;text-align:center;gap:6px;}
.foot-rights{font-size:15px;font-weight:600;color:var(--text-dim);}

/* ---------- ADMIN PANEL LAYOUT (minimal, shares base tokens) ---------- */
.admin-shell{max-width:1040px;margin:0 auto;padding:40px 24px;}
.admin-card{background:var(--void-2);border:1px solid var(--line);border-radius:var(--radius-md);padding:32px;}
.admin-login-wrap{max-width:380px;margin:80px auto;padding:0 24px;}
