/* =========================
   Header - Koçak Hukuk Ofisi
   Desktop: tek satır (logo + menü + aksiyon)
   Mobile: 2 satır (logo+burger / aksiyonlar) + burger menü
   ========================= */

:root{
  --container: 1240px;
  --text: #111;
  --muted: rgba(17,17,17,.65);
  --line: rgba(0,0,0,.08);
  --bg: #fff;
  --accent: #b08a6c;   /* bej */
  --navy: #0c1526;     /* lacivert */
  --radius: 14px;
}

*{ box-sizing:border-box; }
body{ margin:0; }

.container{
  width: min(var(--container), calc(100% - 40px));
  margin-inline:auto;
}

/* Header shell */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* Desktop default: tek satır */
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height: 76px;
  padding: 0;
}

/* Row wrappers:
   Desktop’ta layoutı bozmasın diye "contents" yapıyoruz.
   Mobile’da tekrar flex olacak. */
.header-row{ display: contents; }

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
  min-width: 260px;
}
.brand-mark{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  color: #1b2a46;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-name{ font-weight:700; letter-spacing:.2px; font-size: 18px; }
.brand-sub{ font-size: 11px; color: var(--muted); letter-spacing:.10em; }

/* Nav */
.primary-nav{ flex: 1; }
.menu{
  list-style:none;
  display:flex;
  align-items:center;
  gap: 22px;
  margin:0;
  padding:0;
  justify-content:center;
}
.menu > li{ position:relative; }
.menu > li > a{
  text-decoration:none;
  color: var(--text);
  font-weight:600;
  font-size: 14px;
  letter-spacing:.06em;
  text-transform: uppercase;
  padding: 10px 4px;
  display:flex;
  align-items:center;
  gap:6px;
}
.menu > li.menu-item-has-children > a:after{
  content:"";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right:4px solid transparent;
  border-top: 5px solid rgba(0,0,0,.45);
  transform: translateY(1px);
}

/* Dropdown */
.menu li ul{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin:0;
  list-style:none;
  box-shadow: 0 14px 40px rgba(0,0,0,.10);
  opacity:0;
  visibility:hidden;
  transform: translateY(8px);
  transition: .18s ease;
  z-index: 1200;
}
.menu li:hover > ul{
  opacity:1;
  visibility:visible;
  transform: translateY(0);
}
.menu li ul li a{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  text-decoration:none;
  color: var(--text);
  font-weight:600;
  font-size: 14px;
}
.menu li ul li a:hover{ background: rgba(176,138,108,.12); }

/* Right actions */
.header-actions{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 360px;
  justify-content:flex-end;
}

.header-phone{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
  font-weight:700;
  white-space:nowrap;
}
.header-phone .icon{ display:grid; place-items:center; color:#000; }
.phone-text{ letter-spacing:.02em; }

.icon-btn{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.icon-btn:hover{ border-color: rgba(0,0,0,.16); }

/* CTA (gölgesiz + ince) */
.cta-group{
  display:inline-flex;
  align-items:stretch;
  border-radius: 16px;
  overflow:hidden;
  box-shadow: none;
  border: 1px solid rgba(0,0,0,.10);
}

.cta-plus{
  width: 50px;
  height: 40px;
  border: 0;
  background: var(--navy);
  color:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.cta-contact{
  height: 40px;
  padding: 0 18px;
  border: 0;
  background: var(--accent);
  color:#fff;
  font-weight: 800;
  letter-spacing: .07em;
  cursor:pointer;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 13px;
}

.cta-plus:hover,
.cta-contact:hover{ filter: brightness(1.03); }

.cta-plus:focus,
.cta-contact:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(176,138,108,.18);
}

/* Burger (desktop’ta gizli) */
.nav-toggle{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:#fff;
  cursor:pointer;
  padding: 10px;
}
.nav-toggle span{
  display:block;
  height:2px;
  background:#111;
  margin: 6px 0;
  border-radius:2px;
}

/* Search overlay */
.search-overlay{
  position: absolute;
  inset: 0 0 auto 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display:none;
}
.search-overlay.is-open{ display:block; }
.search-inner{ padding: 18px 0; }
.search-form{ position:relative; }
.search-form input{
  width:100%;
  height: 70px;
  border-radius: 10px;
  border: 1px solid transparent;
  outline:none;
  font-size: 42px;
  color: #111;
  padding: 0 84px 0 8px;
}
.search-form input::placeholder{ color: rgba(0,0,0,.35); }
.search-close{
  position:absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 0;
  background: var(--accent);
  color:#fff;
  font-size: 26px;
  cursor:pointer;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 2000;
}
.modal.is-open{ display:block; }
.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(10,12,16,.55);
}
.modal-panel{
  position:relative;
  width: min(560px, calc(100% - 28px));
  margin: 7vh auto 0 auto;
  background:#fff;
  border-radius: 18px;
  padding: 18px 18px 16px 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.25);
}
.modal-close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:#fff;
  font-size: 22px;
  cursor:pointer;
}
.modal-title{ margin: 6px 0 6px 0; font-size: 20px; }
.modal-sub{ margin: 0 0 14px 0; color: rgba(0,0,0,.65); }
.modal-form .field{ display:flex; flex-direction:column; gap:6px; margin-bottom: 12px; }
.modal-form label{ font-weight:700; font-size: 13px; color: rgba(0,0,0,.75); }
.modal-form input,
.modal-form textarea{
  width:100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 15px;
  outline:none;
}
.modal-form input:focus,
.modal-form textarea:focus{
  border-color: rgba(176,138,108,.55);
  box-shadow: 0 0 0 4px rgba(176,138,108,.12);
}
.consent{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size: 13px;
  color: rgba(0,0,0,.75);
  margin: 10px 0 14px 0;
}
.btn-submit{
  width:100%;
  height: 44px;
  border-radius: 14px;
  border:0;
  background: #111;
  color:#fff;
  font-weight: 800;
  cursor:pointer;
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 860px){
  /* 2 satır */
  .header-inner{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding: 10px 0 12px 0;
    min-height: unset;
  }
  .header-row{ display:flex; width:100%; align-items:center; justify-content:space-between; }
  .header-row-2{ margin-top: 2px; }

  .nav-toggle{ display:block; }

  .brand{
    min-width: 0;
    max-width: 78%;
  }
  .brand-name{
    font-size: 16px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 210px;
  }
  .brand-sub{
    font-size: 11px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 210px;
  }

  .header-actions{
    width:100%;
    min-width: 0;
    justify-content:space-between;
    gap:10px;
  }

  .header-phone{
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:#fff;
  }
  .phone-text{ display:none; }

  .icon-btn{ width:40px; height:40px; }

  .cta-plus{ width:46px; height:40px; }
  .cta-contact{ height:40px; padding: 0 14px; font-size: 13px; }

  /* Mobil menü paneli */
  .primary-nav{
    position: fixed;
    left: 0;
    right: 0;
    top: 110px; /* 2 satır header’a göre */
    background:#fff;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity:0;
    visibility:hidden;
    transition: .18s ease;
    padding: 12px 0 18px 0;
    z-index: 1500;
  }
  .primary-nav.is-open{
    transform: translateY(0);
    opacity:1;
    visibility:visible;
  }

  .menu{
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    padding: 0 20px;
    gap: 6px;
  }
  .menu > li > a{
    justify-content:space-between;
    padding: 12px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,.03);
  }

  /* Mobil dropdown’lar JS ile açılacak */
  .menu li ul{
    position: static;
    opacity:1;
    visibility:visible;
    transform:none;
    box-shadow:none;
    border: 0;
    padding: 6px 0 0 0;
    display:none;
  }
  .menu li.is-open > ul{ display:block; }
  .menu li ul li a{ padding: 10px 10px; background: rgba(0,0,0,.02); }
}

@media (max-width: 380px){
  .brand-name, .brand-sub{ max-width: 175px; }
  .cta-contact{ padding: 0 12px; font-size:12px; }
  .primary-nav{ top: 116px; }
}
/* =========================
   Mobile UX tweaks (CTA + burger)
   ========================= */

.header-right{
  display:flex;
  align-items:center;
  gap:12px;
}

/* burger çerçevesini kaldır */
.nav-toggle-clean{
  border: 0 !important;
  background: transparent !important;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.nav-toggle-clean:hover{
  background: rgba(0,0,0,.04) !important;
}

/* CTA biraz küçülsün */
.cta-plus{ width: 44px; height: 38px; }
.cta-contact{ height: 38px; padding: 0 12px; font-size: 12px; letter-spacing:.06em; }
.cta-group{ border-radius: 14px; }

/* burger içi hızlı aksiyonlar */
.nav-quick{
  display:none; /* desktop'ta kapalı */
}

@media (max-width: 860px){
  .header-inner{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding: 10px 0 12px 0;
    min-height: unset;
  }
  .header-row{ display:flex; width:100%; align-items:center; justify-content:space-between; }

  /* Artık 2. satır yok: row-2 kaldırıldı */
  .header-row-2{ display:none !important; }

  /* mobil menü paneli üstten açılacak */
  .primary-nav{
    top: 78px; /* sadece tek satır header var artık */
  }

  .nav-quick{
    display:flex;
    gap:10px;
    padding: 0 20px 12px 20px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    margin-bottom: 10px;
  }

  .nav-quick-btn{
    flex:1;
    display:flex;
    align-items:center;
    gap:10px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background:#fff;
    color:#111;
    text-decoration:none;
    padding: 0 12px;
    cursor:pointer;
  }
  .nav-quick-btn .qtext{
    font-weight:700;
    font-size: 13px;
  }
}
/* MENÜ butonu (CTA diliyle uyumlu) */
.menu-btn{
  height: 38px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;              /* istersen bej yaparız */
  color:#111;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor:pointer;
  white-space: nowrap;
}

.menu-btn:hover{
  border-color: rgba(0,0,0,.16);
  background: rgba(0,0,0,.02);
}

.menu-btn:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(176,138,108,.18);
}

/* Eğer MENÜ de bej olsun dersen: */
/*
.menu-btn{
  background: var(--accent);
  color:#fff;
  border: 1px solid rgba(0,0,0,.10);
}
*/
/* =========================
   Desktop alignment fix
   Logo: left | Nav: center | CTA+MENÜ: right
   ========================= */

@media (min-width: 861px){
  .header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    min-height:76px;
  }

  /* Row wrapper'lar desktop'ta layout bozmasın */
  .header-row{ display: contents; }

  /* Logo solda sabit */
  .brand{
    flex: 0 0 auto;
    min-width: 280px;
  }

  /* Menü ortada */
  .primary-nav{
    flex: 1 1 auto;
    display:flex;
    justify-content:center;
  }
  .menu{
    justify-content:center;
  }

  /* Sağ blok en sağda */
  .header-right{
    flex: 0 0 auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    min-width: 320px;
  }

  /* MENÜ butonu sadece mobil içindi — masaüstünde gizle */
  .menu-btn{
    display:none;
  }

  /* Masaüstünde nav-quick görünmesin */
  .nav-quick{ display:none !important; }
}
/* =========================
   DESKTOP 3-COLUMN FIX
   Left: Brand | Center: Menu | Right: CTA (+ İletişim)
   ========================= */

@media (min-width: 861px){

  /* Header container */
  .header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:76px;
    gap:18px;
  }

  /* Row-1 desktop'ta gerçek flex satır olsun */
  .header-row-1{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
  }

  /* Sol: logo kesin solda */
  .brand{
    flex: 0 0 auto;
    min-width: 320px;
    justify-content:flex-start;
  }

  /* Orta: nav tam ortalı */
  .primary-nav{
    flex: 1 1 auto;
    display:flex;
    justify-content:center;
  }
  .menu{
    justify-content:center;
  }

  /* Sağ: CTA kesin sağda */
  .header-right{
    flex: 0 0 auto;
    min-width: 320px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
  }

  /* Masaüstünde MENÜ butonu gizli (menü zaten ortada) */
  .menu-btn{ display:none; }

  /* Menü içi quick aksiyonlar masaüstünde kapalı */
  .nav-quick{ display:none !important; }

  /* Mobil menü paneli gibi davranmasın */
  .primary-nav{
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
}
@media (min-width: 861px){
  .header-inner{ display:flex; align-items:center; justify-content:space-between; gap:18px; }
  .header-left{ flex:0 0 auto; min-width: 320px; }
  .primary-nav{ flex:1 1 auto; display:flex; justify-content:center; }
  .header-right{ flex:0 0 auto; min-width: 320px; display:flex; justify-content:flex-end; gap:12px; align-items:center; }
  .menu-btn{ display:none; }
  .nav-quick{ display:none !important; }
}
/* =========================
   MOBILE: Logo + CTA/MENÜ aynı satırda kalsın
   Nav panel fixed olarak açılır (satır kırdırmaz)
   ========================= */
@media (max-width: 860px){

  /* 1) Header içi tek satır: sol logo, sağ butonlar */
  .header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding: 12px 0;
    min-height: 72px;
  }

  .header-left{ flex: 1 1 auto; min-width:0; }
  .brand{ min-width:0; }
  .brand-name, .brand-sub{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 220px;
    display:block;
  }

  .header-right{
    flex: 0 0 auto;
    display:flex;
    align-items:center;
    gap:10px;
    justify-content:flex-end;
  }

  /* 2) CTA + MENÜ küçülsün, satır kırmasın */
  .cta-plus{ width:44px; height:38px; }
  .cta-contact{ height:38px; padding:0 12px; font-size:12px; }
  .menu-btn{ height:38px; padding:0 12px; font-size:12px; }

  /* 3) NAV mobilde panel: akıştan çıksın */
  .primary-nav{
    position: fixed;
    left: 0;
    right: 0;
    top: 74px;                 /* header yüksekliğine göre */
    background:#fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 12px 0 18px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: .18s ease;
    z-index: 1500;
  }
  .primary-nav.is-open{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Menü listesi mobil görünüm */
  .menu{
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    padding: 0 20px;
    gap: 6px;
  }
  .menu > li > a{
    justify-content:space-between;
    padding: 12px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,.03);
  }

  /* Mobil dropdownlar */
  .menu li ul{
    position: static;
    display:none;
    opacity:1;
    visibility:visible;
    transform:none;
    box-shadow:none;
    border:0;
    padding: 6px 0 0 0;
    margin:0;
  }
  .menu li.is-open > ul{ display:block; }

  /* Menü içi hızlı aksiyonlar görünür */
  .nav-quick{
    display:flex;
    gap:10px;
    padding: 0 20px 12px 20px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    margin-bottom: 10px;
  }

  .nav-quick-btn{
    flex:1;
    display:flex;
    align-items:center;
    gap:10px;
    height:44px;
    border-radius:12px;
    border:1px solid rgba(0,0,0,.08);
    background:#fff;
    color:#111;
    text-decoration:none;
    padding: 0 12px;
    cursor:pointer;
  }
}
/* =========================
   MOBILE: kesin hizalama kilidi (logo sol, butonlar sağ)
   ========================= */
@media (max-width: 860px){

  .site-header .header-inner{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    padding: 12px 0 !important;
  }

  .site-header .header-left{
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display:flex !important;
    justify-content:flex-start !important;
  }

  .site-header .brand{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    text-align:left !important;
    min-width:0 !important;
    max-width: 100% !important;
  }

  .site-header .brand-text{
    text-align:left !important;
    align-items:flex-start !important;
  }

  .site-header .header-right{
    flex: 0 0 auto !important;
    display:flex !important;
    justify-content:flex-end !important;
    align-items:center !important;
    margin-left:auto !important;
    gap:10px !important;
  }

  /* Çok dar ekranlarda taşmayı engelle */
  .site-header .brand-name,
  .site-header .brand-sub{
    max-width: 200px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* CTA ve MENÜ biraz daha kompakt */
  .site-header .cta-plus{ width:44px !important; height:38px !important; }
  .site-header .cta-contact{ height:38px !important; padding:0 12px !important; font-size:12px !important; }
  .site-header .menu-btn{ height:38px !important; padding:0 12px !important; font-size:12px !important; }
}
@media (max-width: 860px){
  .brand{ gap:10px !important; }
  .brand-mark{ width:38px !important; height:38px !important; }

  .brand-name{ font-size:16px !important; }
  .brand-sub{ font-size:11px !important; }

  /* çok dar ekranda taşma kill switch */
  .brand-name, .brand-sub{ max-width: 170px !important; }
}
/* =========================================
   MOBILE LOCK: Left logo | Right buttons
   (override everything)
   ========================================= */
@media (max-width: 860px){

  /* container bazen text-align:center verir; header içinde iptal */
  .site-header,
  .site-header .container{
    text-align: left !important;
  }

  /* ana satır kesin flex */
  .site-header .header-inner{
    display:flex !important;
    flex-direction: row !important;
    align-items:center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    min-height: 72px !important;
  }

  /* sol blok: asla ortalanmasın */
  .site-header .header-left{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* logo link: auto margin vs iptal */
  .site-header .brand{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align:left !important;
  }

  .site-header .brand-text{
    text-align:left !important;
    align-items:flex-start !important;
  }

  /* sağ blok: kesin sağa yapış */
  .site-header .header-right{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    gap: 10px !important;
    white-space: nowrap !important;
  }

  /* taşma / alt satır düşmesini engelle */
  .site-header .cta-group,
  .site-header .menu-btn{
    flex: 0 0 auto !important;
  }

  /* logo metni çok uzunsa kırpmak için */
  .site-header .brand-name,
  .site-header .brand-sub{
    display:block !important;
    max-width: 170px !important;
    white-space: nowrap !important;
    overflow:hidden !important;
    text-overflow: ellipsis !important;
  }

  /* butonları kompaktlaştır (satır kırılmasın) */
  .site-header .cta-plus{ width: 44px !important; height: 38px !important; }
  .site-header .cta-contact{ height: 38px !important; padding: 0 12px !important; font-size: 12px !important; }
  .site-header .menu-btn{ height: 38px !important; padding: 0 12px !important; font-size: 12px !important; }
}