/*--------------------------------------------------------------
# Header CSS - Optimize Edilmiş
--------------------------------------------------------------*/

/* Header Temel Yapı */
.site-header {
  background-color: #fff;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}

/* Logo Container */
.logo-container {
  padding: 15px 0;
  text-align: center;
  background: #fff;
  position: relative;
}

.logo-container .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* Menu Toggle Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 1001;
}

.menu-toggle:focus {
  outline: thin dotted;
}

.hamburger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  transform: rotate(0deg);
  transition: .5s ease-in-out;
}

.hamburger-line {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger-line:nth-child(1) {
  top: 0px;
}

.hamburger-line:nth-child(2) {
  top: 7px;
}

.hamburger-line:nth-child(3) {
  top: 14px;
}

/* Active state */
.menu-toggle.toggled .hamburger-line:nth-child(1) {
  top: 7px;
  transform: rotate(135deg);
}

.menu-toggle.toggled .hamburger-line:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.menu-toggle.toggled .hamburger-line:nth-child(3) {
  top: 7px;
  transform: rotate(-135deg);
}

/* Site Branding */
.site-branding {
  text-align: center;
  width: 100%;
}

.site-branding.centered-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Logo Stilleri */
#logo {
  display: inline-block;
}

#logo img {
  max-height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

#logo img:hover {
  transform: scale(1.05);
}

/* Site Title */
.site-title h1 {
  font-size: 2rem;
  margin: 0;
  color: #333;
  font-weight: 600;
}

.site-title h1 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.site-title h1 a:hover {
  color: #2baae1;
}

/* Navigation Container */
.navigation-container {
  padding: 12px 0;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.navigation-container .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Main Navigation */
.main-navigation {
  clear: both;
  display: block;
  width: 100%;
}

.main-navigation ul {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.main-navigation li {
  position: relative;
  margin: 0;
}

.main-navigation a {
  display: block;
  text-decoration: none;
  padding: 10px 18px;
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border-radius: 6px;
  white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a:focus {
  color: #2baae1;
  background: #f8f9fa;
}

.main-navigation .current_page_item > a,
.main-navigation .current-menu-item > a {
  color: #fff;
  background: #2baae1;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(43, 170, 225, 0.3);
}

/* Dropdown menus */
.main-navigation ul ul {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  min-width: 220px;
  padding: 15px 0;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  margin-top: 5px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateX(-50%) translateY(-10px);
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.main-navigation ul ul li {
  width: 100%;
  margin: 0;
  display: block;
}

.main-navigation ul ul a {
  width: 100%;
  padding: 12px 20px;
  font-size: 0.95rem;
  margin: 0;
  border-radius: 0;
  text-align: left;
  color: #555;
  font-weight: 400;
}

.main-navigation ul ul a:hover {
  background: #f8f9fa;
  color: #2baae1;
  transform: none;
  padding-left: 25px;
}

/* Header Space */
.header-space {
  height: 20px;
  clear: both;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  /* Show menu toggle */
  .menu-toggle {
    display: block;
  }
  
  /* Logo Container Mobile */
  .logo-container {
    padding: 10px 0;
  }
  
  .logo-container .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
  }
  
  .site-branding {
    flex: 1;
    text-align: center;
  }
  
  #logo img {
    max-height: 50px;
  }
  
  .site-title h1 {
    font-size: 1.5rem;
  }
  
  /* Hide desktop menu */
  .main-navigation ul {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #000;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    padding-top: 80px;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
  }

  /* Show mobile menu when toggled */
  .main-navigation.toggled ul {
    display: flex;
    right: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid #f0f0f0;
  }

  .main-navigation a {
    padding: 15px 20px;
    border-radius: 0;
    transform: none;
    color: #fff;
  }

  /* Mobil menüde aktif sayfa arka planını koyu gri yap */
  .main-navigation .current_page_item > a,
  .main-navigation .current-menu-item > a {
    color: #fff;
    background: #333;
    font-weight: 600;
    box-shadow: none;
  }

  .main-navigation a:hover,
  .main-navigation a:focus {
    color: #fff;
    background: #333;
    transform: none;
  }

  .main-navigation ul ul {
    position: static;
    box-shadow: none;
    background: #f8f9fa;
    padding: 0 0 0 20px;
    margin: 0;
    border: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .main-navigation ul ul a {
    padding: 10px 20px;
    font-size: 0.9rem;
    text-align: left;
    color: #fff;
  }

  /* Mobile overlay */
  .main-navigation::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .main-navigation.toggled::before {
    opacity: 1;
    visibility: visible;
  }

  /* Body scroll lock */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Navigation container mobil ayarları - siyah alanı kaldır */
  .navigation-container {
    padding: 0;
    background: transparent;
    border-top: none;
  }
}

@media screen and (max-width: 480px) {
  .logo-container {
    padding: 8px 0;
  }
  
  .logo-container .container {
    padding: 0 10px;
  }
  
  .menu-toggle {
    right: 10px;
  }
  
  #logo img {
    max-height: 40px;
  }
  
  .site-title h1 {
    font-size: 1.3rem;
  }
  
  .main-navigation ul {
    width: 280px;
    right: -280px;
  }
}

@media screen and (max-width: 360px) {
  #logo img {
    max-height: 35px;
  }
  
  .site-title h1 {
    font-size: 1.2rem;
  }
  
  .main-navigation ul {
    width: 260px;
    right: -260px;
  }
  
  .main-navigation a {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: #fff;
  }
}

/* Desktop menu display */
@media screen and (min-width: 769px) {
  /* Hide menu toggle on desktop */
  .menu-toggle {
    display: none !important;
    visibility: hidden;
  }
}
