/* Performance optimizations */
* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f8f9fa;
}

/* Navbar Enhancements */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #0d6efd !important;
}

/* Category Bar */
.category-bar {
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
  overflow: visible !important;
}

/* Container da overflow'u açalım */
.container {
  overflow: visible !important;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  padding-left: 1.5rem;
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading support */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Card Enhancements */
.card {
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-img-top {
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* Button Enhancements */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Badge Enhancements */
.badge {
  font-weight: 500;
  padding: 0.5em 0.75em;
  border-radius: 0.5rem;
}

/* Pagination Enhancements */
.pagination {
  gap: 0.25rem;
}

.page-link {
  border-radius: 0.5rem;
  margin: 0;
  color: #667eea;
  border: 1px solid #dee2e6;
}

.page-link:hover {
  background-color: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

/* Footer Enhancements */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.hover-link {
  transition: all 0.3s ease;
}

.hover-link:hover {
  color: #ffffff !important;
  transform: translateX(5px);
}

/* Search Box */
.input-group .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Featured Post */
.featured-post {
  background: linear-gradient(to right, #ffffff 0%, #f8f9fa 100%);
  border-left: 4px solid #dc3545;
}

/* Hover Effects */
.hover-shadow {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-shadow:hover {
  box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
}

/* Gradients */
.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-light {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.5s ease-out;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  font-size: 1.2rem;
}

/* List Group */
.list-group-item {
  border: none;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background-color: #f8f9fa;
  padding-left: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }
  
  .featured-img {
    height: 250px !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Transitions */
a, button, .card, .btn {
  transition: all 0.3s ease;
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.page-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
