/**
 * Sözbursa stiline göre masaüstü header.
 * Aktif olduğu durum: config('system.web_header') === 'sozbursa'.
 *
 * Tüm sınıflar "sb-" ön ekiyle scope'lanır; mevcut .main-nav / .info-bar / .breaking-bar
 * stilleri ile çakışmaz. Bu dosya yalnızca header şablonu sözbursa iken yüklenir.
 *
 * NOT: Bu dosya layouts/web.blade.php içinde style.css'ten SONRA yüklenir, bu sayede
 * aşağıdaki :root override style.css'teki kırmızı (#b10000 / #8a0000) tema renklerini
 * sözbursa lacivertine çevirir. style.css içinde `var(--red-primary)` ve `var(--red-dark)`
 * kullanan tüm yerler (main-nav, butonlar, vurgular vb.) otomatik olarak yeni renge geçer.
 * Default header şablonu seçilirse bu dosya hiç yüklenmez ve eski kırmızı tema geri döner.
 */

:root {
  /* Sözbursa lacivert paleti — style.css'teki global tema renklerini override eder */
  --red-primary: #1d296c;
  --red-dark: #141d52;
  /* Bootstrap --bs-primary-rgb / odak halkası (btn-primary, text-bg-primary vb.) */
  --theme-primary-rgb: 29, 41, 108;
  /* İleride başka temalar için ek tokenlar burada genişletilebilir
     (ör. --accent-yellow, --link-hover) */
}

.sb-header {
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sb-header,
.sb-header * {
  box-sizing: border-box;
}

/* ─── Top Bar ─── */
.sb-top-bar {
  background: #1d296c;
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}

.sb-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sb-top-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.sb-top-link {
  color: #fff;
  text-decoration: none;
  margin-right: 20px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.sb-top-link:hover {
  color: #ccc;
  text-decoration: none;
}

.sb-top-link i {
  font-size: 14px;
  opacity: 0.95;
  color: #3fa535;
}

.sb-top-weather {
  color: #3fa535;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  white-space: nowrap;
}

.sb-top-weather i {
  font-size: 16px;
}

.sb-top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-top-follow {
  color: #aaa;
  font-size: 13px;
  margin-right: 4px;
}

.sb-social-icons {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sb-social-icons a {
  color: #aaa;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  transition: color 0.15s ease;
}

.sb-social-icons a:hover {
  color: #fff;
}

/* ─── Main Nav ─── */
.sb-main-nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 90;
}

.sb-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}

.sb-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.sb-logo:hover {
  text-decoration: none;
}

.sb-logo-img {
  height: 48px;
  max-height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sb-logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #1d296c;
  letter-spacing: -0.3px;
}

.sb-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.sb-nav-links li {
  position: relative;
}

.sb-nav-links li a,
.sb-nav-links .nav-dropdown-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 8px 14px;
  transition: color 0.15s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.sb-nav-links li a:hover,
.sb-nav-links .nav-dropdown-link:hover {
  color: #1d296c;
  text-decoration: none;
}

/* Dropdown caret düğmesi (mobilde toggle eden) – masaüstünde hover'da açılır */
.sb-nav-links .nav-dropdown-head {
  display: inline-flex;
  align-items: center;
}

.sb-nav-links .nav-dropdown-caret {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: -2px;
}

.sb-nav-links .nav-dropdown-caret::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #1a1a1a;
  opacity: 0.7;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.sb-nav-links .nav-item-has-children:hover .nav-dropdown-caret::before {
  border-top-color: #1d296c;
  opacity: 1;
}

/* Submenu */
.sb-nav-links .nav-submenu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.sb-nav-links .nav-submenu .nav-submenu {
  top: -6px;
  left: calc(100% - 4px);
}

.sb-nav-links .nav-item-has-children:hover > .nav-submenu,
.sb-nav-links .nav-item-has-children:focus-within > .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.sb-nav-links .nav-item-has-children > .nav-submenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.sb-nav-links .nav-submenu li a,
.sb-nav-links .nav-submenu .nav-dropdown-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.sb-nav-links .nav-submenu li:last-child > a,
.sb-nav-links .nav-submenu li:last-child > .nav-dropdown-head .nav-dropdown-link {
  border-bottom: 0;
}

.sb-nav-links .nav-submenu li a:hover,
.sb-nav-links .nav-submenu .nav-dropdown-link:hover {
  background: #f4f6fb;
  color: #1d296c;
  text-decoration: none;
}

.sb-search-btn {
  background: none;
  border: 0;
  font-size: 18px;
  color: #1a1a1a;
  cursor: pointer;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: color 0.15s ease;
}

.sb-search-btn:hover {
  color: #1d296c;
}

/* ─── Search Overlay ─── */
.sb-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 24px 24px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s;
}

.sb-search-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.sb-search-bar {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.sb-search-bar i {
  font-size: 18px;
  color: #1d296c;
}

.sb-search-bar input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: #111827;
  font-family: inherit;
  background: transparent;
}

.sb-search-close {
  background: none;
  border: 0;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
}

.sb-search-close:hover {
  color: #1f2937;
}

/* ─── Mobil daraltma (yalnızca masaüstü genişlik altında ana navı pasifleştir; layout zaten mobil
       header'a düşer, ama dar masaüstüde menüler taşmasın) ─── */
@media (max-width: 1199.98px) {
  .sb-nav-links li a,
  .sb-nav-links .nav-dropdown-link {
    font-size: 13px;
    padding: 8px 10px;
  }
}

@media (max-width: 991.98px) {
  .sb-top-bar-right .sb-top-follow {
    display: none;
  }
  .sb-top-link span,
  .sb-top-weather {
    display: none;
  }
  .sb-top-link i {
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SÖZBURSA — Anasayfa modülleri
   (yalnızca config('system.web_header') === 'sozbursa' iken anasayfada
    render edilen son dakika ticker + 4'lü haber kart sırası)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Son Dakika Ticker ─── */
.sb-breaking-wrap {
  padding-top: 20px;
  font-family: 'Inter', sans-serif;
}

.sb-breaking {
  background: #cc0000;
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.sb-breaking-label {
  background: #a00000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  color: #fff;
}

.sb-breaking-label i {
  font-size: 12px;
}

.sb-breaking-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}

.sb-breaking-track {
  display: flex;
  width: max-content;
  animation: sb-breaking-scroll var(--sb-breaking-duration, 40s) linear infinite;
}

.sb-breaking-track:hover {
  animation-play-state: paused;
}

.sb-breaking-chunk {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  padding-right: 8px;
}

.sb-breaking-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  padding: 0 4px;
}

.sb-breaking-item a,
.sb-breaking-item > span {
  color: #fff;
  text-decoration: none;
}

.sb-breaking-time {
  color: #ffd700;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.sb-breaking-title {
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}

a.sb-breaking-title:hover {
  color: #ffd700;
  text-decoration: none;
}

.sb-breaking-dot {
  color: #ffd700;
  margin: 0 14px;
  font-size: 8px;
  display: inline-block;
  line-height: 1;
}

@keyframes sb-breaking-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ─── 4'lü Haber Kartı ─── */
.sb-news-cards-section {
  padding: 30px 0 10px;
  font-family: 'Inter', sans-serif;
}

.sb-news-cards-section .row {
  --sb-card-gutter: 16px;
  margin-left: calc(var(--sb-card-gutter) * -0.5);
  margin-right: calc(var(--sb-card-gutter) * -0.5);
}

.sb-news-cards-section [class*='col-'] {
  padding-left: calc(var(--sb-card-gutter) * 0.5);
  padding-right: calc(var(--sb-card-gutter) * 0.5);
  margin-bottom: var(--sb-card-gutter);
}

.sb-news-card {
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}

.sb-news-card a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  height: 100%;
  color: inherit;
}

.sb-news-card a:hover {
  text-decoration: none;
}

.sb-news-card-img {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #f3f4f6;
}

.sb-news-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.sb-news-card:hover .sb-news-card-img img {
  transform: scale(1.04);
}

.sb-news-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.45;
  background: #fff;
  padding: 12px 14px;
  margin: 0;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sb-news-card a:hover .sb-news-card-title {
  color: #1d296c;
}

@media (max-width: 575.98px) {
  .sb-breaking {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }
  .sb-breaking-label {
    align-self: flex-start;
  }
  .sb-news-cards-section {
    padding: 20px 0 6px;
  }
  .sb-news-card-title {
    font-size: 14px;
    padding: 10px 12px;
  }
}
