/* =========================================
   1. HEADER ANA DÜZENİ (LAYOUT)
   ========================================= */

header {
  background-color: #f5ecc2; 
  height: auto; 
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  padding-bottom: 0.5rem;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- LOGO ALANI --- */
.logo-area {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

/* --- NAVİGASYON (MENÜ) --- */
nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

button.nav-link {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
}

.nav-link:hover, button.nav-link:hover {
  color: var(--green-main);
}

/* --- HEADER SAĞ TARAFI (Arama + Butonlar) --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* =========================================
   2. ARAMA ÇUBUĞU (SEARCH)
   ========================================= */

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg-main);
  padding: .35rem .35rem .35rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  font-size: .85rem;
  width: 280px;
  transition: all 0.3s ease;
}

.header-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: .85rem;
  flex: 1;
  color: var(--text-main);
  min-width: 0;
}

.header-search-btn {
  border-radius: 999px;
  border: none;
  padding: .4rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  background: var(--green-main);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

/* =========================================
   3. BUTONLAR (CTA)
   ========================================= */

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  border: 2px solid transparent;
  white-space: nowrap;
  background: #97acc8;
  color: #437742;
  box-shadow: 0 4px 10px rgba(151,172,200, 0.3);
}

.header-cta.header-cta-secondary {
  background: var(--bg-panel);
  color: var(--green-deep);
  box-shadow: none;
}

/* --- TOP BAR --- */
.top-bar {
  background-color: var(--green-deep);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  padding: 0.4rem 0;
  width: 100%;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
}
/* =========================================
   4. MOBİL DÜZENLEMELER (KESİN ÇÖZÜM)
   ========================================= */
@media (max-width: 768px) {
  /* Ana kapsayıcıyı dikey yap ve taşmayı engelle */
  .header-inner {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    padding: 1rem !important;
    overflow: hidden; 
  }

  /* Menü linklerini 2'şerli veya 3'erli grupla, birbirine girmesinler */
  nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
    width: 100% !important;
    margin: 1rem 0 !important;
  }

  /* Arama ve Butonların olduğu sağ kısmı dikey yap */
  .header-right {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
  }

  /* Arama çubuğunu ve butonları tam genişlik yap */
  .header-search, 
  .header-cta {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Top bar (İletişim kısmı) metinleri sığmıyorsa küçült */
  .top-bar-inner {
    flex-direction: column;
    font-size: 0.7rem;
    line-height: 1.4;
  }
}