/* ═══════════════════════════════════════════════════════
   KIF — Courses Page Styles
   ═══════════════════════════════════════════════════════ */

/* ── COURSE HERO ──────────────────────────────────── */
.course-hero {
  position: relative;
  padding: 10rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
  background: var(--ink-deep);
}

.course-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 40%, rgba(232, 97, 26, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 60%, rgba(75, 142, 240, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.course-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.course-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.course-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: 'DM Mono', monospace;
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.course-hero-kicker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.course-hero-kicker::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.course-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--frost);
  margin-bottom: 1.5rem;
}

.course-hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 55%, #B84A10 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.course-hero-sub {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--frost-faint);
  max-width: 540px;
  margin: 0 auto;
}

/* ── CATEGORY NAVIGATION (TABS) ──────────────────── */
.course-tabs {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--edge);
  padding: 0 2rem;
}

.course-tabs-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: .75rem 0;
}

.course-tabs-inner::-webkit-scrollbar {
  display: none;
}

.course-tab {
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--frost-faint);
  background: none;
  border: 1px solid transparent;
  padding: .5rem 1.25rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all .3s cubic-bezier(.16, 1, .3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.course-tab:hover {
  color: var(--frost);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--edge);
}

.course-tab.active {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: rgba(232, 97, 26, 0.25);
}

/* ── CATEGORY SECTION ─────────────────────────────── */
.course-category {
  padding: 6rem 2rem;
  position: relative;
}

.course-category:nth-child(even) {
  background: rgba(13, 17, 23, 0.4);
}

.course-category-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.course-category-header {
  margin-bottom: 3.5rem;
}

.course-category-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--edge-bright);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: var(--gold-dim);
  transition: all .3s;
}

.course-category-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gold);
}

.course-category-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--frost);
  margin-bottom: .75rem;
}

.course-category-title em {
  font-style: italic;
  color: var(--gold);
}

.course-category-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--frost-faint);
  max-width: 560px;
}

/* ── BRANCH GRID ──────────────────────────────────── */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── BRANCH CARD ──────────────────────────────────── */
.branch-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 6px;
  overflow: hidden;
  transition: all .4s cubic-bezier(.16, 1, .3, 1);
  position: relative;
}

.branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}

.branch-card:hover {
  border-color: rgba(232, 97, 26, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(232, 97, 26, 0.1);
}

.branch-card:hover::before {
  transform: scaleX(1);
}

.branch-card-header {
  padding: 1.75rem 1.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--edge);
}

.branch-icon {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--edge-bright);
  transition: all .3s;
}

.branch-card:hover .branch-icon {
  background: var(--gold-dim);
  border-color: rgba(232, 97, 26, 0.3);
}

.branch-icon svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.branch-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--frost);
  line-height: 1.3;
}

/* ── YEAR MODULES ─────────────────────────────────── */
.year-modules {
  padding: .75rem 0;
}

.year-module {
  padding: 1rem 1.75rem;
  position: relative;
  transition: background .3s;
}

.year-module:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.year-module:hover {
  background: rgba(232, 97, 26, 0.03);
}

.year-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

.year-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(232, 97, 26, 0.5);
}

.year-course-name {
  font-size: .92rem;
  font-weight: 500;
  color: var(--frost-dim);
  line-height: 1.5;
}

/* ── BRANCH CARD FOOTER ──────────────────────────── */
.branch-card-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.branch-course-count {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--frost-faint);
  text-transform: uppercase;
}

.branch-learn-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: all .3s;
}

.branch-learn-more:hover {
  color: var(--gold-bright);
  gap: .6rem;
}

.branch-learn-more svg {
  width: 12px;
  height: 12px;
  transition: transform .3s;
}

.branch-card:hover .branch-learn-more svg {
  transform: translateX(3px);
}

/* ── CTA BOTTOM SECTION ──────────────────────────── */
.course-cta {
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.course-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--surface);
}

.course-cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(232, 97, 26, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.course-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.course-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--frost);
  margin-bottom: 1.25rem;
}

.course-cta h2 em {
  font-style: italic;
  color: var(--gold);
}

.course-cta-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--frost-faint);
  margin-bottom: 2.5rem;
}

/* ── RESPONSIVE COURSE GRID ──────────────────────── */
@media (max-width: 1024px) {
  .branch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .branch-grid {
    grid-template-columns: 1fr;
  }

  .course-hero {
    padding: 8rem 1.5rem 3.5rem;
  }

  .course-category {
    padding: 4rem 1.5rem;
  }

  .course-tabs-inner {
    gap: .15rem;
  }

  .course-tab {
    font-size: .68rem;
    padding: .4rem .9rem;
  }
}

@media (max-width: 480px) {
  .course-hero h1 {
    font-size: 2.2rem;
  }

  .course-category-title {
    font-size: 1.7rem;
  }
}

/* ── NAV DROPDOWN STYLES ──────────────────────────── */
.nav-dropdown-wrap {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: -14px;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 680px;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(232, 97, 26, 0.08);
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all .35s cubic-bezier(.16, 1, .3, 1);
  z-index: 200;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  pointer-events: none;
}

.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(14px);
  pointer-events: auto;
}

.nav-dropdown-column {
  padding: 0 1rem;
  border-right: 1px solid var(--edge);
}

.nav-dropdown-column:last-child {
  border-right: none;
}

.nav-dropdown-heading {
  font-family: 'DM Mono', monospace;
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(232, 97, 26, 0.15);
}

.nav-dropdown-item {
  display: block;
  padding: .4rem .6rem;
  font-size: .75rem;
  font-weight: 400;
  color: var(--frost-dim);
  text-decoration: none;
  border-radius: 4px;
  transition: all .25s;
  margin-bottom: .1rem;
}

.nav-dropdown-item:hover {
  background: var(--gold-dim);
  color: var(--gold);
  padding-left: .9rem;
}

/* ── MOBILE DROPDOWN ──────────────────────────────── */
.mobile-courses-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--frost-dim);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .08em;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.mobile-courses-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .3s;
  color: var(--frost-faint);
}

.mobile-courses-toggle.open svg {
  transform: rotate(180deg);
  color: var(--gold);
}

.mobile-courses-toggle:hover,
.mobile-courses-toggle.open {
  color: var(--gold);
}

.mobile-courses-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.16, 1, .3, 1);
  padding-left: 1rem;
}

.mobile-courses-submenu.open {
  max-height: 800px;
}

.mobile-submenu-heading {
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: .75rem;
  margin-bottom: .35rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid rgba(232, 97, 26, 0.12);
}

.mobile-submenu-item {
  display: block;
  font-size: .8rem;
  color: var(--frost-faint) !important;
  padding: .3rem 0;
  transition: color .2s;
}

.mobile-submenu-item:hover {
  color: var(--gold) !important;
}
