/* ============ ROOT & GENERAL STYLES ============ */
:root {
  --primary-color: #667eea;
  --primary-dark: #5568d3;
  --primary-light: #8b9ef8;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --success-color: #51cf66;
  --warning-color: #ffd93d;
  --danger-color: #ff6b6b;
  --dark-color: #2d3748;
  --light-color: #f7fafc;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  background-color: #ffffff;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ============ NAVBAR STYLES ============ */
.navbar {
  transition: var(--transition-smooth);
  background-color: #ffffff;
  padding: 1rem 0;
  border-bottom: 1px solid transparent;
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0  ;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-color);

}

.navbar-brand {
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text {
  font-size: 1.3rem;
}

/* Search Bar */
.search-container {
  width: 100%;
  max-width: 300px;
}

.search-container .input-group {
  border-radius: 50px;
  overflow: hidden;
  background-color: #f7fafc;
  border: 2px solid var(--border-color);
  transition: var(--transition-smooth);
}

.search-container .input-group:focus-within {
  background-color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container input::placeholder {
  color: var(--text-secondary);
}

.search-container .input-group-text {
  color: var(--text-secondary);
}

/* Navigation Links */
.nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--transition-smooth);
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Nav Icons */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-link {
  color: var(--text-primary);
  font-size: 1.3rem;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.icon-link:hover {
  color: var(--primary-color);
  transform: scale(1.15);
}

/* ============ HERO SECTION ============ */
.hero-section {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05),
    rgba(118, 75, 162, 0.05)
  );
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(118, 75, 162, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 500px;
}

.hero-section .btn {
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hero-section .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.hero-section .btn-outline-primary {
  border: 2px solid var(--primary-color);
}

.hero-section .btn-outline-primary:hover {
  transform: translateY(-3px);
  background-color: transparent;
  color: var(--primary-color);
}

/* Illustration */
.hero-illustration {
  position: relative;
  z-index: 2;
}

.illustration-box {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 20px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  box-shadow: var(--shadow-lg);
}

.illustration-box svg {
  width: 100%;
  max-width: 350px;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* ============ COURSES SECTION ============ */
.courses-section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ============ SIDEBAR FILTER ============ */
.sidebar-filter {
  padding: 30px;
  border-radius: 20px;
  position: sticky;
  top: 100px;
  height: fit-content;
  transition: var(--transition-smooth);
}

/* Glassmorphism Effect */
.glass-morphism {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.sidebar-filter:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
}

.sidebar-title {
  color: var(--dark-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.filter-group {
  padding-bottom: 20px;
}

.filter-label {
  font-weight: 700;
  color: var(--dark-color);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.filter-group .form-check {
  margin-bottom: 0.8rem;
}

.filter-group .form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-group .form-check-input:hover {
  border-color: var(--primary-color);
}

.filter-group .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.filter-group .form-check-label {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
  margin-left: 8px;
  transition: var(--transition-smooth);
}

.filter-group .form-check-label:hover {
  color: var(--primary-color);
}

/* ============ COURSE CARD ============ */
.course-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-md);
  background-color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.course-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
  background-color: #f0f0f0;
}

.course-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.badge-hot {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, var(--danger-color), #ff5252);
  color: white;
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.course-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

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

.course-overlay button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: var(--transition-bounce);
  cursor: pointer;
}

.course-overlay button:hover {
  transform: scale(1.2);
}

.course-overlay button.liked i {
  color: var(--danger-color);
}

.card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.category-badge {
  display: inline-block;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1)
  );
  color: var(--primary-color);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  width: fit-content;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 15px;
  line-height: 1.4;
  min-height: 50px;
}

.course-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.course-meta .text-warning {
  color: var(--warning-color) !important;
}

.card-body .btn {
  margin-top: 15px;
  padding: 10px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.card-body .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Course card animation on scroll */
.course-card {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}

.course-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ FEATURED SECTION ============ */
.featured-section {
  background-color: #f7fafc;
  padding: 80px 0;
}

.featured-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, var(--warning-color), #ffb700);
  color: white;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 217, 61, 0.4);
}

.featured-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.featured-card:hover .featured-image {
  transform: scale(1.08);
}

.featured-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.featured-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.featured-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 15px;
  flex-grow: 1;
}

.featured-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.featured-rating .stars {
  color: var(--warning-color);
  font-size: 0.9rem;
}

.featured-rating .rating-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.featured-card .btn {
  padding: 12px;
  font-weight: 600;
  margin-top: auto;
  transition: var(--transition-smooth);
}

.featured-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ============ CTA SECTION ============ */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-section .btn-light {
  background-color: white;
  color: var(--primary-color);
  font-weight: 700;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-light:hover {
  background-color: #f0f0f0;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  color: var(--primary-color);
}

/* ============ FOOTER ============ */
.footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 80px;
}

.footer-title {
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition-smooth);
  text-decoration: none;
  font-size: 1.2rem;
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.3);
}

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

/* Tablet */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .search-container {
    max-width: 250px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-section .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .d-flex.gap-3 {
    flex-direction: column;
  }

  .hero-illustration {
    margin-top: 3rem;
  }

  .illustration-box {
    min-height: 300px;
  }

  .search-container {
    max-width: 100%;
    margin: 1rem auto !important;
  }

  .nav-icons {
    gap: 0.5rem;
  }

  .nav-icons .btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }

  .sidebar-filter {
    position: static;
    margin-bottom: 3rem;
  }

  .courses-section .row {
    flex-direction: column;
  }

  .course-card {
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .featured-card {
    margin-bottom: 2rem;
  }

  .cta-title {
    font-size: 1.8rem;
  }

  .cta-subtitle {
    font-size: 1rem;
  }

  .footer .row {
    text-align: center;
  }

  .footer-bottom .col-md-6 {
    margin-bottom: 1rem;
  }

  .footer-bottom .col-md-6:last-child {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

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

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .card-title {
    font-size: 1rem;
  }

  .featured-title {
    font-size: 1.1rem;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .cta-subtitle {
    font-size: 0.9rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .brand-text {
    font-size: 1rem;
  }

  .icon-link {
    font-size: 1.1rem;
  }

  .nav-icons {
    gap: 0.3rem;
  }
}

/* ============ UTILITY ANIMATIONS ============ */

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============ BUTTON STYLES ============ */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--secondary-color)
  );
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  color: white;
}

.btn-primary:active {
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--secondary-color)
  );
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: var(--transition-smooth);
}

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

.btn-outline-secondary {
  color: var(--text-primary);
  border-color: var(--border-color);
  transition: var(--transition-smooth);
}

.btn-outline-secondary:hover {
  background-color: var(--light-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ============ SCROLL SMOOTH ============ */
html {
  scroll-behavior: smooth;
}

/* ============ SCROLLBAR STYLES ============ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}