/* ===========================
   KNEW PROJECT - Custom Styles
   =========================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Syne:wght@400;500;600;700;800&display=swap');

/* ===========================
   CSS VARIABLES
   =========================== */
:root {
  --deep-blue: #0A1628;
  --burnt-orange: #C2410C;
  --off-white: #F9FAFB;
  --burgundy: #800020;
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-display: 'Syne', sans-serif;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--off-white);
  color: var(--deep-blue);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode */
body.dark-mode {
  background-color: var(--deep-blue);
  color: var(--off-white);
}

/* ===========================
   TYPOGRAPHY
   =========================== */
.font-serif { font-family: var(--font-serif) !important; }
.font-display { font-family: var(--font-display) !important; }
.font-sans { font-family: var(--font-sans) !important; }

.h1-display {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  color: var(--deep-blue);
  font-weight: 700;
}
body.dark-mode .h1-display { color: var(--off-white); }

.h2-display {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.2;
  color: var(--deep-blue);
  font-weight: 600;
}
body.dark-mode .h2-display { color: var(--off-white); }

.h3-display {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--deep-blue);
  font-weight: 600;
}
body.dark-mode .h3-display { color: var(--off-white); }

.body-text {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.75;
  color: rgba(10,22,40,0.8);
}
body.dark-mode .body-text { color: rgba(249,250,251,0.8); }

.trust-line {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(10,22,40,0.6);
}
body.dark-mode .trust-line { color: rgba(249,250,251,0.6); }

.step-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burnt-orange);
  font-weight: 700;
  display: block;
  margin-bottom: 1rem;
}

.emphasis-text {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--deep-blue);
  border-left: 2px solid var(--burnt-orange);
  padding-left: 1.5rem;
  margin: 2rem 0;
}
body.dark-mode .emphasis-text { color: var(--off-white); }

/* ===========================
   COLORS
   =========================== */
.text-burnt-orange { color: var(--burnt-orange) !important; }
.text-deep-blue { color: var(--deep-blue) !important; }
.text-off-white { color: var(--off-white) !important; }
.text-burgundy { color: var(--burgundy) !important; }
.bg-deep-blue { background-color: var(--deep-blue) !important; }
.bg-burnt-orange { background-color: var(--burnt-orange) !important; }
.bg-off-white { background-color: var(--off-white) !important; }

/* ===========================
   NAVBAR
   =========================== */
#mainNavbar {
  background-color: rgba(249, 250, 251, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10,22,40,0.05);
  transition: all 0.3s ease;
  padding: 0;
  height: 80px;
}
body.dark-mode #mainNavbar {
  background-color: rgba(10,22,40,0.85);
  border-bottom-color: rgba(249,250,251,0.1);
}

#mainNavbar .navbar-brand img { height: 42px; object-fit: contain; }
body.dark-mode #mainNavbar .navbar-brand img { filter: brightness(0) invert(1); }

#mainNavbar .nav-link {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(10,22,40,0.7) !important;
  transition: color 0.25s;
  padding: 0.5rem 0.75rem !important;
}
body.dark-mode #mainNavbar .nav-link { color: rgba(249,250,251,0.7) !important; }
#mainNavbar .nav-link:hover, #mainNavbar .nav-link.active { color: var(--burnt-orange) !important; }

.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0; right: 0;
  background: var(--off-white);
  border-bottom: 1px solid rgba(10,22,40,0.05);
  padding: 1.5rem;
  z-index: 999;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(10,22,40,0.1);
}
body.dark-mode .mobile-menu {
  background: var(--deep-blue);
  border-bottom-color: rgba(249,250,251,0.1);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu .nav-link { font-family: var(--font-serif); font-size: 1.25rem; padding: 0.75rem 0 !important; }

/* ===========================
   BUTTONS
   =========================== */
.btn-primary-custom {
  background-color: var(--burnt-orange);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(194,65,12,0.25);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-custom:hover {
  background-color: rgba(194,65,12,0.9);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(194,65,12,0.35);
  color: white;
  text-decoration: none;
}

.btn-secondary-custom {
  background: transparent;
  color: var(--deep-blue);
  border: 2px solid var(--deep-blue);
  border-radius: 50px;
  padding: 12px 32px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
body.dark-mode .btn-secondary-custom {
  color: var(--off-white);
  border-color: var(--off-white);
}
.btn-secondary-custom:hover {
  background: rgba(10,22,40,0.05);
  transform: translateY(-2px);
  color: var(--deep-blue);
  text-decoration: none;
}
body.dark-mode .btn-secondary-custom:hover {
  background: rgba(249,250,251,0.1);
  color: var(--off-white);
}

/* ===========================
   SECTIONS
   =========================== */
.section-pad { padding: 6rem 0; }
.section-pad-lg { padding: 8rem 0; }
.section-pad-sm { padding: 3rem 0; }

.section-white { background-color: #ffffff; }
body.dark-mode .section-white { background-color: var(--deep-blue); }

.section-offwhite { background-color: var(--off-white); }
body.dark-mode .section-offwhite { background-color: var(--deep-blue); }

.section-offwhite-alt { background-color: var(--off-white); }
body.dark-mode .section-offwhite-alt { background-color: rgba(255,255,255,0.02); }

.section-dark { background-color: var(--deep-blue) !important; }
.section-dark * { color: rgba(249,250,251,0.8); }
.section-dark .h2-display, .section-dark .h3-display { color: white; }

.section-border-top { border-top: 1px solid rgba(10,22,40,0.05); }
body.dark-mode .section-border-top { border-top-color: rgba(249,250,251,0.1); }
.section-border { border-top: 1px solid rgba(10,22,40,0.05); border-bottom: 1px solid rgba(10,22,40,0.05); }
body.dark-mode .section-border { border-color: rgba(249,250,251,0.1); }

/* ===========================
   HERO
   =========================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  width: 380px; height: 380px;
  background: rgba(194,65,12,0.12);
  border-radius: 50%;
  filter: blur(120px);
  top: 25%; left: 25%;
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  width: 380px; height: 380px;
  background: rgba(10,22,40,0.08);
  border-radius: 50%;
  filter: blur(120px);
  bottom: 25%; right: 25%;
  pointer-events: none;
}

/* ===========================
   CARDS
   =========================== */
.feature-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(249,250,251,0.1);
  border-radius: 1.25rem;
  padding: 2.5rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.feature-card:hover { transform: translateY(-8px); }

.card-white {
  background: #ffffff;
  border: 1px solid rgba(10,22,40,0.05);
  border-radius: 2rem;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 12px rgba(10,22,40,0.04);
}
body.dark-mode .card-white {
  background: rgba(255,255,255,0.05);
  border-color: rgba(249,250,251,0.1);
}
.card-white:hover { box-shadow: 0 10px 30px rgba(10,22,40,0.1); }

.card-offwhite {
  background: var(--off-white);
  border: 1px solid rgba(10,22,40,0.05);
  border-radius: 2rem;
  padding: 2rem;
}
body.dark-mode .card-offwhite { background: rgba(255,255,255,0.05); border-color: rgba(249,250,251,0.1); }

.icon-box {
  width: 48px; height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,22,40,0.05);
}
body.dark-mode .icon-box { background: rgba(255,255,255,0.1); }

/* ===========================
   HERO IMAGE FRAME
   =========================== */
.hero-img-frame {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(10,22,40,0.05);
  box-shadow: 0 25px 50px rgba(10,22,40,0.15);
  position: relative;
}
.hero-img-frame img { width: 100%; display: block; }
.hero-img-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(10,22,40,0.2), transparent);
}

.certified-badge {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  background: rgba(255,255,255,0.95);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--deep-blue);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
body.dark-mode .certified-badge { background: rgba(10,22,40,0.95); color: var(--off-white); }

/* ===========================
   COURSE CARDS (Horizontal Scroll)
   =========================== */
.courses-scroll-wrapper { overflow-x: auto; padding: 1rem 0 2rem; scrollbar-width: none; }
.courses-scroll-wrapper::-webkit-scrollbar { display: none; }
.courses-scroll-track { display: flex; gap: 2rem; padding: 0 2rem; width: max-content; }

.course-card {
  flex-shrink: 0;
  width: 288px;
  height: 480px;
  border-radius: 3rem;
  overflow: hidden;
  border: 1px solid rgba(10,22,40,0.05);
  box-shadow: 0 4px 16px rgba(10,22,40,0.08);
  position: relative;
  transition: transform 0.4s ease;
}
.course-card:hover { transform: translateY(-16px); }
.course-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(40%);
  transition: filter 1s ease, transform 1s ease;
}
.course-card:hover img { filter: grayscale(0%); transform: scale(1.08); }
.course-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,0.95) 0%, rgba(10,22,40,0.3) 50%, transparent 100%);
}
.course-card-body {
  position: absolute;
  bottom: 3rem; left: 2.5rem; right: 2.5rem;
}
.course-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.1);
  margin-bottom: 0.5rem;
  transition: color 0.4s;
}
.course-card:hover .course-num { color: rgba(194,65,12,0.4); }
.course-name {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.course-bar {
  height: 6px; width: 64px;
  background: var(--burnt-orange);
  border-radius: 3px;
  transition: width 0.7s ease;
}
.course-card:hover .course-bar { width: 100%; }

.course-card-end {
  flex-shrink: 0;
  width: 360px;
  height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
}

/* ===========================
   HOW IT WORKS STEPS
   =========================== */
.step-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--burnt-orange);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.timeline-connector {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(10,22,40,0.1);
  transform: translateX(-50%);
}

/* ===========================
   FAQ
   =========================== */
.faq-item {
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(10,22,40,0.05);
}
body.dark-mode .faq-item { border-color: rgba(249,250,251,0.1); }
.faq-question {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(10,22,40,0.4);
  transition: color 0.25s;
}
body.dark-mode .faq-question { color: rgba(249,250,251,0.4); }
.faq-item:hover .faq-question { color: var(--burnt-orange); }
.faq-answer {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(10,22,40,0.8);
}
body.dark-mode .faq-answer { color: rgba(249,250,251,0.8); }

/* ===========================
   CONTACT FORM
   =========================== */
.form-control-custom {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--off-white);
  border: 1px solid rgba(10,22,40,0.05);
  border-radius: 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--deep-blue);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
body.dark-mode .form-control-custom {
  background: rgba(255,255,255,0.05);
  border-color: rgba(249,250,251,0.1);
  color: var(--off-white);
}
.form-control-custom:focus {
  border-color: rgba(194,65,12,0.3);
  box-shadow: 0 0 0 3px rgba(194,65,12,0.1);
}
.form-label-custom {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(10,22,40,0.4);
  margin-bottom: 0.5rem;
  display: block;
}
body.dark-mode .form-label-custom { color: rgba(249,250,251,0.4); }

/* ===========================
   FOOTER
   =========================== */
footer {
  background-color: var(--deep-blue);
  color: rgba(249,250,251,0.8);
  padding: 5rem 0 2rem;
}
footer h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: white;
  margin-bottom: 1.5rem;
}
footer a {
  color: rgba(249,250,251,0.7);
  text-decoration: none;
  transition: color 0.25s;
}
footer a:hover { color: var(--burnt-orange); }
.footer-divider {
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4rem;
  padding-top: 2rem;
}

/* ===========================
   DARK MODE TOGGLE
   =========================== */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  color: var(--deep-blue);
  transition: color 0.25s;
}
body.dark-mode .theme-toggle { color: var(--off-white); }
.theme-toggle:hover { color: var(--burnt-orange); }

/* ===========================
   SCROLL PROGRESS BAR
   =========================== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--burnt-orange);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(194,65,12,0.5);
}

/* ===========================
   ANIMATE ON SCROLL
   =========================== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }
.fade-up.delay-5 { transition-delay: 0.5s; }

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.scale-in.visible { opacity: 1; transform: scale(1); }

/* ===========================
   PILL / BADGE
   =========================== */
.pill {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pill-orange { background: var(--burnt-orange); color: white; }
.pill-outline { background: rgba(10,22,40,0.05); border: 1px solid rgba(10,22,40,0.05); color: var(--deep-blue); }
body.dark-mode .pill-outline { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.1); color: var(--off-white); }
.pill-dark { background: var(--deep-blue); color: white; }

/* ===========================
   IMAGE UTILS
   =========================== */
.img-rounded { border-radius: 2.5rem; overflow: hidden; }
.img-rounded-lg { border-radius: 3rem; overflow: hidden; }
.img-cover { width: 100%; height: 100%; object-fit: cover; }
.img-shadow { box-shadow: 0 25px 50px rgba(10,22,40,0.15); }

/* ===========================
   PROGRESS / HORIZONTAL BAR
   =========================== */
.h-bar {
  height: 6px;
  background: var(--burnt-orange);
  border-radius: 3px;
}

/* ===========================
   FLOATING BADGE
   =========================== */
.float-badge {
  position: absolute;
  padding: 1.5rem 2rem;
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 8px 24px rgba(10,22,40,0.12);
  border: 1px solid rgba(10,22,40,0.05);
}
body.dark-mode .float-badge {
  background: var(--deep-blue);
  border-color: rgba(249,250,251,0.1);
}

/* ===========================
   LOGIN / REGISTER PAGES
   =========================== */
.auth-page {
  min-height: 100vh;
  background-color: var(--deep-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: white;
  color: var(--deep-blue);
  border-radius: 1.25rem;
  padding: 2.5rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

/* ===========================
   UTILITY
   =========================== */
.border-orange-subtle { border-color: rgba(194,65,12,0.15) !important; }
.max-w-3xl { max-width: 780px; }
.max-w-4xl { max-width: 900px; }
.max-w-5xl { max-width: 1080px; }
.lh-relaxed { line-height: 1.75; }
.letter-wide { letter-spacing: 0.1em; }
.letter-widest { letter-spacing: 0.2em; }
.text-muted-custom { color: rgba(10,22,40,0.5); }
body.dark-mode .text-muted-custom { color: rgba(249,250,251,0.5); }
.text-muted-80 { color: rgba(10,22,40,0.8); }
body.dark-mode .text-muted-80 { color: rgba(249,250,251,0.8); }

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

.hover-orange:hover { color: var(--burnt-orange) !important; }

/* Page active link */
nav .nav-link.page-active { color: var(--burnt-orange) !important; }

/* Border left orange */
.border-l-orange { border-left: 2px solid rgba(194,65,12,0.2); padding-left: 1.5rem; }

/* Dot orange */
.dot-orange {
  width: 6px; height: 6px;
  background: var(--burnt-orange);
  border-radius: 50%;
  display: inline-block;
}

/* Step number circles */
.num-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(10,22,40,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--deep-blue);
  transition: background 0.4s, color 0.4s;
  flex-shrink: 0;
}
body.dark-mode .num-circle { background: rgba(255,255,255,0.07); color: var(--off-white); }
.num-circle:hover { background: var(--deep-blue); color: white; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .section-pad { padding: 4rem 0; }
  .section-pad-lg { padding: 5rem 0; }
  .hero-section { padding-top: 100px; padding-bottom: 60px; }
  .h1-display { font-size: 2.5rem; }
  .h2-display { font-size: 2rem; }
}

/* Anti-fouc */
[data-page] { display: none; }
[data-page].page-active { display: block; }
