/* Profile Courses Styles */
.profile-courses-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 400px;
}

/* Breadcrumb Styles */
.breadcrumb {
  background: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.breadcrumb-item a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: #764ba2;
}

.breadcrumb-item.active {
  color: #2A3B4C;
  font-weight: 500;
}

/* Header Styles */
.courses-header {
  margin-bottom: 3rem;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.text-primary {
  color: #667eea !important;
}

.hero-badge .badge {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.lead {
  font-size: 1.2rem;
  color: #6c757d;
}

/* Stats Card */
.stats-card {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: transform 0.3s ease;
  border-radius: 1rem;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.stats-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stats-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Course Card Styles */
.course-card {
  transition: all 0.3s ease;
  height: 100%;
}

.hover-lift {
  transition: all 0.3s ease;
  cursor: pointer;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15) !important;
}

.course-image-wrapper {
  overflow: hidden;
  position: relative;
  background: #f8f9fa;
}

.course-image {
  transition: transform 0.5s ease;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.hover-lift:hover .course-image {
  transform: scale(1.05);
}

.course-image-placeholder {
  transition: all 0.3s ease;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-level-badge .badge {
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  backdrop-filter: blur(5px);
}

/* Card Body */
.card-body {
  background: white;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  color: #1e3c72;
  line-height: 1.3;
  font-size: 1.1rem;
  font-weight: 700;
}

.card-text {
  line-height: 1.5;
  color: #6c757d;
  font-size: 0.875rem;
}

/* Course Meta */
.course-meta {
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  background: linear-gradient(135deg, #764ba2, #667eea);
}

.btn-outline-primary {
  border: 2px solid #667eea;
  color: #667eea;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

/* Empty State */
.empty-state {
  background: transparent;
  border-radius: 1rem;
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon i {
  font-size: 5rem;
  color: rgba(102, 126, 234, 0.2);
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #2A3B4C;
}

.empty-state .btn {
  padding: 0.75rem 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .profile-courses-wrapper {
    padding: 0 1rem;
  }
}

@media (max-width: 992px) {
  .display-4 {
    font-size: 2.5rem;
  }
  
  .stats-card {
    display: inline-flex !important;
  }
  
  .courses-header {
    text-align: center;
  }
  
  .text-lg-end {
    text-align: center !important;
    margin-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .profile-courses-wrapper {
    padding: 0 0.75rem;
  }
  
  .breadcrumb {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  .stats-card {
    display: flex !important;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .course-image-wrapper img,
  .course-image-placeholder {
    height: 180px !important;
  }
  
  .card-body {
    padding: 1.25rem !important;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .course-level-badge .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem !important;
  }
  
  .btn-primary {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 576px) {
  .profile-courses-wrapper {
    padding: 0 0.5rem;
  }
  
  .display-4 {
    font-size: 1.5rem;
  }
  
  .hero-badge .badge {
    font-size: 0.75rem;
  }
  
  .course-image-wrapper img,
  .course-image-placeholder {
    height: 160px !important;
  }
  
  .card-title {
    font-size: 0.9rem;
  }
  
  .card-text {
    font-size: 0.8rem;
  }
  
  .course-meta .small {
    font-size: 0.7rem;
  }
  
  .empty-state {
    padding: 2rem 1rem !important;
  }
  
  .empty-icon i {
    font-size: 3rem;
  }
  
  .empty-state h3 {
    font-size: 1.25rem;
  }
  
  .btn-primary {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Grid spacing */
.row.g-4 {
  --bs-gutter-y: 1.5rem;
  --bs-gutter-x: 1.5rem;
}

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

.course-card {
  animation: fadeInUp 0.5s ease forwards;
}

/* Card grid layout */
.courses-grid {
  margin-bottom: 3rem;
}

/* Fix for container in base.html */
.main-content .container {
  max-width: 100%;
  padding: 0;
}

/* Ensure proper spacing before footer */
.courses-grid {
  margin-bottom: 3rem;
}

.profile-courses-wrapper:last-child {
  margin-bottom: 2rem;
}