/* Custom Properties for easy theming */
:root {
  --primary-dark: #1e1b4b;
  --primary: #312e81;
  --primary-light: #4338ca;
  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --bg-light: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Base Styles */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

/* Navbar */
.navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background-color: var(--white) !important;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary) !important;
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent) !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-section .carousel,
.hero-section .carousel-inner {
  width: 100%;
}

.carousel-item {
  height: 100vh;
  min-height: 600px;
}

.carousel-item picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(49, 46, 129, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Buttons */
.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-light {
  border-width: 2px;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background-color: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Cards */
.feature-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  height: 100%;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 2rem;
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Course Cards */
.course-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.course-banner {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 4rem;
}

.course-body {
  padding: 1.5rem;
}

.course-category {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.course-card h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.course-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.course-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.course-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Testimonials */
.testimonial-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.testimonial-rating {
  color: #fbbf24;
  margin-bottom: 1rem;
}

.testimonial-text {
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
}

.testimonial-info h4 {
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.testimonial-info p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* About Section */
.about-section {
  background: var(--white);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 992px) {
  .about-content {
    flex-direction: row;
    align-items: center;
  }
}

.about-text {
  flex: 1;
}

.about-text h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-image {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 1rem;
  padding: 3rem;
  color: var(--white);
  text-align: center;
}

.about-image h3 {
  margin-bottom: 1.5rem;
}

.about-mission-list {
  text-align: left;
  margin-top: 2rem;
}

.about-mission-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.about-mission-list li::before {
  content: "•";
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}

.about-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.about-portrait {
  flex: 0 0 auto;
}

.about-portrait img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

@media (max-width: 991.98px) {
  .about-portrait img {
    max-width: 220px;
  }
}

/* Delivery Mode Cards */
.delivery-card {
  overflow: hidden;
}

.delivery-img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.92) 0%, rgba(67, 56, 202, 0.85) 100%),
    url('../assets/img/cta/cta-background.webp') center / cover no-repeat;
  color: var(--white);
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-section p {
  opacity: 0.95;
  margin-bottom: 2rem;
  font-size: 1.25rem;
}

.btn-light {
  background-color: var(--white);
  color: var(--primary);
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-light:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Contact Form */
.contact-section {
  background: var(--bg-light);
}

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

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-control {
  border: 2px solid #e2e8f0;
  padding: 0.75rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-brand {
  margin-bottom: 2rem;
}

.footer-brand h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  opacity: 0.8;
  margin-bottom: 0;
}

.footer-links h5 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--white);
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Scroll Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  section {
    padding: 3rem 0;
  }
}

/* ============================================================
   Course Detail Pages
   ============================================================ */

/* Keep the fixed navbar readable over the light course pages */
.course-page #mainNav {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Breadcrumb (sits below the fixed navbar) */
.course-breadcrumb {
  background: var(--bg-light);
  padding: 6rem 0 1rem;
}

.course-breadcrumb .breadcrumb {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.course-breadcrumb a {
  color: var(--primary-light);
  text-decoration: none;
}

.course-breadcrumb a:hover {
  text-decoration: underline;
}

/* Compact course hero */
.course-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 3rem 0;
}

.course-hero .track-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.course-hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.course-hero .course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
  opacity: 0.95;
}

.course-hero .course-hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.course-hero .hero-cta .btn {
  margin: 0.25rem 0.5rem 0.25rem 0;
}

/* Course hero two-column grid */
.course-hero-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2.5rem;
}

.course-hero-content {
  flex: 1 1 0%;
  min-width: 0;
}

.course-hero-image {
  flex: 0 0 260px;
  max-width: 260px;
}

.course-hero-image img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Generic content section heading for course pages */
.course-section h2 {
  color: var(--primary);
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
}

.course-section h2.with-rule {
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.4rem;
}

/* Who is this for / prerequisites lists */
.audience-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.audience-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.audience-list li::before {
  content: "\F26E"; /* bi-check-circle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Recommended path */
.path-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.path-chip {
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  flex: 1 1 240px;
}

.path-chip .path-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.path-chip a {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
}

.path-chip a:hover {
  text-decoration: underline;
}

/* Learning Path level cards */
.level-card {
  background: var(--white);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--accent);
  padding: 2rem;
  height: 100%;
}

.level-card .level-name {
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.level-card .level-duration {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.level-card .outcomes {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.level-card .outcomes li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

.level-card .outcomes li::before {
  content: "\F133"; /* bi-chevron-right */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 0.15rem;
}

.level-card .level-end {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  font-style: italic;
  color: var(--text-dark);
  font-size: 0.95rem;
}

/* What you'll receive */
.receive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.receive-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.receive-list i {
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1.4;
}

/* Instructor strip */
.instructor-strip {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  border-radius: 1rem;
  padding: 2.5rem;
}

.instructor-strip h3 {
  margin-bottom: 1rem;
}

.instructor-strip p {
  opacity: 0.95;
  margin-bottom: 0;
}

/* Related course cards reuse .course-card; add link reset */
.related-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* Catalog (courses.html) listing page */
.catalog-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 7rem 0 3rem;
  text-align: center;
}

.catalog-hero h1 {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.catalog-hero p {
  opacity: 0.95;
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto;
}

.course-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  border: 2px solid #e2e8f0;
  background: var(--white);
  color: var(--text-dark);
  border-radius: 2rem;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* CTA band on course pages */
.course-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
}

.course-cta h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.course-cta .btn {
  margin: 0.25rem;
}

@media (max-width: 768px) {
  .course-hero {
    padding: 2rem 0;
  }

  .course-hero h1 {
    font-size: 1.85rem;
  }

  .course-hero-meta {
    gap: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .course-hero .hero-cta .btn {
    display: block;
    width: 100%;
    margin: 0.4rem 0 0;
  }

  .course-hero-image {
    display: none;
  }

  .course-breadcrumb {
    padding: 5.5rem 0 0.75rem;
  }

  .catalog-hero {
    padding: 5.5rem 0 2.5rem;
  }

  .catalog-hero h1 {
    font-size: 1.85rem;
  }

  .catalog-hero p {
    font-size: 1rem;
  }

  .course-section h2 {
    font-size: 1.6rem;
  }

  .level-card,
  .instructor-strip {
    padding: 1.5rem;
  }

  .course-cta .btn {
    display: block;
    width: 100%;
    margin: 0.4rem 0 0;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
