* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #dc2626;
  --secondary-color: #7f1d1d;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* ========== BLOG SAYFASI - HEADER ========== */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header h1 a {
  color: white;
  text-decoration: none;
}

header h1 a:hover {
  opacity: 0.9;
}

.tagline {
  font-size: 1rem;
  opacity: 0.95;
}

/* ========== CONTAINER & LAYOUT ========== */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
}

.post-container {
  grid-template-columns: 1fr;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.tags-section {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tags-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ========== MAIN CONTENT ========== */
.main-content {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ========== BLOG ITEM ========== */
.blog-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  transition: opacity 0.3s ease;
}

.blog-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-item:hover {
  opacity: 0.95;
}

.blog-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.blog-header h2 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-header h2 a:hover {
  color: var(--primary-color);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.blog-excerpt {
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.blog-footer {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.read-time {
  color: var(--text-light);
}

.category {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
  font-weight: 500;
}

.page-btn:hover:not(.active) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-btn.prev,
.page-btn.next {
  width: auto;
  padding: 0.5rem 1rem;
}

.page-dots {
  color: var(--text-light);
  padding: 0 0.5rem;
}

/* ========== BLOG POST (DETAY SAYFASI) ========== */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.divider {
  color: var(--border-color);
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.post-body h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.post-tags {
  padding: 1.5rem;
  background-color: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-label {
  font-weight: 600;
  color: var(--text-dark);
}

.post-tags .tag {
  font-size: 0.85rem;
}

.post-navigation {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.nav-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
}

.nav-link:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ========== FOOTER ========== */
footer {
  background-color: var(--text-dark);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

/* ========== LOGIN SAYFASI ========== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 28px;
}

.login-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.btn-login {
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-login:hover {
  background-color: var(--secondary-color);
}

.demo-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 20px;
}

/* ========== ADMIN PANELI ========== */
.admin-container {
  min-height: 100vh;
  background-color: var(--bg-light);
}

.admin-header {
  background-color: var(--primary-color);
  color: white;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  font-size: 24px;
}

.btn-logout {
  padding: 8px 16px;
  background-color: white;
  color: var(--primary-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn-logout:hover {
  background-color: #f3f4f6;
}

/* ========== ADMIN SIDEBAR (SOL NAVBAR) ========== */
.admin-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
}

.admin-sidebar {
  width: 200px;
  background-color: white;
  padding: 20px;
  border-right: 1px solid var(--border-color);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 10px;
}

.menu-item {
  display: block;
  padding: 12px 16px;
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.menu-item.active {
  background-color: #fee2e2;
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.admin-main {
  flex: 1;
  padding: 30px 20px;
}

/* ========== ADMIN SECTIONS ========== */
.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

/* ========== BLOG EKLEME FORMU ========== */
.add-blog-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.add-blog-section h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.blog-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-add {
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  align-self: flex-start;
}

.btn-add:hover {
  background-color: var(--secondary-color);
}

/* ========== BLOGLAR TABLOSU ========== */
.blogs-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blogs-section h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.table-container {
  overflow-x: auto;
}

.blogs-table {
  width: 100%;
  border-collapse: collapse;
}

.blogs-table thead {
  background-color: var(--bg-light);
  border-bottom: 2px solid var(--border-color);
}

.blogs-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

.blogs-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.blogs-table tbody tr:hover {
  background-color: var(--bg-light);
}

.btn-delete {
  padding: 6px 12px;
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn-delete:hover {
  background-color: #dc2626;
}

/* ========== SITE AYARLARI ========== */
.settings-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  header h1 {
    font-size: 2rem;
  }

  .blog-header h2 {
    font-size: 1.5rem;
  }

  .post-header h1 {
    font-size: 1.75rem;
  }

  .blog-meta {
    flex-wrap: wrap;
  }

  .main-content {
    padding: 1rem;
  }

  .pagination {
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .page-btn {
    width: 35px;
    height: 35px;
    font-size: 0.85rem;
  }

  .admin-header h1 {
    font-size: 18px;
  }

  .admin-wrapper {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 10px;
  }

  .sidebar-menu {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .sidebar-menu li {
    margin-bottom: 0;
    min-width: fit-content;
  }

  .blogs-table {
    font-size: 12px;
  }

  .blogs-table th,
  .blogs-table td {
    padding: 8px;
  }
}

/*
 * Site başlığını (logo/isim) <h1> gibi gösterecek stil.
 * Artık <h1> yerine <p class="site-title">...</p> kullanıyoruz.
 */
.site-title {
    /* 1. <h1>'ın varsayılan yazı tipi boyutunu taklit et (genellikle 2em) */
    font-size: 2em; 
    
    /* 2. <h1>'ın varsayılan kalınlığını taklit et */
    font-weight: bold;
    
    /* 3. <h1>'ın varsayılan üst/alt boşluklarını taklit et */
    /* (Mevcut tasarımınıza göre bu değerleri ayarlayabilirsiniz) */
    margin-top: 0.67em;
    margin-bottom: 0.67em;
    
    /* 4. <p> etiketinin kendi varsayılan boşluklarını sıfırla (gerekirse) */
    margin-left: 0;
    margin-right: 0;
}

/* * Ek olarak, site başlığındaki linkin de stilini koruduğundan emin olalım
 * (örn: rengi siyah olsun, altı çizili olmasın)
 */
.site-title a {
    text-decoration: none; /* Linkin alt çizgisini kaldır */
    color: inherit;        /* Rengi ebeveyninden (yani .site-title) alsın */
}