/* ============================================
   MODERN KURSLAR SAYFASI CSS
   ============================================ */

:root {
  /* Renkler */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-ultra-light: #eef2ff;
  --secondary: #ec4899;
  --secondary-light: #f9a8d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Neutral colors */
  --dark: #0f172a;
  --dark-lighter: #1e293b;
  --dark-light: #334155;
  --gray: #64748b;
  --gray-light: #cbd5e1;
  --gray-lighter: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  
  /* Gölgeler */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Border radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 110, 199, 0.3), transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.2), transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: bgPulse 20s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-light);
}

/* ============ MAIN WRAPPER ============ */
.main-wrapper {
  position: relative;
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============ HERO HEADER ============ */
.hero-header {
  text-align: center;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

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

/* ============ CONTROLS CONTAINER ============ */
.controls-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.controls-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Toggle filter button */
.toggle-filter-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  position: relative;
  overflow: hidden;
}

.toggle-filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.toggle-filter-btn:hover::before {
  left: 100%;
}

.toggle-filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.toggle-filter-btn:active {
  transform: translateY(0);
}

/* Search wrapper */
.search-wrapper {
  flex: 1;
  position: relative;
  min-width: 280px;
  max-width: 500px;
}

.search-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
  font-family: inherit;
}

.search-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-wrapper input::placeholder {
  color: var(--gray);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
  font-size: 1rem;
}

/* View options */
.view-options {
  display: flex;
  gap: 0.5rem;
  background: var(--gray-lighter);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
}

.view-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition-fast);
}

.view-btn:hover {
  background: white;
  color: var(--primary);
}

.view-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}



/* ============ FILTER PANEL ============ */
.filter-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(480px, 90vw);
  height: 100vh;
  background: white;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 60px rgba(0, 0, 0, 0.3);
}

.filter-panel.is-open {
  right: 0;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1.75rem;
  border-bottom: 2px solid var(--gray-lighter);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.filter-header h4 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.filter-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 400;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.25rem;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.filter-panel-inner {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem;
}

/* Filter groups */
.filter-group {
  margin-bottom: 2rem;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--dark);
  font-size: 0.95rem;
}

.filter-group label i {
  color: var(--primary);
  font-size: 1rem;
}

.filter-group select,
.filter-group input[type="number"],
.filter-group input[type="time"],
.filter-group input[type="date"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
  font-family: inherit;
  color: var(--dark);
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.filter-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Price, time, date ranges */
.price-range,
.time-range,
.date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.price-slider {
  margin-top: 0.75rem;
  height: 6px;
  background: var(--gray-lighter);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.price-track {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  width: 100%;
}

/* Checkbox groups */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
}

.day-checkbox {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0.75rem;
  background: var(--gray-lighter);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 500;
  font-size: 0.9rem;
  user-select: none;
}

.day-checkbox:hover {
  background: var(--primary-ultra-light);
  border-color: var(--primary-light);
}

.day-checkbox input[type="checkbox"] {
  display: none;
}

.day-checkbox input[type="checkbox"]:checked + span {
  color: var(--primary);
  font-weight: 600;
}

.day-checkbox:has(input:checked) {
  background: var(--primary-ultra-light);
  border-color: var(--primary);
}

.day-checkbox span {
  transition: var(--transition-fast);
}

/* Filter actions */
.filter-actions-sticky {
  padding: 1.5rem;
  border-top: 2px solid var(--gray-lighter);
  background: white;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.75rem;
}

.btn {
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-ghost:hover {
  background: var(--gray-lighter);
  border-color: var(--gray);
  color: var(--dark);
}

/* ============ PAGE CONTENT ============ */
.page-content {
  display: grid;
  gap: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.results-count {
  background: rgba(255, 255, 255, 0.95);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow);
}

.results-count #course-count {
  color: var(--primary);
  font-size: 1.1rem;
}

/* ============ COURSES GRID ============ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Loading skeleton */
.loading-skeleton {
  display: contents;
}

.skeleton-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton-card::before {
  content: '';
  display: block;
  height: 220px;
  background: linear-gradient(90deg, var(--gray-lighter) 25%, var(--gray-light) 50%, var(--gray-lighter) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Course card */
.course-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  height: fit-content;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  z-index: 1;
}

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

.course-card:hover::before {
  opacity: 1;
}

.course-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
}

.course-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.course-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  z-index: 2;
  box-shadow: var(--shadow);
}

.course-content {
  padding: 1.75rem;
  position: relative;
  z-index: 2;
}

.course-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--primary-ultra-light);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition-fast);
}

.meta-badge:hover {
  background: var(--primary-light);
  color: white;
  transform: translateY(-2px);
}

.meta-badge i {
  font-size: 0.9rem;
}

.course-details {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-lighter);
  font-size: 0.9rem;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--gray);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-label i {
  color: var(--primary);
  font-size: 0.95rem;
}

.detail-value {
  color: var(--dark);
  font-weight: 600;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 2px solid var(--gray-lighter);
}

.course-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-label {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-amount {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.course-action {
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.course-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.course-action:active {
  transform: translateY(0);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  color: var(--gray);
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.empty-state::before {
  content: '🔍';
  display: block;
  font-size: 4rem;
  margin-bottom: 1rem;
}

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

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.75rem;
  background: white;
  color: var(--dark);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

.page-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.page-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  cursor: default;
}

.page-link.active:hover {
  transform: none;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 1200px) {
  .courses-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .controls-inner {
    flex-direction: column;
  }
  
  .toggle-filter-btn,
  .search-wrapper {
    width: 100%;
  }
  
  .view-options {
    width: 100%;
    justify-content: center;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .filter-panel {
    width: 100vw;
  }
  
  .filter-actions {
    grid-template-columns: 1fr;
  }
  
  .course-title {
    font-size: 1.2rem;
  }
  
  .price-amount {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-header {
    padding: 2rem 0 1.5rem;
  }
  
  .controls-container {
    padding: 1rem;
  }
  
  .course-content {
    padding: 1.25rem;
  }
  
  .course-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .course-action {
    width: 100%;
  }
  
  .days-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============ PRINT STYLES ============ */
@media print {
  body::before,
  .controls-container,
  .filter-panel,
  .filter-modal-overlay,
  .pagination-container,
  .view-options {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .course-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--gray-light);
  }
  
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible styles */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}