/* ========================================
   ALVERSEC BLOG - MODERN CSS
 
   ======================================== */

/* === ROOT VARIABLES === */
:root {
  /* Primary Colors - Koyu Lacivert */
  --primary-900: #0f1d38;
  --primary-800: #1a365d;
  --primary-700: #2c5282;
  --primary-600: #3182ce;
  --primary-500: #4299e1;
  
  /* Gray Scale */
  --gray-900: #1a202c;
  --gray-800: #2d3748;
  --gray-700: #4a5568;
  --gray-600: #718096;
  --gray-500: #a0aec0;
  --gray-400: #cbd5e0;
  --gray-300: #e2e8f0;
  --gray-200: #edf2f7;
  --gray-100: #f7fafc;
  --gray-50: #ffffff;
  
  /* Accent Colors */
  --success: #48bb78;
  --warning: #f6ad55;
  --danger: #fc8181;
  --info: #4299e1;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* === GLOBAL STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--gray-100);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

html {
  scroll-behavior: smooth;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-800);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
}

/* === MODERN NAVBAR === */
nav {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 100%);
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav.mb-3 {
  margin-bottom: 0 !important;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand:hover {
  color: var(--primary-500);
  transform: translateY(-2px);
}

nav .d-flex {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
  margin: 0;
}

nav a {
  color: var(--gray-100);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition-fast);
  position: relative;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gray-50);
  transform: translateY(-2px);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-500);
  transition: var(--transition-base);
}

nav a:hover::after {
  width: 80%;
}

/* === HERO SECTION === */
.hero {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 50%, var(--primary-600) 100%);
  color: var(--gray-50);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--gray-50);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--gray-200);
  animation: fadeInUp 1s ease;
}

.btn-hero {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--gray-50);
  color: var(--primary-800);
  font-weight: 600;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  animation: fadeInUp 1.2s ease;
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  background: var(--primary-500);
  color: var(--gray-50);
}

/* === SEARCH BAR === */
.search-section {
  margin: 3rem 0;
}

.search-wrapper {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  width: 100%; /* YENİ EKLEME */
}

.search-wrapper input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.5rem;
  border: 2px solid var(--gray-300);
  border-radius: 50px;
  font-size: 1rem;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.search-wrapper input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.search-wrapper button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--primary-600);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap; /* YENİ EKLEME - Textin kaymasını engeller */
}

.search-wrapper button:hover {
  background: var(--primary-700);
  transform: translateY(-50%) scale(1.05);
}
/* === MODERN CARDS === */
.card {
  background: var(--gray-50);
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-title a {
  color: var(--primary-800);
  transition: var(--transition-fast);
}

.card-title a:hover {
  color: var(--primary-600);
}

.card-text {
  color: var(--gray-600);
  margin-bottom: 1rem;
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === BADGES === */
.badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.bg-secondary {
  background: var(--gray-700) !important;
}

.bg-primary {
  background: var(--primary-600) !important;
}

.bg-success {
  background: var(--success) !important;
}

.bg-danger {
  background: var(--danger) !important;
}

.bg-warning {
  background: var(--warning) !important;
}

.bg-info {
  background: var(--info) !important;
}

/* === BUTTONS === */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary-600);
  color: var(--gray-50);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--gray-50);
}

.btn-secondary {
  background: var(--gray-600);
  color: var(--gray-50);
}

.btn-secondary:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
  color: var(--gray-50);
}

.btn-success {
  background: var(--success);
  color: var(--gray-50);
}

.btn-success:hover {
  background: #38a169;
  color: var(--gray-50);
}

.btn-danger {
  background: var(--danger);
  color: var(--gray-50);
}

.btn-danger:hover {
  background: #f56565;
  color: var(--gray-50);
}

.btn-warning {
  background: var(--warning);
  color: var(--gray-900);
}

.btn-warning:hover {
  background: #ed8936;
  color: var(--gray-900);
}

.btn-info {
  background: var(--info);
  color: var(--gray-50);
}

.btn-outline-danger {
  border: 2px solid var(--danger);
  background: transparent;
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: var(--gray-50);
}

.btn-outline-light {
  border: 2px solid var(--gray-50);
  background: transparent;
  color: var(--gray-50);
}

.btn-outline-light:hover {
  background: var(--gray-50);
  color: var(--primary-800);
}

.btn-light {
  background: var(--gray-50);
  color: var(--primary-800);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* === ALERTS === */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid;
  animation: slideInRight 0.5s ease;
}

.alert-success {
  background: rgba(72, 187, 120, 0.1);
  border-left-color: var(--success);
  color: #2f855a;
}

.alert-danger {
  background: rgba(252, 129, 129, 0.1);
  border-left-color: var(--danger);
  color: #c53030;
}

.alert-warning {
  background: rgba(246, 173, 85, 0.1);
  border-left-color: var(--warning);
  color: #c05621;
}

.alert-info {
  background: rgba(66, 153, 225, 0.1);
  border-left-color: var(--info);
  color: #2c5282;
}

/* === FOOTER === */
footer {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--gray-900) 100%);
  color: var(--gray-300);
  padding: 3rem 0 1rem;
  margin-top: auto; /* DÜZELTİLDİ */
}

footer a {
  color: var(--gray-300);
  transition: var(--transition-fast);
}

footer a:hover {
  color: var(--primary-500);
}

footer h5 {
  color: var(--gray-50);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
  margin-top: 2rem;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes spin {
  to { 
    transform: rotate(360deg); 
  }
}

.fade-in {
  animation: fadeInUp 0.8s ease;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.page-item {
  list-style: none;
}

.page-link {
  padding: 0.5rem 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  color: var(--primary-600);
  transition: var(--transition-fast);
}

.page-link:hover {
  background: var(--primary-600);
  color: var(--gray-50);
  border-color: var(--primary-600);
  transform: translateY(-2px);
}

.page-item.active .page-link {
  background: var(--primary-600);
  color: var(--gray-50);
  border-color: var(--primary-600);
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--gray-200);
}

/* === FORMS === */
.form-control {
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  padding: 0.75rem;
  transition: var(--transition-base);
}

.form-control:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.form-select {
  border-radius: 8px;
  border: 1px solid var(--gray-300);
}

/* === TABLES === */
.table {
  background: var(--gray-50);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead {
  background: var(--primary-800);
  color: var(--gray-50);
}

.table th {
  padding: 1rem;
  font-weight: 600;
}

.table td {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
}

.table-hover tbody tr:hover {
  background: var(--gray-100);
  transition: var(--transition-fast);
}

/* === COOKIE CONSENT === */
#cookieConsent {
  animation: slideInUp 0.5s ease;
}

/* === LOADING === */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--gray-50);
  animation: spin 1s ease-in-out infinite;
}

/* === ADMIN SECTION === */
.admin-card {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--gray-50);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
}

.admin-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.admin-card h3 {
  color: var(--gray-50);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.admin-card p {
  color: var(--gray-200);
  margin: 0;
}

/* === POST DETAIL === */
.post-detail {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--gray-50);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.post-detail h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-900);
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-800);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

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

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

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

.post-content blockquote {
  border-left: 4px solid var(--primary-600);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--gray-700);
}

/* === CODE BLOCKS === */
pre[class*="language-"] {
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
}

.code-copy-btn {
  background: var(--primary-600) !important;
  transition: var(--transition-fast);
}

.code-copy-btn:hover {
  background: var(--primary-700) !important;
}

.code-copy-btn.copied {
  background: var(--success) !important;
}

/* === UTILITY CLASSES === */
.text-center {
  text-align: center;
}

.text-end {
  text-align: right;
}

.text-muted {
  color: var(--gray-600) !important;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-flex {
  display: flex;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.bg-light {
  background: var(--gray-100) !important;
}

@media (max-width: 576px) {
  .search-wrapper button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  nav .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  
  nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .nav-brand {
    font-size: 1.25rem;
  }
  
  .card-img-top {
    height: 180px;
  }
  
  .post-detail {
    padding: 1.5rem;
  }
  
  .post-detail h1 {
    font-size: 2rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .btn-hero {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  nav {
    padding: 0.75rem 0;
  }
  
  .search-wrapper input {
    padding: 0.875rem 3rem 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .post-detail {
    padding: 1rem;
    margin: 1rem auto;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
}

/* === PRINT STYLES === */
@media print {
  nav, footer, .btn, .alert, #cookieConsent {
    display: none !important;
  }
  
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--gray-100);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh; /* YENİ EKLEME */
  display: flex; /* YENİ EKLEME */
  flex-direction: column; /* YENİ EKLEME */
}
  
  .post-detail {
    box-shadow: none;
    padding: 0;
  }
}

/* === DARK MODE SUPPORT (Ready for future) === */
@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode styles here in future */
}

/* === SCROLL TO TOP BUTTON (Optional) === */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-600);
  color: var(--gray-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.scroll-to-top.visible {
  opacity: 1;
}

.scroll-to-top:hover {
  background: var(--primary-700);
  transform: translateY(-3px);
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-600);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-700);
}

/* === END OF STYLESHEET === */