/* Dark Theme Variables - Updated with secondary color */
:root {
  --dark-bg: #121212;
  --dark-card: #1e1e1e;
  --dark-border: #333333;
  --dark-text-primary: #f5f5f5;
  --dark-text-secondary: #b0b0b0;
  --accent-color: #00c896;
  --accent-hover: #00a67e;
  --secondary-color: #3A80C1; /* New secondary color */
  --natural-gradient: linear-gradient(135deg, #00c896, #3A80C1); /* Updated secondary gradient color */
  --soft-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  --card-radius: 8px;
}

/* Global Dark Theme */
.dark-theme-wrapper {
  background-color: var(--dark-bg);
  color: var(--dark-text-primary);
  padding-bottom: 3rem;
}

/* Custom Button Styling */
.btn-accent {
  background: var(--natural-gradient);
  border: none;
  color: white;
  box-shadow: var(--soft-shadow);
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
}

/* Course Hero Section - Enhanced and Improved for Mobile */
.course-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 350px; /* Updated height */
  color: white;
  margin-bottom: 2rem; /* Updated margin */
}

.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;
}

.course-badge {
  display: inline-block;
  background: var(--natural-gradient);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

/* Update the course title color to be explicitly white */
.course-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  color: #ffffff; /* Explicitly setting title to white */
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.rating-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Update star colors to use secondary color */
.stars {
  display: flex;
  color: var(--secondary-color);
}

.students, .created-by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Floating Enrollment Card - Improved to not overlap content */
.floating-enroll-card {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  margin-top: -60px; /* Less negative margin to avoid covering hero content */
  position: relative;
  z-index: 10;
  border: 1px solid var(--dark-border);
  overflow: hidden;
  margin-bottom: 30px;
}

.card-tabs {
  display: flex;
  border-bottom: 1px solid var(--dark-border);
}

.card-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 1rem;
  cursor: pointer;
  color: var(--dark-text-secondary);
  transition: all 0.3s ease;
  position: relative;
}

.card-tabs .tab.active {
  color: var(--accent-color);
  font-weight: 600;
}

.card-tabs .tab.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--natural-gradient);
}

.tab-content {
  display: none;
  padding: 1.5rem;
}

.tab-content.active {
  display: block;
}

.card-content {
  padding: 1.5rem;
}

.price-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 1.5rem;
}

.enrollment-section-card {
  padding-top: 0.5rem;
}

.enrollment-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--dark-text-primary);
  text-align: center;
}

/* Mobile Action Button - Improved visibility */
.mobile-action-btn {
  position: fixed;
  bottom: -70px; /* Hidden by default */
  left: 0;
  width: 100%;
  background: var(--dark-card);
  padding: 0.8rem 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  z-index: 100;
  transition: bottom 0.3s ease;
}

.mobile-action-btn.show {
  bottom: 0;
}

.mobile-action-btn .btn {
  width: 100%;
  font-weight: 600;
  font-size: 1rem;
  height: 50px; /* Taller button for easier tapping */
}

/* Course Price Card */
.course-price-card {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  padding: 2rem;
  margin-top: -80px;
  position: relative;
  z-index: 10;
  border: 1px solid var(--dark-border);
}

.price-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 1.5rem;
  gap: 0.8rem;
  justify-content: center;
}

.current-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color); /* Changed from accent color to secondary color */
}

.old-price {
  text-decoration: line-through;
  color: var(--dark-text-secondary);
  font-size: 1.2rem;
}

.discount-badge {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Course Stats - Updated for better display */
.course-stats {
  margin: 0 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--dark-border);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dark-text-secondary);
  font-size: 0.9rem;
}

/* Update icon colors to use secondary color */
.stat-item i {
  color: var(--secondary-color);
  font-size: 1.1rem;
  min-width: 20px; /* Ensure icons align properly */
}

/* Course Container - Mobile Optimized */
.course-container {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.course-section {
  margin-bottom: 2rem;
  background-color: #121212;
  border-radius: 30px;
  box-shadow: var(--soft-shadow);
  border: 2px solid var(--dark-border);
  border-color: rgba(59, 128, 193, 0.5);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--dark-text-primary);
  position: relative;
  padding-bottom: 0.75rem;
}

/* Course Section Title indicator updated */
.section-title:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  
}

.course-description {
  color: white;
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Video Container - Mobile Optimized */
.video-container {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  width: 100%;
}

/* Updated Video Container - Larger Size */
.video-container-larger {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  width: 100%;
  max-width: 100%; /* Full width container */
  margin-bottom: 2rem;
}

/* Keep the existing video-container-compact for other uses */
.video-container-compact {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  width: 100%;
  max-width: 450px; /* Reduce width further */
  margin-bottom: 2rem;
}

/* New Full-width Video Container - Significantly Larger */
.video-container-full {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); /* Enhanced shadow for dramatic effect */
  width: 100%;
  margin-bottom: 2rem;
  background-color: #000;
}

/* Make the video much larger with maximum height */
#courseIntroVideo {
  width: 100%;
  display: block;
  border-radius: var(--card-radius);
  background-color: #000;
  aspect-ratio: 16/9;
  max-height: 650px; /* Dramatically increased maximum height */
  object-fit: contain; /* Ensure video fits properly */
}

/* Enhanced intro video section for dramatic presentation */
.intro-video-section {
  margin: -1rem -1rem 2rem -1rem; /* Negative margins to stretch video wider */
  width: calc(100% + 2rem);
  position: relative;
}

/* Make the video larger with greater height */
#courseIntroVideo {
  width: 100%;
  display: block;
  border-radius: var(--card-radius);
  background-color: #000;
  aspect-ratio: 16/9;
  max-height: 550px; /* Increased maximum height */
}

/* Learning Outcomes */
.learning-outcomes {
  padding: 0.5rem;
}

.learning-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-right: 1rem;
}

/* Learning Item Icons */
.learning-item i {
  color: var(--secondary-color);
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

/* Course Curriculum - Line Style - Mobile Optimized */
.course-curriculum {
  margin-top: 1rem;
}

.curriculum-section {
  border-bottom: 1px solid var(--dark-border);
  margin-bottom: 0.5rem;
}

.curriculum-section:last-child {
  border-bottom: none;
}

.section-header {
  padding: 1rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-info {
  flex: 1;
}

.chapter-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--dark-text-primary);
}

.chapter-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var (--dark-text-secondary);
  margin-top: 0.25rem;
}

.duration {
  margin-left: auto;
}

/* Toggle Icons */
.toggle-icon {
  color: var(--secondary-color);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.section-header[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.lectures-container {
  padding: 0 0 1rem;
}

.lecture-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: var(--card-radius);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.lecture-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Lecture Icons */
.lecture-icon {
  margin-right: 1rem;
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.lecture-icon .ri-lock-fill {
  color: #ff6b6b;
}

.lecture-details {
  flex: 1;
  padding-right: 0.5rem;
}

.lecture-title {
  font-weight: 500;
  color: var(--dark-text-secondary);
  font-size: 0.95rem;
}

/* Link Colors */
.lecture-title a {
  color: var(--secondary-color);
  text-decoration: none;
}

.lecture-title a:hover {
  text-decoration: underline;
}

.lecture-duration {
  color: var(--dark-text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Sidebar */
.sticky-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--dark-border);
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--dark-border);
  color: var(--dark-text-primary);
}

/* Instructor Card */
.instructor-details {
  display: flex;
  align-items: center;
}

/* Instructor border */
.instructor-image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
  border: 2px solid var(--secondary-color);
}

.instructor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instructor-name {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--dark-text-primary);
}

/* Instructor role color */
.instructor-role {
  color: var(--secondary-color);
  margin-bottom: 0;
}

/* Stats Card */
.stat-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Stat Icons Background */
.stat-icon {
  background-color: rgba(58, 128, 193, 0.1); /* Using secondary color with transparency */
  color: var(--secondary-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA Card */
.cta-card {
  background: linear-gradient(145deg, #222, #1a1a1a);
  padding: 1.5rem;
  text-align: center;
  border: none;
}

.cta-price {
  margin-bottom: 1.5rem;
}

.price-tag {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.discount-info {
  color: #ff8e8e;
  font-weight: 500;
}

/* Enrollment Section */
.enrollment-section {
  background: linear-gradient(145deg, #151515, #0a0a0a);
  padding: 5rem 0;
  color: var(--dark-text-primary);
}

.enrollment-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.enrollment-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0, 200, 150, 0.2));
}

.enrollment-card {
  position: absolute;
  right: 10%;
  top: 30%;
  background: var(--dark-card);
  padding: 0; /* Remove default padding for more control */
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--dark-border);
  overflow: hidden; /* Keep everything contained nicely */
}

/* Card Icon */
.card-icon {
  background-color: rgba(58, 128, 193, 0.1);
  color: var(--secondary-color);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-text {
  color: var(--dark-text-primary);
}

.enrollment-form-container {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  padding: 2.5rem;
  border: 1px solid var(--dark-border);
}

.form-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark-text-primary);
}

.form-subtitle {
  color: var(--dark-text-secondary);
  margin-bottom: 2rem;
}

.enrollment-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0; /* Remove top margin to connect with stats */
  padding: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group:last-of-type {
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--dark-text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-text-secondary);
}

.input-icon input, .input-icon textarea {
  padding-left: 45px;
  background-color: rgba(255, 255, 255, 0.05); /* Lighter input fields */
  border: 1px solid var(--dark-border);
  color: var (--dark-text-primary);
  font-size: 0.95rem;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border-radius: var(--card-radius);
  width: 100%;
}

.input-icon input:focus, .input-icon textarea:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  outline: none;
}

.textarea-icon i {
  top: 25px;
}

.input-icon textarea {
  padding-top: 1rem;
}

.form-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--dark-text-secondary);
  font-size: 0.85rem;
  text-align: center;
}

/* Intro Video Section - New placement under title */
.intro-video-section {
  margin-top: 1rem;
  margin-bottom: 2rem;
  width: 65%;
}

/* Sticky Enrollment Sidebar - For Desktop */
.sticky-enrollment-sidebar {
  position: sticky;
  top: 20px; /* Start sticking closer to the top of the page */
  z-index: 10;
  margin-bottom: 2rem;
  max-width: 340px; /* Limit the maximum width for thinner appearance */
  margin-left: auto; /* Center if parent is wider */
}

/* Mobile Enrollment Section - Only visible on small screens */
.mobile-enrollment-section {
  display: none;
  background-color: var(--dark-bg);
  padding: 2rem 0;
}

/* Mobile specific adjustments */
.mobile-stats {
  padding-bottom: 1rem;
}

.enrollment-title {
  text-align: center;
  font-size: 1.4rem;
  color: var(--dark-text-primary);
  margin-bottom: 1.5rem;
}

/* Ultra-thin Sidebar - Floating over banner */
.ultra-thin-sidebar {
  position: absolute;
  top: -180px; /* Position it to overlap with the banner */
  right: 15px;
  width: 100%;
  z-index: 100;
}

.floating-card {
  max-width: 260px; /* Make it extremely narrow */
  margin-left: auto;
  padding: 0; 
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--dark-border);
  overflow: hidden;
}

/* Ultra-compact header */
.sidebar-card-header {
  padding: 0.75rem 1rem;
  background: linear-gradient(145deg, #222, #1a1a1a);
  border-bottom: 1px solid var(--dark-border);
}

.enrollment-header {
  margin: 0;
  color: var(--dark-text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* Mini price display */
.mini-price {
  padding: 0.75rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px solid var(--dark-border);
}

.mini-price .current-price {
  font-size: 1.5rem;
  color: var(--secondary-color); /* Added explicit color for mini variant */
}

.mini-price .old-price {
  font-size: 1rem;
}

/* Mini stats */
.mini-stats {
  padding: 0.75rem;
  border-bottom: 1px solid var(--dark-border);
}

.mini-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  font-size: 0.85rem;
}

/* Mini instructor */
.mini-instructor {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--dark-border);
  font-size: 0.85rem;
  color: var(--dark-text-secondary);
}

.mini-instructor-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-color);
}

/* Mini form */
.mini-form {
  padding: 0.75rem;
}

.mini-form-group {
  margin-bottom: 0.75rem;
}

.mini-form-group .input-icon input {
  padding: 0.6rem 0.6rem 0.6rem 2rem;
  font-size: 0.85rem;
}

.mini-form-group .input-icon i {
  left: 8px;
  font-size: 0.9rem;
}

.mini-form .btn {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.tiny-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--dark-text-secondary);
  font-size: 0.75rem;
}

/* Full-length Slim Sidebar - New Implementation */
.slim-sidebar {
  position: sticky;
  top: 70px; /* Adjusted to have space above for the header text */
  z-index: 20;
  margin-bottom: 2rem;
  margin-top: -220px; /* More negative margin to position it higher */
  padding-top: 0; /* Remove top padding */
}

.slim-enrollment-card {
  width: 280px; /* Fixed narrow width */
  margin-left: auto; /* Push to right side */
  padding: 0;
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--dark-border);
  overflow: visible; /* Changed from hidden to allow content to overflow */
  /* Add a subtle animation when scrolling starts */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add shadow enhancement when page is scrolled */
.scrolled .slim-enrollment-card {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Slim card header */
.sidebar-card-header {
  padding: 0.85rem 1.2rem;
  background: linear-gradient(145deg, #222, #1a1a1a);
  border-bottom: 1px solid var(--dark-border);
  position: relative; /* Added position relative */
  z-index: 2; /* Ensure header is above other elements */
}

/* Add a wrapper within the card to handle scrolling content */
.slim-card-scrollable {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px; /* Add slight padding for scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color) var(--dark-card);
}

/* Custom scrollbar styling */
.slim-card-scrollable::-webkit-scrollbar {
  width: 4px;
}

.slim-card-scrollable::-webkit-scrollbar-track {
  background: var(--dark-card);
}

.slim-card-scrollable::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  border-radius: 20px;
}

/* Slim price section */
.slim-price-section {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--dark-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.slim-price-section .current-price {
  font-size: 1.6rem;
  color: var(--secondary-color); /* Added explicit color for slim variant */
}

.slim-price-section .old-price {
  font-size: 1rem;
  opacity: 0.7;
}

/* Slim stats */
.slim-stats {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.slim-stats .stat-item {
  width: 100%;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Slim instructor */
.slim-instructor {
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--dark-border);
}

/* Slim instructor elements */
.slim-instructor-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--secondary-color);
}

.slim-instructor-name {
  font-weight: 600;
  color: var(--dark-text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
  display: block;
}

/* Slim instructor role color */
.slim-instructor-role {
  color: var(--secondary-color);
  font-size: 0.8rem;
}

/* Slim form */
.slim-form {
  padding: 1rem 1.2rem;
}

.slim-form-group {
  margin-bottom: 1rem;
}

.slim-form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--dark-text-primary);
  font-weight: 500;
}

.slim-form-group .input-icon input,
.slim-form-group .input-icon textarea {
  padding: 0.7rem 0.7rem 0.7rem 2.2rem;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dark-border);
  color: var(--dark-text-primary);
  border-radius: var(--card-radius);
  width: 100%;
  ;
}

.slim-form-group .input-icon input:focus,
.slim-form-group .input-icon textarea:focus {
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

.slim-form-group .input-icon i {
  left: 10px;
  font-size: 0.9rem;
}

.slim-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--dark-text-secondary);
  font-size: 0.8rem;
  text-align: center;
}

.alert-sm {
  padding: 0.5rem;
  font-size: 0.85rem;
}

/* Thank You Modal Animation */
.thank-you-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.thank-you-modal.show {
  opacity: 1;
  visibility: visible;
}

.thank-you-content {
  background-color: var(--dark-card);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--dark-border);
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  transform: translateY(30px);
  transition: transform 0.4s ease-out;
}

.thank-you-modal.show .thank-you-content {
  transform: translateY(0);
}

.thank-you-icon {
  background: var(--natural-gradient);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.thank-you-icon i {
  color: white;
  font-size: 3rem;
}

.thank-you-title {
  color: var(--dark-text-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.thank-you-message {
  color: var(--dark-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Button Spinner Animation */
.fa-spin {
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Adjustments */
@media (max-width: 1199.98px) {
  .video-container-larger {
    max-height: 400px; /* Slightly smaller on medium screens */
  }
  #courseIntroVideo {
    max-height: 500px; /* Slightly smaller on large screens */
  }
}

@media (max-width: 991.98px) {
  .course-hero {
    height: 300px;
  }
  
  .course-title {
    font-size: 2rem;
    color: #ffffff; /* Maintain white color on medium screens */
  }
  
  .course-price-card {
    margin-top: 2rem;
  }
  
  .sticky-sidebar {
    position: static;
  }
  
  .enrollment-image {
    margin-bottom: 2rem;
  }
  
  .enrollment-card {
    position: static;
    margin-top: 1rem;
  }
  
  .floating-enroll-card {
    margin-bottom: 2rem;
  }
  
  .curriculum-section {
    padding: 0 0.5rem;
  }
  
  /* Show mobile enrollment section and hide desktop sidebar */
  .mobile-enrollment-section {
    display: block;
  }
  
  .sticky-enrollment-sidebar {
    display: none; /* Hide desktop sticky sidebar */
    max-width: 100%;
  }
  
  .intro-video-section {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }
  
  .course-container {
    padding-bottom: 0; /* Reduce padding since mobile enrollment section is separate */
  }

  .video-container-compact {
    max-width: 100%; /* Full width on smaller screens */
  }

  .ultra-thin-sidebar {
    display: none; /* Hide on mobile */
  }

  .slim-sidebar {
    margin-top: 0; /* Reset negative margin on mobile */
    display: none; /* Still hide on mobile */
  }

  .video-container-larger {
    max-height: 350px; /* Even smaller on tablets */
  }
  #courseIntroVideo {
    max-height: 420px; /* Adjusted for medium screens */
  }
}

@media (max-width: 767.98px) {
  .course-hero {
    height: 250px;
    margin-bottom: 60px;
  }
  
  .course-hero-content {
    padding: 1.5rem 0;
  }
  
  .course-title {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    color: #ffffff; /* Maintain white color on small screens */
  }
  
  .course-meta {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .chapter-title {
    font-size: 1rem;
  }
  
  .chapter-meta {
    font-size: 0.8rem;
  }
  
  /* Adjust form padding on mobile */
  .tab-content {
    padding: 1rem;
  }
  
  /* Better spacing for course sections on mobile */
  .course-section {
    padding: 1.25rem;
  }
  
  /* Improve lecture rows on mobile */
  .lecture-row {
    padding: 0.5rem;
  }
  
  /* Avoid keyboard overlapping form fields on mobile */
  input:focus, 
  textarea:focus {
    font-size: 16px !important;
  }
  
  /* Ensure bottom padding to avoid mobile action button overlay */
  .dark-theme-wrapper {
    padding-bottom: 5rem;
  }
  
  .floating-enroll-card {
    margin-top: -50px;
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .price-section {
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }
  
  .price-container {
    justify-content: center;
  }
  
  .current-price {
    font-size: 1.75rem;
    color: var(--secondary-color); /* Ensure consistency on mobile */
  }
  
  .intro-video-section {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .mobile-enrollment-section {
    padding: 1.5rem 0;
  }

  .video-container-larger {
    max-height: 300px; /* Adjusted for mobile */
  }
  #courseIntroVideo {
    max-height: 350px; /* Adjusted for small screens */
  }
}

@media (max-width: 480px) {
  .course-hero {
    height: 200px;
    margin-bottom: 50px;
  }
  
  .course-title {
    font-size: 1.4rem;
    color: #ffffff; /* Maintain white color on extra small screens */
  }
  
  .floating-enroll-card {
    margin-top: -30px;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .course-stats {
    grid-template-columns: 1fr; /* single column for smallest screens */
  }
  
  .stat-item {
    margin-bottom: 0.5rem;
  }
  
  .enrollment-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  .form-group label {
    font-size: 0.9rem;
  }
  
  .input-icon input,
  .input-icon textarea {
    padding: 0.65rem 0.65rem 0.65rem 2.5rem;
  }
  
  /* Ensure bottom padding to avoid mobile action button overlay */
  .dark-theme-wrapper {
    padding-bottom: 6rem;
  }
  
  .intro-video-section {
    margin-bottom: 1rem;
  }

  .video-container-compact {
    margin-bottom: 1rem;
  }

  .thank-you-content {
    padding: 1.5rem;
    max-width: 90%;
  }
  
  .thank-you-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .thank-you-icon i {
    font-size: 2rem;
  }
  
  .thank-you-title {
    font-size: 1.4rem;
  }
  #courseIntroVideo {
    max-height: 250px; /* Adjusted for extra small screens */
  }
}

/* Fix for iOS input zoom */
@media screen and (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Fix modal scrolling on iOS */
body.modal-open {
  position: fixed;
  width: 100%;
}

/* Fix for Safari video player */
video::-webkit-media-controls {
  overflow: hidden !important;
}

video::-webkit-media-controls-enclosure {
  width: calc(100% + 32px);
  margin-left: auto;
}

/* Fix for accordion focus state */
.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.125);
}

/* Fix for text overflow in small widths */
.lecture-title, .section-title {
  word-break: break-word;
}

/* General mobile optimizations */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Improved touch target sizes */
button, 
.btn,
.lecture-row,
.section-header {
  min-height: 44px;
}

/* More compact stats */
.compact-stats {
  margin: 0 1.2rem 1rem;
  padding-bottom: 1rem;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Instructor section inside enrollment card */
.instructor-section {
  padding: 0 1.2rem 1rem;
  border-bottom: 1px solid var(--dark-border);
  margin-bottom: 1rem;
}

.compact-instructor {
  display: flex;
  align-items: center;
}

.compact-instructor .instructor-image {
  width: 50px;
  height: 50px;
  margin-right: 0.75rem;
}

.compact-instructor .instructor-name {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.compact-instructor .instructor-role {
  font-size: 0.85rem;
}

/* Form styles - More compact */
.enrollment-form {
  padding: 0 1.2rem 1.2rem;
}

.compact-form-group {
  margin-bottom: 1rem;
}

.compact-form-group label {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.compact-form-group .input-icon input, 
.compact-form-group .input-icon textarea {
  padding: 0.65rem 0.65rem 0.65rem 2.5rem;
}

/* Responsive adjustments for the much larger video */
@media (max-width: 1399.98px) {
  #courseIntroVideo {
    max-height: 600px; /* Still very large on extra large screens */
  }
}

@media (max-width: 1199.98px) {
  #courseIntroVideo {
    max-height: 550px; /* Large on large screens */
  }
  
  .intro-video-section {
    margin: -0.5rem -0.5rem 2rem -0.5rem;
    width: calc(100% + 1rem);
  }
}

@media (max-width: 991.98px) {
  #courseIntroVideo {
    max-height: 500px; /* Still substantial on medium screens */
  }
  
  /* ...existing media query content... */
}

@media (max-width: 767.98px) {
  #courseIntroVideo {
    max-height: 400px; /* Relatively large on small screens */
  }
  
  /* ...existing media query content... */
}

@media (max-width: 480px) {
  #courseIntroVideo {
    max-height: 300px; /* Still decent sized on extra small screens */
  }
  
  /* ...existing media query content... */
}