/* Dark Theme Enrollment Page matching Homepage Styling */
:root {
  --dark-bg: #000000; /* Match homepage pure black */
  --dark-bg-lighter: #0a0a0a;
  --dark-card: #141414; /* Match homepage dark card background */
  --dark-border: #232323;
  --dark-text-primary: #f5f5f5;
  --dark-text-secondary: #aaaaaa;
  --accent-color: #3A80C1; /* Using the homepage accent blue instead of green */
  --accent-hover: #2a6dac;
  --gradient-primary: linear-gradient(135deg, #3A80C1 0%, #173956 100%); /* Match homepage gradient */
  --soft-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Match homepage shadow */
  --card-radius: 12px; /* Match homepage card radius */
}

/* Global Dark Theme */
body {
  background-color: var(--dark-bg);
}

.dark-theme-wrapper {
  background-color: #121212;
  color: var(--dark-text-primary);
  padding-bottom: 3rem;
}

/* Custom Button Styling to match homepage */
.btn-accent {
  background: var(--gradient-primary);
  border: none;
  color: white;
  box-shadow: var(--soft-shadow);
  transition: all 0.3s ease;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(58, 128, 193, 0.3);
}

/* Course Hero Section - Match hero section of homepage */
.course-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 400px; /* Taller to match homepage feel */
  color: white;
  margin-bottom: 0; /* No margin to match seamless homepage sections */
}

.course-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
  display: flex;
  align-items: center;
}

.course-hero-content {
  padding: 2rem 0;
}

/* Match badge to homepage badge style */
.course-badge {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Match homepage title styling */
.course-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.2em;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4); /* Matching homepage glow effect */
  color: #ffffff;
}

/* Course Sections - Match homepage card styling */
.course-section {
  margin-bottom: 2rem;
  background-color: #121212;
  padding: 0 1px;
  border-radius: 30px !important;
  box-shadow: var(--soft-shadow);
  border: 2px solid var(--dark-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: visible !important;
  border-color: rgba(59, 128, 193, 0.5);
}


.course-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Section title with underline matching homepage */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--dark-text-primary);
  position: relative;
  padding-bottom: 0.75rem;
  margin: 20px;;
  text-align: start; /* Center the text */
}



/* Learning outcomes with style similar to homepage features */
.learning-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-right: 1rem;
}

.learning-item i {
  color: var(--accent-color);
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

/* Video container with improved styling matching homepage cards */
.video-container-full {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  width: 100%;
  margin-bottom: 2rem;
  background-color: #000;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Course curriculum - Improve the accordion to match homepage styling */
.curriculum-section {
  border-bottom: 1px solid var(--dark-border);
  margin-bottom: 0.5rem;
}

.section-header {
  padding: 1rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.section-header:hover {
  background-color: rgba(58, 128, 193, 0.1);
  border-radius: var(--card-radius);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.chapter-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--dark-text-primary);
}

/* Lecture rows with glass effect similar to homepage cards */
.lecture-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  background-color: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lecture-row:hover {
  background-color: rgba(30, 30, 40, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Instructor section with styling similar to homepage */
.instructor-details {
  display: flex;
  align-items: center;
}

.instructor-image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
  border: 2px solid var(--accent-color);
  box-shadow: 0 5px 15px rgba(58, 128, 193, 0.3);
}

/* Enrollment sidebar with glass card effect similar to homepage */
.slim-enrollment-card {
  background-color: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  max-height: none; /* Remove the fixed max-height constraint */
  width: 100%; /* Ensure full width in container */
}

/* Price section with accent color matching homepage */
.slim-price-section .current-price {
  font-size: 1.6rem;
  color: var(--accent-color);
  font-weight: 700;
}

/* Form inputs with consistent styling */
.input-icon input, .input-icon textarea {
  background-color: rgba(30, 30, 40, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--dark-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.input-icon input:focus, .input-icon textarea:focus {
  outline: none;
  background-color: rgba(30, 30, 40, 0.7);
  box-shadow: inset 0 0 0 1px var(--accent-color),
              0 15px 35px -10px rgba(58, 128, 193, 0.3);
  transform: translateY(-2px);
}

/* Mobile action button with gradient matching homepage */
.mobile-action-btn .btn {
  background: var(--gradient-primary);
  border: none;
  font-weight: 600;
}

/* Thank you modal with styling similar to homepage cards */
.thank-you-content {
  background-color: rgba(20, 20, 30, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  padding: 2rem;
  max-width: 420px;
}

.thank-you-icon {
  background: var(--gradient-primary);
  box-shadow: 0 10px 20px rgba(58, 128, 193, 0.3);
}

/* Add new styles for simple header (to replace the banner) */
.simple-course-header {
  background-color: var(--dark-card);
  padding: 3rem 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--dark-border);
}

.course-header-content {
  text-align: center;
}

/* Style the course title specifically for this header */
.simple-course-header .course-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Style the meta info in the header */
.simple-course-header .course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  color: var(--dark-text-primary);
}

/* Update the linear curriculum styles to replace accordion */
.course-curriculum-linear {
  margin-top: 1rem;
  display: block !important; /* Force display */
  opacity: 1 !important; /* Ensure visibility */
}

.curriculum-section-linear {
  margin-bottom: 2rem;
  display: block !important;
}

.section-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  background: #121212;
}

.lecture-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

.lecture-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.lecture-item:hover {
  background-color: rgba(30, 30, 40, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lecture-icon {
  margin-right: 0.75rem;
  color: var(--accent-color);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.lecture-details {
  flex: 1;
}

.lecture-title {
  color: var(--dark-text-secondary);
}

.lecture-title a {
  color: var(--accent-color);
  text-decoration: none;
}

.lecture-title a:hover {
  text-decoration: underline;
}

.lecture-duration {
  color: var(--dark-text-secondary);
  font-size: 0.85rem;
  margin-left: 1rem;
}

/* Fix the slim-sidebar position to avoid overlapping content */
.slim-sidebar {
  position: sticky;
  top: 70px; 
  z-index: 20;
  margin-bottom: 2rem;
  margin-top: 2rem; /* Changed from negative margin to positive to avoid overlap */
  padding-top: 0;
}

/* Ensure the slim-card-scrollable content is properly constrained */
.slim-card-scrollable {
  max-height: none; /* Remove fixed max-height to avoid unnecessary scrollbars */
  overflow-y: visible; /* Changed from auto to visible */
  overflow-x: hidden;
  padding-right: 0; /* Remove padding that was for scrollbar */
}

/* Add height constraint only when needed on larger screens */
@media (min-height: 900px) {
  .slim-card-scrollable {
    max-height: 75vh; /* Only apply max-height on tall screens */
    overflow-y: auto; /* Only then enable scrolling */
    /* Style the scrollbar to be more subtle */
    scrollbar-width: thin;
    scrollbar-color: rgba(58, 128, 193, 0.3) transparent;
  }
  
  /* Custom scrollbar styling for Webkit browsers */
  .slim-card-scrollable::-webkit-scrollbar {
    width: 4px;
  }
  
  .slim-card-scrollable::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .slim-card-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(58, 128, 193, 0.3);
    border-radius: 4px;
  }
  
  /* Make scrollbar visible only on hover */
  .slim-card-scrollable::-webkit-scrollbar-thumb {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .slim-card-scrollable:hover::-webkit-scrollbar-thumb {
    opacity: 1;
  }
}

/* Make form elements more compact to reduce needed space */
.slim-form-group {
  margin-bottom: 0.85rem; /* Slightly reduce margin */
}

/* Add some padding at bottom of form to improve appearance */
.slim-form {
  padding-bottom: 0.5rem;
}

/* Ensure the content doesn't shift when scrollbar appears */
.sidebar-card-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--dark-card);
}

/* Responsive adjustments to match homepage feel */
@media (max-width: 991.98px) {
  .course-hero {
    height: 300px;
  }
  
  .course-title {
    font-size: 2.5rem;
  }
  
  /* More mobile-friendly adjustments while preserving the feel */
  

  .simple-course-header {
    padding: 2rem 0 1.5rem;
  }
  
  .simple-course-header .course-title {
    font-size: 2rem;
  }

  .course-section.d-block.d-lg-none {
    margin-top: 2rem; /* Add more space above instructor section on mobile */
  }

  .mobile-enrollment-section {
    display: block;
  }
  
  .slim-sidebar {
    display: none; /* Hide desktop version on mobile */
  }
}

@media (max-width: 767.98px) {
  .course-hero {
    height: 250px;
  }
  
  .course-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }

  .simple-course-header {
    padding: 1.5rem 0 1rem;
  }
  
  .simple-course-header .course-title {
    font-size: 1.7rem;
  }
  
  .simple-course-header .course-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Make lecture items more compact on mobile */
  .lecture-item {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .course-hero {
    height: 200px;
  }
  
  .course-title {
    font-size: 1.7rem;
  }
  
  /* Ensure bottom padding to avoid mobile action button overlay */
  .dark-theme-wrapper {
    padding-bottom: 6rem;
  }
}
