/* ============================================
   EduFlame — program.css (Semesters Page)
   Depends on: assets/style.css
   ============================================ */

/* ---- Nav back link ---- */
.nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.nav-back:hover { color: var(--accent); }
.nav-back svg { flex-shrink: 0; }

/* ---- Program Hero ---- */
.prog-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
  border-bottom: none;
}

.prog-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.16;
}
.prog-blob-1 { width: 360px; height: 360px; background: var(--accent); top: -120px; right: 40px; }
.prog-blob-2 { width: 220px; height: 220px; background: var(--teal);   bottom: -60px; left: -40px; }

.prog-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Program icon */
.prog-icon-wrap { flex-shrink: 0; }
.prog-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.1);
  color: #fff;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.prog-icon svg { width: 32px; height: 32px; }

/* Color variants */
.prog-icon.icon-blue   { background: rgba(29,78,216,0.25);   color: #93c5fd; border-color: rgba(29,78,216,0.35); }
.prog-icon.icon-teal   { background: rgba(15,118,110,0.25);  color: #5eead4; border-color: rgba(15,118,110,0.35); }
.prog-icon.icon-amber  { background: rgba(180,83,9,0.25);    color: #fcd34d; border-color: rgba(180,83,9,0.35); }
.prog-icon.icon-coral  { background: rgba(194,65,12,0.25);   color: #fca5a5; border-color: rgba(194,65,12,0.35); }
.prog-icon.icon-purple { background: rgba(124,58,237,0.25);  color: #c4b5fd; border-color: rgba(124,58,237,0.35); }
.prog-icon.icon-green  { background: rgba(21,128,61,0.25);   color: #86efac; border-color: rgba(21,128,61,0.35); }
.prog-icon.icon-gray   { background: rgba(75,85,99,0.25);    color: #d1d5db; border-color: rgba(75,85,99,0.35); }

/* Text */
.prog-hero-text { flex: 1; min-width: 0; }

.prog-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.9;
}

.prog-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 38px);
  line-height: 1.18;
  color: #fff;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
}

.prog-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  line-height: 1.7;
}

/* ---- Breadcrumb ---- */
.breadcrumb-wrap {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
}
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { color: var(--text-light); flex-shrink: 0; }
.breadcrumb span { color: var(--text); font-weight: 600; }

/* ---- Semester Grid ---- */
.sem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ---- Semester Card ---- */
.sem-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.32s ease both;
  text-decoration: none;
  color: inherit;
}
.sem-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  border-radius: 0 0 2px 2px;
}
.sem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(232,160,32,0.3);
}
.sem-card:hover::after { transform: scaleX(1); }

/* Semester number badge */
.sem-number {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.sem-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.sem-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.sem-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s, gap 0.2s;
}
.sem-card:hover .sem-arrow {
  color: var(--accent);
  gap: 8px;
}

/* ---- Skeleton ---- */
.sem-skeleton {
  height: 136px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: shimmer 1.6s infinite;
}

/* ---- Stagger animations ---- */
.sem-card:nth-child(1) { animation-delay: 0.04s; }
.sem-card:nth-child(2) { animation-delay: 0.08s; }
.sem-card:nth-child(3) { animation-delay: 0.12s; }
.sem-card:nth-child(4) { animation-delay: 0.16s; }
.sem-card:nth-child(5) { animation-delay: 0.20s; }
.sem-card:nth-child(6) { animation-delay: 0.24s; }
.sem-card:nth-child(7) { animation-delay: 0.28s; }
.sem-card:nth-child(8) { animation-delay: 0.32s; }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  .prog-hero-inner {
    padding: 36px 20px;
    gap: 18px;
  }
  .prog-icon {
    width: 62px;
    height: 62px;
    border-radius: 14px;
  }
  .prog-icon svg { width: 26px; height: 26px; }
  .breadcrumb-wrap { padding: 10px 20px; }
  .sem-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .prog-hero-inner {
    padding: 24px 16px;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  .prog-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
  }
  .prog-icon svg { width: 22px; height: 22px; }
  .prog-title {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .prog-desc {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .prog-eyebrow { margin-bottom: 4px; }
  .breadcrumb-wrap { padding: 8px 16px; }
  .sem-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .sem-card {
    padding: 16px 12px;
    gap: 8px;
  }
  .sem-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
    border-radius: 8px;
  }
  .sem-label { font-size: 13px; }
  .sem-sub   { font-size: 11.5px; }
  .sem-arrow { font-size: 10px; }
}