:root {
  --bg-dark: #0b0c10;
  --bg-card: #15171c;
  --text-main: #ffffff;
  --text-muted: #b5b5b5;
  --purple: #7f5cff;
  --purple-glow: radial-gradient(circle at top, #7f5cff55, transparent 60%);
  --green: #2ecc71;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
}

/* ---------- GLOBAL ---------- */
section {
  padding: 80px 20px;
}

#courses {
  padding-top: 40px;
  background: linear-gradient(180deg, rgba(11, 12, 16, 0.3) 0%, var(--bg-dark) 30%);
}

.container {
  max-width: 1100px;
  margin: auto;
}

h1, h2, h3 {
  font-weight: 600;
}

p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(180deg, rgba(11, 12, 16, 0.8) 0%, rgba(11, 12, 16, 0.95) 100%);
  text-align: center;
  padding: 120px 20px 80px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(127, 92, 255, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(127, 92, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, rgba(157, 127, 255, 0.3) 0%, transparent 60%);
  animation: purpleGradientShift 8s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(127, 92, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes purpleGradientShift {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.5);
  }
  50% {
    transform:  scale(1.8);
  }
  75% {
    transform: scale(2);
  }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 20px;
  animation: fadeInDown 0.8s ease-out;
}

.hero span.gradient-text {
  background: linear-gradient(90deg, #7f5cff, #9d7fff, #7f5cff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease infinite;
  display: inline-block;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero p {
  max-width: 720px;
  margin: auto;
  margin-bottom: 35px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-primary {
  background: linear-gradient(135deg, #7f5cff, #5a3cff);
  padding: 15px 40px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 30px;
  display: inline-block;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  box-shadow: 0 4px 20px rgba(127, 92, 255, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s ease;
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 30px rgba(127, 92, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary:hover::before {
  left: 100%;
}

/* ---------- SECTION TITLE ---------- */
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 15px;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: auto;
  margin-bottom: 60px;
}

/* ---------- COURSES ---------- */
.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  border: 2px solid rgba(127, 92, 255, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: cardGlow 3s ease-in-out infinite;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(127, 92, 255, 0.1), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  border-color: var(--purple);
  transform: translateY(-8px);
  box-shadow: 0 10px 40px rgba(127, 92, 255, 0.25);
}

.card:hover::before {
  opacity: 1;
}

@keyframes cardGlow {
  0%, 100% {
    border-color: rgba(127, 92, 255, 0.3);
    box-shadow: 0 0 15px rgba(127, 92, 255, 0.1);
  }
  50% {
    border-color: rgba(127, 92, 255, 0.6);
    box-shadow: 0 0 25px rgba(127, 92, 255, 0.2);
  }
}

@keyframes headingGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.course-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple), #9d7fff);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card h3 {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff, #e6d5ff, #ffffff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
  letter-spacing: 0.8px;
  margin-top: 0;
  animation: headingGradient 3s ease infinite;
}

.card-info {
  background: rgba(127, 92, 255, 0.1);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 25px;
}

.card-info p {
  margin-bottom: 8px;
  font-size: 14px;
}

.card-info p:last-child {
  margin-bottom: 0;
}

.dropdowns-container {
  margin-bottom: 25px;
}

.dropdown-item {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(127, 92, 255, 0.3);
}

.dropdown-btn {
  width: 100%;
  padding: 16px;
  background: rgba(127, 92, 255, 0.2);
  color: var(--text-main);
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.dropdown-btn:hover {
  background: rgba(127, 92, 255, 0.3);
}

.dropdown-btn.active {
  background: var(--purple);
  color: white;
}

.dropdown-btn::after {
  content: '▼';
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--purple);
}

.dropdown-btn.active::after {
  transform: rotate(-180deg);
  color: white;
}

.dropdown-content {
  display: none;
  padding: 20px 16px;
  background: rgba(127, 92, 255, 0.08);
  border-top: 1px solid rgba(127, 92, 255, 0.2);
  animation: slideDown 0.3s ease;
}

.dropdown-content.active {
  display: block;
}

.dropdown-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.btn-success {
  display: inline-block;
  margin-top: 20px;
  background: linear-gradient(135deg, var(--green), #27a860);
  padding: 14px 35px;
  border-radius: 25px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--green);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: 1;
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 204, 113, 0.5);
  background: linear-gradient(135deg, #27a860, #1f8c4f);
}

.btn-success:hover::before {
  left: 100%;
}

.btn-success:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

/* Projects button in course cards */
.projects-button-container {
  margin: 20px 0;
}

.btn-projects {
  display: inline-block;
  background: rgba(127, 92, 255, 0.15);
  padding: 12px 24px;
  border-radius: 22px;
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(127, 92, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-projects:hover {
  background: rgba(127, 92, 255, 0.25);
  border-color: var(--purple);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(127, 92, 255, 0.2);
}

/* New apply buttons: WhatsApp + Call */
.apply-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-whatsapp {
  display: inline-block;
  background: linear-gradient(135deg, #25D366, #1DA851);
  padding: 12px 28px;
  border-radius: 22px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid rgba(37, 211, 102, 0.15);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.25);
}

/* Override btn-primary styling when combined with btn-whatsapp */
.btn-primary.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #1DA851);
  padding: 15px 40px;
  border: 2px solid transparent;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.btn-primary.btn-whatsapp:hover {
  background: linear-gradient(135deg, #1DA851, #128C45);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
  transform: translateY(-4px) scale(1.05);
}

.btn-call {
  /* display: inline-block; */
  background: transparent;
  padding: 12px 22px;
  border-radius: 22px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  /* font-size: 14px; */
  border: 2px solid rgba(127, 92, 255, 0.25);
  display: flex;
  align-items: center;
}

.btn-call:hover {
  transform: translateY(-3px);
  border-color: var(--purple);
}

/* Icon alignment inside buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.btn-whatsapp .btn-icon svg {
  display: block;
}

.btn-call .btn-icon svg {
  display: block;
}

/* ---------- STUDENT LEARNINGS ---------- */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

.learning-card {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 16px;
  transition: transform .3s ease;
  text-align: center;
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}


.learning-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(45deg, #7f5cff, #9d7fff, #593cff, #7f5cff);
  background-size: 300% 300%;
  animation: borderRotate 4s linear infinite;
  z-index: -1;
}

@keyframes borderRotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
} 

.learning-card img {
  height: 80px;
  width: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.learning-card i {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
  position: relative;
  z-index: 1;
}

/* .learning-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(127, 92, 255, 0.3);
} */

.learning-card h3 {
  margin-bottom: 10px;
  color: var(--purple);
  position: relative;
  z-index: 1;
}

.learning-card p {
  position: relative;
  z-index: 1;
}

/* ---------- INSTRUCTOR ---------- */
.instructor-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.instructor-text {
  flex: 2;
}

.instructor-text h3 {
  margin-bottom: 15px;
}

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

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.portfolio-btn {
  background: var(--purple);
  color: white;
}

.portfolio-btn:hover {
  background: transparent;
  border-color: var(--purple);
  color: var(--purple);
  transform: translateY(-3px);
}

.linkedin-btn {
  background: #0A66C2;
  color: white;
}

.linkedin-btn:hover {
  background: transparent;
  border-color: #0A66C2;
  color: #0A66C2;
  transform: translateY(-3px);
}

.instructor-image {
  flex: 1;
  text-align: center;
}

.instructor-image img {
  max-width: 100%;
  border-radius: 18px;
}

/* ---------- PROJECTS PAGE ---------- */
.navbar {
  background: var(--bg-dark);
  padding: 20px;
  border-bottom: 1px solid rgba(127, 92, 255, 0.2);
}

.nav-logo {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: #9d7fff;
}

.projects-hero {
  padding: 100px 20px 80px 20px;
}

.projects-section {
  padding: 80px 20px;
  background: linear-gradient(180deg, rgba(11, 12, 16, 0.3) 0%, var(--bg-dark) 30%);
}

.project-level {
  margin-bottom: 80px;
}

.project-level:last-child {
  margin-bottom: 0;
}

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

.level-header h2 {
  font-size: 32px;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #ffffff, #e6d5ff, #ffffff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: headingGradient 3s ease infinite;
}

.level-header p {
  font-size: 16px;
  max-width: 600px;
  color: var(--text-muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.project-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 25px;
  border: 2px solid rgba(127, 92, 255, 0.3);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(127, 92, 255, 0.1), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  border-color: var(--purple);
  transform: translateY(-8px);
  box-shadow: 0 10px 40px rgba(127, 92, 255, 0.25);
}

.project-card:hover::before {
  opacity: 1;
}

.project-image {
  width: 100%;
  height: 150px;
  background: rgba(127, 92, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(127, 92, 255, 0.2);
}

.project-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.image-placeholder {
  font-size: 64px;
}

.project-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  animation: none;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.project-description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-block;
  background: rgba(127, 92, 255, 0.2);
  color: var(--purple);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(127, 92, 255, 0.3);
  transition: all 0.3s ease;
}

.project-card:hover .tag {
  background: rgba(127, 92, 255, 0.3);
  border-color: var(--purple);
}

/* ---------- CONVERSION SECTION ---------- */
.conversion-section {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(127, 92, 255, 0.1) 0%, rgba(11, 12, 16, 0.5) 100%);
}

.conversion-section h2 {
  font-size: 36px;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.conversion-section p {
  font-size: 16px;
  max-width: 600px;
  margin: auto;
  margin-bottom: 40px;
  color: var(--text-muted);
}

.conversion-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  padding: 15px 40px;
  border-radius: 30px;
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--purple);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--purple);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(127, 92, 255, 0.4);
}

/* ---------- FOOTER ---------- */
footer {
  background: #0f1014;
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- MODAL SYSTEM ---------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  display: block;
  opacity: 1;
}

.project-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-card);
  border-radius: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  border: 2px solid rgba(127, 92, 255, 0.3);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(127, 92, 255, 0.3);
}

.project-modal.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Smooth scroll for modal */
.project-modal::-webkit-scrollbar {
  width: 8px;
}

.project-modal::-webkit-scrollbar-track {
  background: rgba(127, 92, 255, 0.1);
  border-radius: 10px;
}

.project-modal::-webkit-scrollbar-thumb {
  background: rgba(127, 92, 255, 0.4);
  border-radius: 10px;
}

.project-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(127, 92, 255, 0.6);
}

.modal-content {
  padding: 40px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(127, 92, 255, 0.2);
  padding-bottom: 20px;
}

.modal-title-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.modal-title-wrapper h2 {
  margin: 0;
  font-size: 26px;
  background: linear-gradient(90deg, #ffffff, #e6d5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.difficulty-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.difficulty-badge.beginner {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.difficulty-badge.intermediate {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

.difficulty-badge.advanced {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.modal-close {
  background: none;
  border: none;
  color: var(--purple);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close:hover {
  color: #9d7fff;
  transform: rotate(90deg);
}

.modal-close:focus {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

.modal-preview {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(127, 92, 255, 0.08);
  border: 1px solid rgba(127, 92, 255, 0.2);
  /* padding: 20px; */
}

.modal-preview img{
  width: 100%;
  height: auto;
  display: block;
}

.modal-preview-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-size: 100px;
}

.terminal-preview {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  color: #2ecc71;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.terminal-preview::before {
  content: '$ ';
  color: #2ecc71;
}

.modal-section {
  margin-bottom: 25px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section h3::before {
  content: '→';
  color: var(--purple);
}

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

.learning-outcomes li {
  padding: 10px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.learning-outcomes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-badge {
  display: inline-block;
  background: rgba(127, 92, 255, 0.15);
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(127, 92, 255, 0.3);
  transition: all 0.2s ease;
}

.tool-badge:hover {
  background: rgba(127, 92, 255, 0.25);
  border-color: var(--purple);
}

/* ---------- IMAGE LOADING SPINNER ---------- */
.image-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(127, 92, 255, 0.2);
  border-top: 3px solid var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.image-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ---------- MODAL IMAGE LOADING ---------- */
#modal-image-loader {
  display: none;
}

#modal-image-loader.visible {
  display: block;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ---------- MODAL RESPONSIVE ---------- */
@media (max-width: 768px) {
  .project-modal {
    max-width: 95%;
    max-height: 90vh;
    width: 95%;
  }

  .modal-content {
    padding: 24px;
  }

  .modal-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .modal-title-wrapper h2 {
    font-size: 20px;
  }

  .modal-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .difficulty-badge {
    margin-top: 8px;
  }

  .modal-close {
    margin-top: -8px;
  }

  .modal-preview-content {
    min-height: 150px;
    font-size: 60px;
  }

  .terminal-preview {
    font-size: 12px;
    padding: 12px;
  }

  .modal-section h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .learning-outcomes li {
    font-size: 13px;
    padding: 8px 0;
    padding-left: 24px;
  }

  .tool-badge {
    font-size: 11px;
    padding: 5px 10px;
  }
}


@media (max-width: 768px) {
  section {
    padding: 60px 16px;
  }

  .instructor-card {
    flex-direction: column-reverse;
    text-align: center;
  }

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

  .hero {
    padding: 90px 16px;
  }

  .card {
    padding: 20px;
    margin-bottom: 25px;
  }

  .card h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .course-badge {
    font-size: 11px;
    padding: 5px 12px;
    margin-bottom: 10px;
  }

  .card-info {
    padding: 12px;
    margin-bottom: 15px;
  }

  .dropdown-btn {
    padding: 14px 12px;
    font-size: 14px;
  }

  .dropdown-content {
    padding: 15px 12px;
  }

  .btn-success {
    width: 100%;
    text-align: center;
    margin-top: 15px;
    padding: 16px 20px;
  }

  /* Projects Mobile */
  .level-header h2 {
    font-size: 24px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  .project-card {
    padding: 20px;
  }

  .project-image {
    height: 120px;
    margin-bottom: 16px;
  }

  .image-placeholder {
    font-size: 48px;
  }

  .project-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .conversion-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .conversion-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 14px 24px;
  }

  .projects-hero {
    padding: 80px 16px 60px 16px;
  }

  .projects-section {
    padding: 60px 16px;
  }

  .conversion-section {
    padding: 60px 16px;
  }
}