/* ============================================================
   ClassicNovaCodes – Global Stylesheet
   Theme: White & Light Blue | Fonts: Syne + DM Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── CSS Variables ── */
:root {
  --navy:    #0b1f3a;
  --blue:    #1565c0;
  --mid:     #1976d2;
  --sky:     #42a5f5;
  --pale:    #90caf9;
  --ice:     #e3f2fd;
  --white:   #ffffff;
  --off:     #f5f9ff;
  --muted:   #607d8b;
  --accent:  #00b0ff;
  --gold:    #ffd740;
  --grad:    linear-gradient(135deg, #0d47a1 0%, #1565c0 45%, #42a5f5 100%);
  --grad-r:  linear-gradient(135deg, #42a5f5 0%, #1565c0 100%);
  --shadow:  0 8px 32px rgba(21, 101, 192, 0.18);
  --shadow-lg: 0 20px 60px rgba(21, 101, 192, 0.22);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

/* Prevent ANY horizontal scroll on the document */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: var(--white);
  /* Clip anything that bleeds horizontally – blobs, circles, etc. */
  overflow-x: hidden;
  /* Ensure body never exceeds viewport on any device */
  max-width: 100vw;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Utility ── */
.text-sky { color: var(--sky); }
.text-blue { color: var(--blue); }
.text-navy { color: var(--navy); }
.text-accent { color: var(--accent); }
.bg-navy { background: var(--navy); }
.bg-ice { background: var(--ice); }
.bg-off { background: var(--off); }
.bg-grad { background: var(--grad); }

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sky);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
}

.section-title span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead-text {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 620px;
}

/* ── Buttons ── */
.btn-nova {
  background: var(--grad);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 0.78rem 2.2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.35);
  display: inline-block;
}

.btn-nova:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(21, 101, 192, 0.45);
  color: var(--white);
}

.btn-nova-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 50px;
  padding: 0.72rem 2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-nova-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn-nova-white {
  background: var(--white);
  color: var(--blue);
  border: none;
  border-radius: 50px;
  padding: 0.78rem 2.2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-nova-white:hover {
  background: var(--ice);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.3);
  color: var(--blue);
}

/* ── Navbar ── */
.nova-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(21, 101, 192, 0.08);
  transition: all 0.3s ease;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  /* Never let the navbar itself be wider than the viewport */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  z-index: 1000;
  padding: 0.85rem 0;
}

.nova-nav.scrolled {
  box-shadow: 0 4px 24px rgba(21, 101, 192, 0.12);
  padding: 0.55rem 0;
}

.nova-nav .navbar-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--navy);
}

@media (max-width: 576px) {
  .nova-nav .navbar-brand {
    font-size: 1.05rem;
  }
}

@media (min-width: 577px) and (max-width: 991.98px) {
  .nova-nav .navbar-brand {
    font-size: 1.2rem;
  }
}

.nova-nav .navbar-brand span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nova-nav .nav-link {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--navy) !important;
  padding: 0.4rem 1rem !important;
  transition: color 0.2s;
}

.nova-nav .nav-link:hover,
.nova-nav .nav-link.active {
  color: var(--sky) !important;
}

.nova-nav .nav-cta {
  background: var(--grad);
  color: var(--white) !important;
  border-radius: 50px;
  padding: 0.4rem 1.4rem !important;
  margin-left: 0.5rem;
  transition: all 0.3s;
}

.nova-nav .nav-cta:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ── Footer ── */
.nova-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 5rem 0 2rem;
}

.nova-footer .brand-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
}

.nova-footer .brand-name span {
  color: var(--sky);
}

.nova-footer h6 {
  font-family: 'Syne', sans-serif;
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.nova-footer a {
  color: rgba(255,255,255,0.6);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nova-footer a:hover { color: var(--sky); }

.nova-footer .footer-divider {
  border-color: rgba(255,255,255,0.08);
  margin: 2.5rem 0 1.5rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6) !important;
  font-size: 0.9rem;
  transition: all 0.3s;
  margin-right: 0.4rem;
}

.social-icon:hover {
  background: var(--sky);
  color: var(--white) !important;
  transform: translateY(-3px);
}

/* ── Cards ── */
.nova-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(21, 101, 192, 0.08);
  padding: 2rem;
  transition: all 0.4s ease;
  height: 100%;
  box-shadow: 0 2px 16px rgba(21, 101, 192, 0.06);
}

.nova-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(21, 101, 192, 0.15);
}

.nova-card .icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--ice);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 1.25rem;
  transition: all 0.3s;
}

.nova-card:hover .icon-wrap {
  background: var(--grad);
  color: var(--white);
}

/* ── Testimonial Card ── */
.testi-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(21, 101, 192, 0.08);
  border: 1px solid var(--ice);
  position: relative;
  transition: all 0.4s;
}

.testi-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.testi-card .quote-mark {
  font-size: 4rem;
  line-height: 1;
  color: var(--sky);
  font-family: Georgia, serif;
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  opacity: 0.3;
}

.testi-card .stars { color: var(--gold); font-size: 0.85rem; }

.testi-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Stats Banner ── */
.stat-item .stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Decorative Blobs ── */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.blob-1 {
  width: 500px; height: 500px;
  background: var(--sky);
  top: -100px; right: -150px;
}

.blob-2 {
  width: 350px; height: 350px;
  background: var(--blue);
  bottom: -80px; left: -100px;
}

/* ── Section Padding ── */
.section-pad { padding: 6rem 0; }
.section-pad-sm { padding: 4rem 0; }

/* ── Geometric Decoration ── */
.geo-circle {
  border: 2px solid rgba(21,101,192,0.12);
  border-radius: 50%;
  position: absolute;
  pointer-events: none;
}

/* ── Tech Badge ── */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ice);
  color: var(--blue);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Syne', sans-serif;
  margin: 0.25rem;
  transition: all 0.3s;
}

.tech-badge:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Academy Course Card ── */
.course-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(21,101,192,0.1);
  transition: all 0.4s;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(21,101,192,0.06);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.course-card .course-header {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.course-card .course-body {
  padding: 1.5rem;
}

.course-badge-upcoming {
  background: rgba(255,215,64,0.2);
  color: #b7860a;
  border-radius: 50px;
  padding: 0.2rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.05em;
}

.course-badge-live {
  background: rgba(0,230,118,0.15);
  color: #00695c;
  border-radius: 50px;
  padding: 0.2rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.05em;
}

/* ── Hero Gradient BG ── */
.hero-grad-bg {
  background: linear-gradient(160deg, var(--navy) 0%, #0d2d5e 60%, #1565c0 100%);
  position: relative;
  overflow: hidden;
}

/* ── Animated underline ── */
.anim-underline {
  position: relative;
  display: inline-block;
}

.anim-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.anim-underline:hover::after { width: 100%; }

/* ── Timeline (Vision) ── */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--sky), var(--blue));
  top: 0;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: var(--grad);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 1.5rem;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(21,101,192,0.15);
}

/* ── Form Styles ── */
.nova-form .form-control,
.nova-form .form-select {
  border: 2px solid rgba(21,101,192,0.12);
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: var(--off);
  transition: all 0.3s;
}

.nova-form .form-control:focus,
.nova-form .form-select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(66,165,245,0.12);
  background: var(--white);
}

.nova-form label {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .timeline::before { left: 20px; }
  .timeline-dot { left: 20px; }
  .section-pad { padding: 4rem 0; }
}

/* ── Navbar mobile collapse fix ──
   Prevent the expanded menu from pushing content down / creating
   a gap between the navbar and the page body on small screens.    */
@media (max-width: 991.98px) {
  .nova-nav {
    padding: 0.65rem 0;
  }

  /* The container inside the nav must never overflow */
  .nova-nav .container {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* When the menu is open, it expands inside the fixed nav.
     Give it a white background, max height with scroll,
     and a bottom border so it looks deliberate.               */
  .nova-nav .navbar-collapse {
    /* Position the open menu below the nav bar, full-width, no bleed */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(21,101,192,0.08);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 40px rgba(21,101,192,0.12);
    /* Hidden by default; Bootstrap toggles 'show' class */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
  }

  .nova-nav .navbar-collapse.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Override Bootstrap's collapsing animation which can cause flicker */
  .nova-nav .navbar-collapse.collapsing {
    visibility: visible;
    opacity: 0.5;
    height: auto !important;
    transform: translateY(-4px);
  }

  .nova-nav .navbar-nav {
    padding: 0.5rem 0 1rem;
    width: 100%;
  }

  .nova-nav .nav-link {
    padding: 0.7rem 1.5rem !important;
    border-bottom: 1px solid rgba(21,101,192,0.05);
    width: 100%;
    display: block;
  }

  .nova-nav .nav-link:last-child {
    border-bottom: none;
  }

  .nova-nav .nav-cta {
    margin: 0.6rem 1.5rem 0 !important;
    display: block;
    text-align: center;
    border-radius: 50px !important;
    width: calc(100% - 3rem);
  }
}

/* ── Image rendering optimizations ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Crisp rendering on high-DPI (retina, iOS, Android) */
  image-rendering: -webkit-optimize-contrast; /* Safari/iOS */
  image-rendering: crisp-edges;               /* Firefox    */
  -webkit-backface-visibility: hidden;        /* iOS Safari anti-blur */
  backface-visibility: hidden;
}

/* Course card images */
.course-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Page-hero responsive padding ── */
@media (max-width: 576px) {
  .page-hero {
    padding: 7rem 0 4rem;
  }
  .page-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* ── Grid pattern ── */
.grid-bg {
  background-image: linear-gradient(rgba(21,101,192,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(21,101,192,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Page hero shared ── */
.page-hero {
  background: var(--grad);
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
  color: white;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: white;
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
}

.breadcrumb-item, .breadcrumb-item a {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-family: 'Syne', sans-serif;
}

.breadcrumb-item.active { color: rgba(255,255,255,0.9); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }