/* ============================================================
   İngilizce 90 — Global Stil (Bootstrap 5.3 sonrası yüklenecek)
   ============================================================ */

/* ── Tasarım Token'ları ── */
:root {
  /* Marka */
  --i90-brand: #0050bc;
  --i90-brand-dark: #003a88;
  --i90-gradient: linear-gradient(135deg, #0050bc 0%, #00a8cc 100%);

  /* Yarıçaplar */
  --i90-radius-md: 12px;
  --i90-radius-lg: 1rem;

  /* Sayfa arka planı */
  --i90-page-bg: #f0f2f5;

  /* Gölgeler */
  --i90-shadow-xs: 0 2px 10px rgba(0, 0, 0, 0.02);
  --i90-shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] {
  --i90-page-bg: #121212;
  --i90-shadow-xs: 0 2px 10px rgba(0, 0, 0, 0.35);
  --i90-shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* ── Tema Değişkenleri ── */
[data-bs-theme="light"] {
  color-scheme: light;
  --bs-body-bg: #ffffff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-tertiary-bg: #f8f9fa;

  /* Erişilebilirlik: Daha koyu mavi (4.5:1 kontrast) */
  --bs-primary: var(--i90-brand);
  --bs-primary-rgb: 0, 80, 188;
  --bs-link-color: var(--i90-brand);
  --bs-link-hover-color: var(--i90-brand-dark);
}

[data-bs-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--i90-page-bg);
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .text-body {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .card-header p {
  color: #adb5bd !important;
}

.btn-outline-secondary {
  --bs-btn-color: #495057;
  --bs-btn-border-color: #495057;
  --bs-btn-hover-bg: #495057;
  --bs-btn-hover-border-color: #495057;
}

/* ── Admin Üst Bar ── */
.admin-top-bar {
  height: 32px;
  display: flex;
  align-items: center;
  background: #212529;
  color: #fff;
  font-size: 13px;
  padding: 0 1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1060;
}

.has-admin-bar {
  padding-top: 32px;
}

/* ── Masaüstü Yerleşim ── */
@media (min-width: 992px) {
  .main-navbar {
    background-color: var(--bs-body-bg) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: var(--i90-shadow-xs);
  }

  [data-bs-theme="dark"] .main-navbar {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .has-admin-bar .main-navbar {
    top: 32px;
  }

  .has-admin-bar .blog-sidebar {
    top: calc(32px + 90px);
  }

  .main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    gap: 2rem;
  }

  .blog-sidebar {
    width: calc(33.333333% - 1rem);
    flex: 0 0 calc(33.333333% - 1rem);
    background-color: var(--bs-body-bg);
    border-radius: var(--i90-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--i90-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    align-self: flex-start;
    position: sticky;
    top: 90px;
  }

  [data-bs-theme="dark"] .blog-sidebar,
  [data-bs-theme="dark"] .content-area {
    border-color: rgba(255, 255, 255, 0.06);
  }

  .content-area {
    width: calc(66.666667% - 1rem);
    flex: 0 0 calc(66.666667% - 1rem);
    background-color: var(--bs-body-bg);
    border-radius: var(--i90-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--i90-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
  }

  .content-area .container,
  .content-area .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Sidebar olmayan sayfalarda content-area tam genişlik alır */
  .content-area.no-sidebar {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 900px;
  }

  /* Desktop nav bağlantıları */
  .main-navbar .desktop-link {
    transition: color 0.15s ease;
  }

  .main-navbar .desktop-link:hover,
  .main-navbar .desktop-link.active {
    color: var(--bs-primary) !important;
  }
}

/* ── Mobil ── */
@media (max-width: 991px) {
  .main-navbar {
    display: none;
  }

  .main-wrapper {
    padding: 1rem;
    padding-bottom: 100px; /* Alt bar için alan */
    display: block;
    overflow-x: hidden;
  }

  .blog-sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: var(--bs-body-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  [data-bs-theme="dark"] .mobile-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .has-admin-bar .mobile-header {
    top: 32px;
  }

  .mobile-header-spacer {
    width: 32px;
  }

  .sidebar-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--bs-body-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
  }

  [data-bs-theme="dark"] .sidebar-bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  .sidebar-bottom .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--bs-secondary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .sidebar-bottom .nav-link i {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }

  .sidebar-bottom .nav-link.active {
    color: var(--bs-primary);
  }
}

/* ── Erişilebilirlik: Skip Link ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  z-index: 2000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ── Hafif Animasyonlar (animate.css yerine) ── */
@keyframes i90-fadeInUp {
  from { opacity: 0; transform: translate3d(0, 100%, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes i90-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate__animated.animate__fadeInUp { animation: i90-fadeInUp 0.5s ease both; }
.animate__animated.animate__fadeIn   { animation: i90-fadeIn 0.4s ease both; }

@media (prefers-reduced-motion: reduce) {
  .animate__animated.animate__fadeInUp,
  .animate__animated.animate__fadeIn { animation: none; }
}

/* ── Blog İçerik Stilleri ── */
.post-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-danger);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body strong {
  color: var(--bs-primary);
}

.post-body hr {
  margin: 2.5rem 0;
  opacity: 0.15;
}
