/* webAltyapi Header.scss — header-design-5 (componentId 4 → HeaderLayout5) ile uyumlu */

:root {
  /* Site paleti: sıcak kahve — styles.css --theme-secondary-color */
  --header-brand: #3f372f;
  --header-brand-rgb: 63, 55, 47;
  --header-h: 140px;
}

@media (max-width: 900px) {
  :root {
    --header-h: 110px;
  }
}

.header {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--header-h);
  transition: transform 0.3s ease-in-out, background-color 0.35s ease, box-shadow 0.35s ease;
}

.header.header-scroll-hidden {
  transform: translateY(-100%);
}

/* Design 5 — anasayfa üstte şeffaf */
.header.header-design-5 {
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header.header-design-5:not(.header-at-top) {
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header.header-design-5.header-at-top {
  background: transparent;
  box-shadow: none;
}

.header.header-design-5.header-at-top .headerContainer .headerTop {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.header.header-design-5.header-at-top .headerContainer .headerTop .hamburgerBtn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerSearch .iconBtn {
  color: #fff;
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerSearch .searchInputWrapper {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerSearch .searchInputWrapper .searchInput {
  color: #fff;
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerSearch .searchInputWrapper .searchInput::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerSearch .searchInputWrapper .closeSearchBtn {
  color: #fff;
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerLogo .logo img {
  filter: brightness(1.8);
}

/* Renkli logo (isLogoWhite: false): filtre yok — aksi halde parlaklık renkleri bozar */
.header.header-design-5.header-at-top:not(.logo-white) .headerContainer .headerTop .headerLogo .logo img {
  filter: none;
}

.header.header-design-5.header-at-top .headerContainer .headerTop .headerIcons .iconBtn {
  color: #fff;
}

.header.header-design-5.header-at-top .headerContainer .headerBottom {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.header.header-design-5.header-at-top .headerContainer .headerBottom .headerBottomInner .desktopNav ul li a {
  color: #fff;
  font-weight: 600;
}

.header.header-design-5.header-at-top.logo-white .headerContainer .headerTop .headerLogo .logo img {
  filter: brightness(0) invert(1);
}

.header.header-design-5.header-at-top .hdr-search-panel {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.header.header-design-5.header-at-top .hdr-search-panel .hdr-search-head {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.header.header-design-5.header-at-top .hdr-search-panel .hdr-search-head span {
  color: rgba(255, 255, 255, 0.85);
}

.header.header-design-5.header-at-top .hdr-search-panel .hdr-search-close {
  color: #fff;
}

.headerContainer {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

.headerTop {
  height: 90px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgb(255, 255, 255);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.headerTopInner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.headerLeft {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.hamburgerBtn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(var(--header-brand-rgb), 0.08);
  color: var(--header-brand);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.3rem;
  padding: 0;
}

.hamburgerBtn:hover {
  background: var(--header-brand);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--header-brand-rgb), 0.3);
}

.hamburgerBtn .hdr-svg,
.hamburgerBtn .hamburgerBtn__svg {
  display: block;
}

.hamburgerBtn .hamburgerBtn__svg--close {
  display: none;
}

.hamburgerBtn.is-open .hamburgerBtn__svg--menu {
  display: none;
}

.hamburgerBtn.is-open .hamburgerBtn__svg--close {
  display: block;
}

.headerSearch {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.headerSearch .searchInputWrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: hdrSlideIn 0.3s ease;
}

.headerSearch .searchInputWrapper .searchInput {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 250px;
  max-width: 40vw;
  color: #2c3e50;
}

.headerSearch .searchInputWrapper .searchInput::placeholder {
  color: #95a5a6;
}

.closeSearchBtn {
  background: transparent;
  border: none;
  color: #7f8c8d;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.closeSearchBtn:hover {
  color: var(--header-brand);
  transform: rotate(90deg);
}

.headerSearch .iconBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(var(--header-brand-rgb), 0.08);
  color: var(--header-brand);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.headerSearch .iconBtn:hover {
  background: var(--header-brand);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--header-brand-rgb), 0.3);
}

.headerLogo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

.headerLogo.hidden {
  visibility: hidden;
  opacity: 0;
}

.headerLogo .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  margin-top: 0.5rem;
}

.headerLogo .logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.headerIcons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

.headerIcons.hidden {
  visibility: hidden;
  opacity: 0;
}

.headerIcons .iconBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(var(--header-brand-rgb), 0.08);
  color: var(--header-brand);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
}

.headerSearch .hdr-icon,
.headerIcons .hdr-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.headerIcons .iconBtn:hover {
  background: var(--header-brand);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--header-brand-rgb), 0.3);
}

.headerBottom {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.header.header-design-5:not(.header-at-top) .headerBottom {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.headerBottomInner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktopNav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.desktopNav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.desktopNav ul li a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.desktopNav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--header-brand), #8a7355);
  transition: width 0.3s ease;
}

.desktopNav ul li a:hover {
  color: var(--header-brand);
}

.desktopNav ul li a:hover::after {
  width: 100%;
}

/* Arama paneli (statik — API yok) */
.hdr-search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  background: whitesmoke;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 1.25rem;
  z-index: 1000;
  animation: hdrSlideDown 0.3s ease;
}

.hdr-search-panel[hidden] {
  display: none !important;
}

.hdr-search-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.hdr-search-head span {
  font-size: 0.9rem;
  color: #7f8c8d;
  font-weight: 500;
}

.hdr-search-close {
  background: transparent;
  border: none;
  color: #7f8c8d;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.hdr-search-close:hover {
  color: var(--header-brand);
  transform: rotate(90deg);
}

.hdr-search-placeholder {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  text-align: center;
  padding: 1rem 0;
}

@keyframes hdrSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hdrSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Yan menü — Layout5 sideMenu (koyu tema, webAltyapi ile aynı) */
.sideMenu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 0;
  height: 100vh;
  z-index: 1001;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sideMenu.open {
  left: 0;
  width: 100%;
}

.sideMenu.open .sideMenuOverlay {
  opacity: 1;
  visibility: visible;
}

.sideMenu.open .sideMenuContent {
  transform: translateX(0);
}

.sideMenuOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sideMenuContent {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  max-width: 75vw;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: translateX(-110%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sideMenuHeader {
  padding: 2rem 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sideMenuLogo {
  height: 50px;
  display: flex;
  align-items: center;
}

.sideMenuLogo img {
  height: 100%;
  width: auto;
  filter: none;
}

.sideMenuClose {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sideMenuClose:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.sideMenuNav {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 0;
}

.sideMenuNav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sideMenuNav ul li a {
  display: block;
  padding: 1rem 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sideMenuNav ul li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-left-color: var(--header-brand);
  padding-left: 2.5rem;
}

@media (max-width: 1024px) {
  .headerContainer {
    padding: 0 1.5rem;
  }
}

@media (max-width: 900px) {
  .headerContainer {
    padding: 0 1rem;
  }

  .headerTop {
    height: 110px;
    border-bottom: none;
  }

  .headerTopInner {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .headerLeft {
    gap: 0.5rem;
    flex: 0 0 auto;
  }

  .hamburgerBtn {
    display: flex;
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .headerLogo {
    flex: 0 0 auto;
  }

  .headerLogo .logo {
    margin-top: 0;
    height: 40px;
  }

  .headerIcons {
    flex: 0 0 auto;
    gap: 0.75rem;
  }

  /* Mobilde üst bardaki WhatsApp gizli; hamburger sağda */
  .headerIcons a.iconBtn[href*="wa.me"] {
    display: none;
  }

  .headerIcons .iconBtn,
  .headerSearch .iconBtn {
    width: 38px;
    height: 38px;
  }

  .headerSearch .searchInputWrapper .searchInput {
    width: 150px;
    font-size: 0.85rem;
  }

  .headerBottom {
    display: none;
  }

  .hdr-search-panel {
    top: 110px;
    left: 0;
    right: 0;
    max-width: none;
    border-radius: 0;
  }
}

@media (max-width: 600px) {
  .sideMenuContent {
    width: 85vw;
  }
}

/* Arama satırı açıkken (React isSearchOpen) */
#hdr-inline-search {
  display: none !important;
  align-items: center;
  gap: 0.5rem;
}

.header.hdr-search-active #hdr-inline-search {
  display: flex !important;
}

.header.hdr-search-active .headerSearch > .iconBtn#hdr-search-open {
  display: none;
}

.header.hdr-search-active .headerLogo,
.header.hdr-search-active .headerIcons {
  visibility: hidden;
  opacity: 0;
}

.header.hdr-search-active .hdr-search-panel {
  display: block !important;
}
