/**
 * Yeni header tasarımı - dark theme, premium sports look
 * SiteHeader + MainNav + CountryBar
 */

/* Üst boşluğu kaldır - header en üstte */
body { padding-top: 0 !important; }

/* ===== Top Header Section ===== */
.top-header-section {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0a0c10;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Arama önerileri ana menü + country bar üstünde kalsın: üst satır daha yüksek stacking */
.top-header-section > .site-header-new {
  position: relative;
  z-index: 120;
}
.top-header-section > .main-nav-new {
  position: relative;
  z-index: 60;
}
.top-header-section > .country-bar-new {
  position: relative;
  z-index: 50;
}

/* ===== Site Header ===== */
.site-header-new {
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(to bottom, rgb(28 32 40 / 81%), rgb(35 40 48 / 81%), rgb(0 0 0 / 85%));
}
@media (min-width: 768px) {
  .site-header-new {
    min-height: 96px;
    padding: 0 24px;
  }
}
@media (min-width: 1024px) {
  .site-header-new {
    padding: 0 32px;
  }
}

.site-header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
@media (min-width: 768px) {
  .site-header-inner {
    gap: 24px;
  }
}

/* Sağ blok: masaüstünde yok sayılır (arama+aksiyonlar doğrudan inner flex’te) */
.site-header-right-cluster {
  display: contents;
}

/* Mobil: satır1 logo + aksiyonlar, satır2 arama tam genişlik (cluster display:contents ile düzleşir) */
@media (max-width: 767px) {
  .site-header-right-cluster {
    display: contents;
  }
  .site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "hdrLogo hdrActions"
      "hdrSearch hdrSearch";
    align-items: center;
    gap: 8px 10px;
    width: 100%;
  }
  .site-header-logo {
    grid-area: hdrLogo;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(220px, 55vw);
    justify-content: flex-start;
  }
  .site-header-search-wrap {
    grid-area: hdrSearch;
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .site-header-actions {
    grid-area: hdrActions;
    justify-self: end;
    width: auto;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .site-header-search input {
    height: 38px;
    padding-left: 36px;
    font-size: 16px;
    min-width: 0;
  }
  .site-header-search svg {
    left: 10px;
    width: 14px;
    height: 14px;
  }
  .site-header-btn-uyelik {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .site-header-btn-icon {
    width: 36px;
    height: 36px;
  }
}

/* Logo */
.site-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  order: 1;
}
.site-header-logo picture {
  display: contents;
}
.site-header-logo-img {
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  display: block;
}
@media (max-width: 767px) {
  .site-header-logo-img {
    max-height: 40px;
    max-width: min(200px, 100%);
    width: auto;
    height: auto;
  }
}
@media (min-width: 768px) {
  .site-header-logo-img {
    max-height: 52px;
    max-width: min(220px, 28vw);
  }
}
.site-header-logo-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
@media (min-width: 768px) {
  .site-header-logo-icon {
    width: 150px;
    height: 150px;
  }
}
@media (max-width: 767px) {
  .site-header-logo-icon {
    width: 36px;
    height: 36px;
  }
}
.site-header-logo-icon svg {
  width: 20px;
  height: 20px;
  color: #34d399;
}
/* Search */
.site-header-search-wrap {
  flex: 1;
  width: 100%;
  max-width: 512px;
  order: 2;
  position: relative;
  z-index: 130;
  overflow: visible;
}
@media (min-width: 768px) {
  .site-header-search-wrap {
    max-width: 448px;
  }
}
@media (min-width: 1024px) {
  .site-header-search-wrap {
    max-width: 512px;
  }
}
.site-header-search {
  position: relative;
}
.site-header-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #71717a;
  transition: color 0.2s;
}
.site-header-search:focus-within svg {
  color: rgba(34, 197, 94, 0.8);
}
.site-header-search input {
  width: 100%;
  height: 44px;
  padding-left: 40px;
  padding-right: 16px;
  border-radius: 12px;
  background: #00000080;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.site-header-search input::placeholder {
  color: #71717a;
}
.site-header-search input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
  background: rgba(255, 255, 255, 0.07);
}

/* Takım otomatik tamamlama */
.site-header-search--autocomplete {
  overflow: visible;
}
.site-header-search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20000;
  max-height: min(60vh, 320px);
  overflow-y: auto;
  border-radius: 12px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.site-header-search-suggestions[hidden] {
  display: none !important;
}
.site-header-search-sug {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.875rem;
  color: #e4e4e7;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.12s ease;
}
.site-header-search-sug:last-child {
  border-bottom: none;
}
.site-header-search-sug:hover,
.site-header-search-sug:focus {
  background: rgba(34, 197, 94, 0.12);
  outline: none;
}
.site-header-search-sug-logo,
.site-header-search-sug-logo-ph {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
}
.site-header-search-sug-logo-ph {
  background: rgba(255, 255, 255, 0.08);
}
.site-header-search-sug-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Right actions */
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  order: 3;
}
.site-header-btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.site-header-btn-icon:hover {
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.site-header-btn-icon svg {
  width: 16px;
  height: 16px;
}
.ms-header-push-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  position: relative;
  flex-shrink: 0;
}
.ms-header-push-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 220px;
  text-align: right;
  line-height: 1.25;
  min-height: 0;
}
.site-header-cta {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  background: #fbbf24;
  color: #18181b;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}
.site-header-cta:hover {
  background: #fcd34d;
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
/* WonderPush — özel header butonu (varsayılan sol-alt zil kapalı) */
.site-header-wonderpush {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
/* Bildirim kapalı: kırmızı; açık (is-subscribed): yeşil */
.site-header-btn-wp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.72rem, 1.5vw, 0.8rem);
  max-width: min(200px, 42vw);
  line-height: 1.25;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.site-header-btn-wp:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.75);
  color: #fff;
}
.site-header-btn-wp.is-subscribed {
  border-color: rgba(34, 197, 94, 0.65);
  background: rgba(34, 197, 94, 0.18);
  color: #d1fae5;
}
.site-header-btn-wp.is-subscribed:hover {
  background: rgba(34, 197, 94, 0.28);
  border-color: rgba(34, 197, 94, 0.85);
  color: #ecfdf5;
}
.site-header-btn-wp-icon {
  font-size: 20px !important;
  flex-shrink: 0;
  color: #f87171;
}
.site-header-btn-wp.is-subscribed .site-header-btn-wp-icon {
  color: #4ade80;
}
.site-header-btn-wp .header-wp-label {
  text-align: left;
  white-space: normal;
}
@media (max-width: 480px) {
  .site-header-btn-wp .header-wp-label {
    display: none;
  }
  .site-header-btn-wp {
    padding: 8px 10px;
    max-width: none;
  }
  .site-header-btn-wp[aria-label]::after {
    content: none;
  }
}

.site-header-btn-uyelik {
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  flex-shrink: 0;
  background: #fff;
  color: #18181b;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.site-header-btn-uyelik:hover {
  background: #f4f4f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.site-header-btn-logout {
  /* display için !important kullanma: JS (display:none) ile gizlenmeli */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid rgba(248, 113, 113, 0.4);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
}
.site-header-btn-logout:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fff;
}
.site-header-btn-logout .material-symbols-outlined {
  font-size: 20px;
}
.site-header-btn-uyelik-text {
  white-space: nowrap;
}

/* User dropdown (site-header-actions içinde) */
.site-header-actions .user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  z-index: 60;
}

/* ===== Main Nav ===== */
.main-nav-new {
  position: relative;
  z-index: 60;
  padding: 0 16px;
  background: #0d1014;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
@media (min-width: 768px) {
  .main-nav-new {
    padding: 0 24px;
  }
}
@media (min-width: 1024px) {
  .main-nav-new {
    padding: 0 32px;
  }
}
.main-nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  overflow: visible;
  display: flex;
  justify-content: flex-start;
}
@media (min-width: 768px) {
  .main-nav-inner {
    justify-content: center;
  }
}
.main-nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 12px 0 12px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 12px;
  -ms-overflow-style: none;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .main-nav-list {
    justify-content: center;
  }
}
.main-nav-list::-webkit-scrollbar {
  height: 4px;
}
.main-nav-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.main-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: #a1a1aa;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.main-nav-item:hover {
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.05);
}
.main-nav-item.active {
  color: #34d399;
  background: rgba(34, 197, 94, 0.1);
  border-bottom-color: #22c55e;
}
.main-nav-item .live-dot {
  position: relative;
  width: 8px;
  height: 8px;
}
.main-nav-item .live-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #ef4444;
  animation: header-ping 1.5s infinite;
}
.main-nav-item .live-dot::after {
  content: '';
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}
@keyframes header-ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
/* Renkli menü ikonları */
.nav-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  margin-right: 6px;
  flex-shrink: 0;
}
.nav-icon-live { background: rgba(239, 68, 68, 0.2); }
.main-nav-item-live .nav-icon-live .live-dot { margin: 0; }
.nav-icon-commentary { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.nav-icon-bugun { background: rgba(34, 197, 94, 0.25); color: #4ade80; }
.main-nav-count {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}
.main-nav-item.active .main-nav-count {
  background: rgba(34, 197, 94, 0.2);
  color: #34d399;
}
.main-nav-item-live .main-nav-count {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.main-nav-item-live.active .main-nav-count {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.nav-icon-duello { background: rgba(244, 63, 94, 0.24); color: #fb7185; }
.nav-icon-duello > .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
  width: 16px;
  height: 16px;
}
.nav-icon-news { background: rgba(168, 85, 247, 0.25); color: #c084fc; }
.nav-icon-video { background: rgba(34, 197, 94, 0.25); color: #4ade80; }
.main-nav-item:hover .nav-icon-commentary,
.main-nav-item:hover .nav-icon-duello,
.main-nav-item:hover .nav-icon-news,
.main-nav-item:hover .nav-icon-video { opacity: 1; }
.main-nav-item.active .nav-icon-commentary { background: rgba(59, 130, 246, 0.35); color: #93c5fd; }
.main-nav-item.active .nav-icon-duello { background: rgba(244, 63, 94, 0.4); color: #fda4af; }
.main-nav-item.active .nav-icon-news { background: rgba(168, 85, 247, 0.35); color: #d8b4fe; }
.main-nav-item.active .nav-icon-video { background: rgba(34, 197, 94, 0.35); color: #86efac; }

/* Dropdown */
.main-nav-dropdown {
  position: relative;
  flex-shrink: 0;
}
.main-nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: #a1a1aa;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.main-nav-dropdown-trigger:hover {
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.05);
}
.main-nav-dropdown-trigger .chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.main-nav-dropdown.open .main-nav-dropdown-trigger .chevron {
  transform: rotate(180deg);
}
.main-nav-dropdown-menu {
  position: fixed;
  min-width: 180px;
  max-width: calc(100vw - 24px);
  max-height: min(70vh, 320px);
  overflow-y: auto;
  padding: 8px;
  background: #1b1f26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 500;
  display: none;
  -webkit-overflow-scrolling: touch;
}
.main-nav-dropdown.open .main-nav-dropdown-menu {
  display: block;
}
@media (max-width: 767px) {
  .main-nav-dropdown-menu {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0;
    max-width: none;
  }
  .main-nav-new {
    padding: 0 0;
  }
  .main-nav-item {
    padding: 10px 12px;
    font-size: 0.8125rem;
  }
  .main-nav-dropdown-trigger {
    padding: 10px 12px;
    font-size: 0.8125rem;
  }
  .country-bar-new {
    padding: 8px 0;
  }
}
.main-nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 0.875rem;
  color: #d4d4d8;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
}
.main-nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ===== Country Bar ===== */
.country-bar-new {
  position: relative;
  z-index: 10;
  padding: 12px 16px;
  background: #0a0c10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
@media (min-width: 768px) {
  .country-bar-new {
    padding: 12px 24px;
  }
}
@media (min-width: 1024px) {
  .country-bar-new {
    padding: 12px 32px;
  }
}
.country-bar-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
}
@media (min-width: 768px) {
  .country-bar-inner {
    justify-content: center;
  }
}
.country-bar-list {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 12px 6px 12px;
  margin: 0 -4px;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 12px;
  -ms-overflow-style: none;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .country-bar-list {
    justify-content: center;
  }
}
.country-bar-list::-webkit-scrollbar {
  height: 4px;
}
.country-bar-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.country-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.country-bar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
  border-color: rgba(255, 255, 255, 0.1);
}
.country-bar-item.active {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #34d399;
}
.country-bar-item .country-flag {
  width: 20px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}
.country-bar-item .country-count {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 6px;
}
.country-bar-item .country-count {
  background: rgba(255, 255, 255, 0.05);
  color: #71717a;
}
.country-bar-item.active .country-count {
  background: rgba(34, 197, 94, 0.2);
  color: #34d399;
}
.country-bar-loading {
  padding: 10px 16px;
  font-size: 0.875rem;
  color: #71717a;
}
