/* =======================
   COURSES SECTION
======================= */

.courses-section {
  padding: 140px 6% 100px;
  background: #fafafa;
  min-height: calc(100vh - 200px);
  position: relative;
}

.courses-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Section Header */
.courses-header {
  text-align: center;
  margin-bottom: 60px;
  padding: 0 20px;
}

.courses-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  color: #1a3a3a;
  margin-bottom: 15px;
  line-height: 1.2;
}

.courses-subtitle {
  font-size: clamp(16px, 2vw, 18px);
  color: #5e7380;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
}

/* Course Cards Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 0 20px;
  width: 100%;
  min-height: 400px;
}

/* Course Card */
.course-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Course Image */
.course-image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  opacity: 1;
  visibility: visible;
}

.course-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
  opacity: 1;
}

.course-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 58, 58, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-card:hover .course-image {
  transform: scale(1.1);
}

.course-card:hover .course-image-overlay {
  opacity: 1;
}

/* Course Content */
.course-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

/* Course Name */
.course-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 700;
  color: #1a3a3a;
  margin-bottom: 15px;
  line-height: 1.3;
}

/* Course Duration */
.course-duration {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.duration-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #5e7380;
  font-weight: 500;
}

.duration-item i {
  font-size: 14px;
  color: #8b6f2e;
}

.duration-separator {
  color: #c0c0c0;
  font-weight: 300;
}

/* Course Description */
.course-description {
  font-size: 15px;
  color: #5e7380;
  line-height: 1.7;
  margin-bottom: 20px;
  font-weight: 400;
}

/* Course Details (Expandable) */
.course-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.course-details.expanded {
  max-height: 2000px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  opacity: 1;
}

.details-overview {
  margin-bottom: 20px;
}

.details-overview p {
  font-size: 15px;
  color: #5e7380;
  line-height: 1.7;
  margin: 0;
}

.details-learn {
  margin-bottom: 20px;
}

.details-learn h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a3a3a;
  margin-bottom: 15px;
  font-family: 'Montserrat', sans-serif;
}

.learn-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.learn-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #5e7380;
  line-height: 1.7;
  margin-bottom: 10px;
}

.learn-list li i {
  color: #d4af37;
  font-size: 14px;
  margin-top: 3px;
  flex-shrink: 0;
}

.details-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.include-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 13px;
  color: #5e7380;
  font-weight: 500;
}

/* Course Actions */
.course-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

/* View Details Button */
.view-details-btn {
  flex: 1;
  padding: 12px 18px;
  background: transparent;
  color: #1a3a3a;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.view-details-btn:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.view-details-btn.active {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.view-details-btn i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.view-details-btn.active i {
  transform: rotate(180deg);
}

/* Book Now Button */
.book-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #d4af37 0%, #c9a961 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
}

.book-btn-primary:hover {
  background: linear-gradient(135deg, #c9a961 0%, #b8941f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

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

/* =======================
   RESPONSIVE DESIGN
======================= */

/* Tablet (2 columns) */
@media (max-width: 992px) {
  .courses-section {
    padding: 120px 4% 80px;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .courses-header {
    margin-bottom: 50px;
  }

  .course-image-wrapper {
    height: 220px;
  }

  .course-content {
    padding: 25px;
  }
}

/* Mobile (1 column) */
@media (max-width: 768px) {
  .courses-section {
    padding: 110px 4% 70px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 10px;
  }

  .courses-header {
    margin-bottom: 40px;
    padding: 0 10px;
  }

  .courses-title {
    margin-bottom: 12px;
  }

  .courses-subtitle {
    font-size: 15px;
  }

  .course-card {
    max-width: 500px;
    margin: 0 auto;
  }

  .course-content {
    padding: 25px;
  }

  .course-name {
    margin-bottom: 12px;
  }

  .course-duration {
    margin-bottom: 15px;
  }

  .course-description {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .course-actions {
    flex-direction: column;
    gap: 10px;
  }

  .view-details-btn,
  .book-btn-primary {
    width: 100%;
    padding: 14px 20px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .courses-section {
    padding: 100px 3% 60px;
  }

  .courses-grid {
    gap: 20px;
  }

  .course-image-wrapper {
    height: 200px;
  }

  .course-content {
    padding: 20px;
  }

  .course-name {
    font-size: 20px;
  }

  .duration-item {
    font-size: 13px;
  }

  .course-description {
    font-size: 14px;
  }

  .details-learn h3 {
    font-size: 16px;
  }

  .learn-list li {
    font-size: 13px;
  }

  .include-tag {
    font-size: 12px;
    padding: 5px 12px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .course-card,
  .course-details,
  .book-btn-primary,
  .view-details-btn {
    transition: none;
  }

  .course-card:hover {
    transform: none;
  }
}

/* Focus styles for keyboard navigation */
.book-btn-primary:focus-visible,
.view-details-btn:focus-visible {
  outline: 3px solid #d4af37;
  outline-offset: 3px;
}

.course-card:focus-within {
  outline: 3px solid #d4af37;
  outline-offset: 3px;
}
