/* ==========================================================================
   EduLearn - Platform Kursus Online
   Custom CSS Stylesheet (UAS Pemrograman Web I)

   Kelas : IF210 - PJJ Informatika, Universitas Siber Asia
   Dosen : Riad Sahara, S.SI., M.T.

   Anggota Kelompok:
   1. M. Nuridin             (250401010526)
   2. M. Fikram Faiq Fadhil  (250401010519)
   3. Miranti                (250401010494)
   4. Adam Suchi Hafizullah  (250401010513)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & DESIGN SYSTEM
   -------------------------------------------------------------------------- */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --dark: #172033;
  --light: #f8fafc;
  --muted: #64748b;
  --white: #ffffff;
  --border-color: #e2e8f0;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

/* --------------------------------------------------------------------------
   2. GLOBAL & TYPOGRAPHY STYLES
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

/* High Contrast Focus States for Accessibility */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

mark {
  background-color: #fef08a;
  color: var(--dark);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. NAVBAR STYLING
   -------------------------------------------------------------------------- */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.navbar.navbar-scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.6rem 0;
  background-color: #ffffff;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  font-size: 1.6rem;
  color: var(--primary);
}

.nav-link {
  font-weight: 500;
  color: var(--dark) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   4. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-search-box {
  background: var(--white);
  padding: 0.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.hero-search-box .form-control {
  border: none;
  box-shadow: none;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.hero-search-box .btn {
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
}

.hero-img-wrapper {
  position: relative;
  text-align: center;
}

.hero-img-wrapper img {
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  width: 100%;
  max-height: 420px;
}

/* --------------------------------------------------------------------------
   5. STATISTIK SECTION
   -------------------------------------------------------------------------- */
.stats-section {
  background-color: var(--white);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   6. CARDS & CATEGORIES
   -------------------------------------------------------------------------- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.category-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

/* Team Card (Halaman Tentang) */
.team-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem 1.25rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.team-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.team-nim {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Course Card */
.course-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.3);
}

.course-card-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.course-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-card-img-wrapper img {
  transform: scale(1.05);
}

.badge-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(23, 32, 51, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.course-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.course-rating {
  color: var(--accent);
  font-weight: 600;
}

.course-instructor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  padding-top: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   7. TESTIMONIAL & FAQ
   -------------------------------------------------------------------------- */
.testimonial-section {
  background-color: #f1f5f9;
  padding: 5rem 0;
}

.testimonial-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: #334155;
  margin-bottom: 1.5rem;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 12px !important;
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-button {
  font-weight: 600;
  color: var(--dark);
  padding: 1.25rem;
  background-color: var(--white);
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   8. MEDIA PLAYERS (VIDEO & AUDIO)
   -------------------------------------------------------------------------- */
.media-container {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.video-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background-color: #000;
}

/* Pembungkus iframe YouTube agar responsif 16:9 */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background-color: #000;
  box-shadow: var(--shadow-md);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Pengganti iframe saat halaman dibuka lewat file:// */
.video-embed-fallback {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background-color: #0f172a;
  text-decoration: none;
}

.video-embed-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: var(--transition);
}

.video-embed-fallback:hover img {
  opacity: 0.95;
  transform: scale(1.03);
}

.video-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #ff0000;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.video-embed-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  background-color: rgba(15, 23, 42, 0.75);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  white-space: nowrap;
}

/* Kartu rekaman kelas sinkron dosen pengampu */
.lecture-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lecture-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.lecture-card .video-embed {
  border-radius: 0;
  box-shadow: none;
}

.lecture-card-body {
  padding: 0.9rem 1rem 1rem;
}

.lecture-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.video-wrapper video {
  width: 100%;
  display: block;
  max-height: 450px;
  border-radius: 10px;
}

.audio-wrapper {
  background: #f1f5f9;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.audio-wrapper audio {
  width: 100%;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   9. TABLES & FORMS
   -------------------------------------------------------------------------- */
.table-responsive {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: var(--dark);
  color: var(--white);
  font-weight: 600;
  padding: 1rem;
  border: none;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.form-control,
.form-select {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.invalid-feedback {
  font-size: 0.85rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   10. FOOTER & BACK TO TOP
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--dark);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer h5 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer a {
  color: #94a3b8;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.btn-back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.btn-back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   11. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 3.5rem 0 3rem;
    text-align: center;
  }

  .hero-search-box {
    margin: 0 auto;
  }

  .hero-img-wrapper {
    margin-top: 2.5rem;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-search-box {
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 16px;
    gap: 0.5rem;
  }

  .hero-search-box .btn {
    width: 100%;
    border-radius: 8px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   12. MULTI-STEP REGISTRATION WIZARD
   -------------------------------------------------------------------------- */
.stepper-wrapper {
  padding: 0 2rem;
}

.step-item {
  position: relative;
  z-index: 1;
  opacity: 0.6;
  transition: var(--transition);
}

.step-item.active {
  opacity: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: var(--transition);
  border: 2px solid transparent;
}

.step-item.active .step-circle {
  background-color: var(--white);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.step-item.completed .step-circle {
  background-color: var(--accent);
  color: var(--white);
}

.form-step {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Radio Cards */
.schedule-radio:checked+label {
  background-color: var(--primary-light);
  border-color: var(--primary) !important;
}

.schedule-radio:checked+label .check-icon {
  display: block !important;
  color: var(--primary);
}