/* ==========================================================================
   Simple Course Lines & Video Carousel Stylesheet - FreightWaves / Built In Style
   ========================================================================== */

.course-simple-page {
  background-color: #ffffff;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Page Header */
.course-page-top {
  padding-top: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 28px;
}

.course-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.course-main-heading {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}

.course-sub-heading {
  font-size: 14.5px;
  color: #64748b;
  margin: 0;
}

.course-quick-search {
  position: relative;
  width: 100%;
  max-width: 340px;
}

.course-quick-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.course-quick-search input:focus {
  border-color: #244fe7;
  box-shadow: 0 0 0 3px rgba(36, 79, 231, 0.15);
}

.course-quick-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
}

/* Course Line Section */
.course-line-section {
  margin-bottom: 38px;
  position: relative;
}

.course-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.course-line-title {
  font-size: 22px;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.course-nav-btn.prev-btn {
  background: #bfdbfe;
  color: #1e40af;
}

.course-nav-btn.prev-btn:hover {
  background: #93c5fd;
  transform: scale(1.05);
}

.course-nav-btn.next-btn {
  background: #1e40af;
  color: #ffffff;
}

.course-nav-btn.next-btn:hover {
  background: #1e3a8a;
  transform: scale(1.05);
}

/* Horizontal Scroll Carousel Row */
.course-line-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.course-line-row::-webkit-scrollbar {
  display: none;
}

/* Simple Video Lesson Card */
.course-simple-card {
  flex: 0 0 calc(20% - 15px);
  min-width: 225px;
  max-width: 255px;
  scroll-snap-align: start;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.course-simple-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 10px;
}

.course-simple-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.course-simple-card:hover .course-simple-thumb img {
  transform: scale(1.04);
}

/* Centered circular play button (hidden on cards; duration badge indicates playable video) */
.course-center-play {
  display: none;
}

/* Top-right share icon button */
.course-share-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.course-share-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.1);
}

/* Duration / Badge pill on thumbnail */
.course-thumb-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Card Body Typography */
.course-simple-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-simple-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.course-simple-card:hover .course-simple-title {
  color: #1e40af;
}

.course-simple-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.course-simple-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-read-more {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e40af;
  text-decoration: none;
  display: inline-block;
  margin-top: auto;
}

.course-read-more:hover {
  text-decoration: underline;
}

/* Scroll indicator track at bottom of line */
.course-scroll-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.course-scroll-track {
  height: 5px;
  background: #e2e8f0;
  border-radius: 4px;
  width: 100px;
  position: relative;
  overflow: hidden;
}

.course-scroll-thumb {
  height: 100%;
  width: 40px;
  background: #94a3b8;
  border-radius: 4px;
  position: absolute;
  left: 0;
  transition: left 0.15s ease;
}

.course-arrow-icon {
  font-size: 9px;
  color: #94a3b8;
}

/* Interactive Modal */
.course-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.course-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.course-modal-dialog {
  background: #0f172a;
  color: #ffffff;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.course-modal-backdrop.active .course-modal-dialog {
  transform: translateY(0);
}

.course-modal-header {
  padding: 12px 20px;
  background: #090e1f;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-modal-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.course-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}

.course-modal-close:hover {
  color: #ffffff;
}

.course-modal-body {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.course-player-side {
  padding: 20px;
  overflow-y: auto;
  background: #0a0f24;
}

.course-screen-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.course-screen-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-screen-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 40%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}

.course-screen-play-btn {
  align-self: center;
  width: 64px;
  height: 48px;
  background: #ff0000;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  box-shadow: 0 4px 18px rgba(255, 0, 0, 0.5);
  cursor: pointer;
}

.course-screen-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-screen-scrubber {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.course-screen-fill {
  height: 100%;
  width: 30%;
  background: #ff0000;
  border-radius: 3px;
}

.course-screen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.course-playlist-side {
  background: #0f172a;
  border-left: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.course-playlist-header {
  padding: 14px 16px;
  background: #131b33;
  border-bottom: 1px solid #1e293b;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.course-playlist-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.course-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}

.course-playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.course-playlist-item.active {
  background: rgba(36, 79, 231, 0.15);
  border-left-color: #244fe7;
}

.course-item-thumb {
  width: 58px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #1e293b;
  flex-shrink: 0;
}

.course-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-item-title {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-item-duration {
  font-size: 11px;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 1100px) {
  .course-simple-card {
    flex: 0 0 calc(33.333% - 12px);
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .course-simple-card {
    flex: 0 0 calc(50% - 10px);
    min-width: 180px;
  }
  .course-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .course-playlist-side {
    border-left: none;
    border-top: 1px solid #1e293b;
    max-height: 280px;
  }
}
