/* Modern Stylish Course Page CSS (Udemy-Like) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* CSS Variables */
:root {
  --primary-color: #000000;  /* Black for buttons */
  --secondary-color: #ffffff;  /* White text */
  --bg-color: #f7f7f7;       /* Light grey background */
  --card-bg: #ffffff;        /* White card background */
  --text-color: #333333;     /* Dark text */
  --border-radius: 6px;
  --font-family: 'Roboto', sans-serif;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Individual Lesson Container */
.student-lesson-container {
  background: var(--card-bg);
  margin: 40px auto;
  padding: 30px;
  max-width: 900px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Video Container (16:9 Aspect Ratio) */
.lesson-video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  background: #000;
}
.lesson-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Quiz/Exam Form Styling */
.quiz-form,
.exam-form {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  border: 1px solid #ddd;
}

/* Increase font size for quiz forms */
.quiz-form,
.quiz-form .quiz-question p {
    font-size: 18px;
    line-height: 1.6;
}

.quiz-question {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
}
.quiz-question p {
  margin: 0 0 10px;
  font-weight: 500;
}
.quiz-question ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quiz-question li {
  margin-bottom: 10px;
}
.quiz-question input[type="radio"] {
  margin-right: 8px;
}
.correct-answer {
  color: #ff9800;
  display: none;
}

/* Button Styling (All buttons black with white text) */
.quiz-submit,
.exam-submit,
.toggle-test-btn,
.nav-button,
.lesson-button {
  background: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.quiz-submit:hover,
.exam-submit:hover,
.toggle-test-btn:hover,
.nav-button:hover,
.lesson-button:hover {
  background: #333333;
}

/* Navigation Buttons */
.lesson-navigation {
  text-align: center;
  margin-top: 30px;
}
.nav-button {
  margin: 0 10px;  /* Space between navigation buttons */
}

/* BOOK OVERVIEW & SELECTION */

/* Container for the book cards */
.book-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* Increased minimum width for wider cards */
  gap: 20px;
  margin-top: 20px;
}

/* Single book card: wider and more balanced */
.book-card {
  background: var(--card-bg);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  max-width: 400px; /* Increased max width */
  margin: 0 auto;
  min-height: 450px;
}
.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Book thumbnail */
.book-card img.course-thumbnail {
  width: 100%;
  height: 260px; /* Adjusted height */
  object-fit: cover;
  display: block;
}
.book-card .course-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.book-card .course-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text-color);
}
.book-card .course-instructor {
  font-size: 1rem;
  color: #666666;
  margin: 0 0 10px;
  font-style: italic;
}
.book-card .course-rating {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #ff9800;
}
.book-card .course-rating span {
  margin-left: 5px;
  color: var(--text-color);
}

/* LESSON LIST USING BUTTONS */

/* Container for the lesson buttons */
.lesson-button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

/* Individual lesson button */
.lesson-button {
  display: inline-block;
  padding: 15px 25px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s ease;
  cursor: pointer;
}

/* HEADINGS & TEXT */
.book-overview {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}
.book-overview h1,
.book-overview h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--primary-color);
}
.book-overview h1 {
  font-size: 2.5rem;
}
.book-overview h2 {
  font-size: 2rem;
}

/* EXAM LINK BUTTON */
.exam-link .lesson-button {
  margin-top: 20px;
}
 
/* Responsive Adjustments */
@media (max-width: 768px) {
  .book-cards {
    grid-template-columns: 1fr;
  }
  
  .lesson-video {
    width: 100%;
    max-width: 100%;
  }
}
