/* ========================================
   CODEFORGE WEB ACADEMY – FINAL CSS
   ======================================== */

/* ---------- THEME VARIABLES ---------- */
:root {
  --primary: #0891b2;
  --primary-light: #06b6d4;
  --accent: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.5);

  --text: #0f172a;
  --text-light: #475569;
  --text-muted: #64748b;

  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-md: 12px;
  --radius-lg: 16px;

  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe, #f8fafc);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ---------- CONTAINER ---------- */
.container {
  width: min(90%, 1200px);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Flex & Grid Helpers */
.d-flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.text-center {
  text-align: center;
}

.mt {
  margin-top: var(--spacing-md);
}

.mb {
  margin-bottom: var(--spacing-md);
}

/* ---------- TYPOGRAPHY ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.35rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

p,
li,
label {
  font-size: 1rem;
  color: var(--text-light);
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary);
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.accent {
  color: var(--accent);
}

/* ---------- GLASS CARD ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 0;
  z-index: 1000;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}

.logo-placeholder {
  font-size: 1.8rem;
  color: var(--primary);
}

.brand-name {
  font-size: 1.3rem;
  white-space: nowrap;
}

.brand-sub {
  color: var(--text-light);
  font-weight: 400;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
  font-size: 0.95rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-cta {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-shrink: 0;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
  display: block;
}

/* Mobile Menu */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  padding: var(--spacing-lg) 0;
  display: none;
  text-align: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.mobile-menu:not([hidden]) {
  display: block;
}

.mobile-menu ul {
  list-style: none;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-menu .btn {
  margin: 1rem auto;
  max-width: 200px;
  display: block;
}

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-title {
  margin-bottom: var(--spacing-md);
}

.hero-sub {
  margin: var(--spacing-md) 0 var(--spacing-lg);
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.trust-stats {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  margin-top: var(--spacing-xl);
  list-style: none;
  justify-content: flex-start;
}

.trust-stats li {
  display: flex;
  flex-direction: column;
  min-width: 80px;
  text-align: center;
}

.trust-stats strong {
  font-size: 1.5rem;
  color: var(--primary);
}

.trust-stats span {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Floating Card */
.floating-card {
  position: relative;
  z-index: 2;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.pill {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.card-tag {
  font-size: 0.9rem;
  color: var(--text-light);
}

.card-body {
  margin-top: var(--spacing-sm);
}

.mini-list {
  list-style: none;
  margin: var(--spacing-sm) 0;
}

.mini-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.mini-list i {
  color: var(--primary);
  font-size: 1rem;
}

.card-cta {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.card-cta .btn-sm {
  flex: 1;
  text-align: center;
}

/* Decor Bars */
.decor-bars {
  display: flex;
  gap: 6px;
  margin-top: var(--spacing-lg);
  justify-content: flex-start;
}

.decor-bars span {
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 48px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  line-height: 1.2;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.3);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  min-height: 40px;
}

.btn.large {
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-glow {
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
  border: none;
}

.btn-glow:hover {
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.7);
  transform: translateY(-2px);
}

.btn.disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- CARDS & GRIDS ---------- */
.cards-grid,
.reviews-grid,
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
  margin-top: 50px;
  margin-bottom: 50px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.card>* {
  flex-shrink: 0;
}

/* ---------- FEATURE CARDS (WHY SECTION) ---------- */
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  justify-content: flex-start;
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

.feature h3 {
  margin: var(--spacing-sm) 0;
  font-size: 1.35rem;
}

.feature p {
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.feature-list {
  list-style: none;
  width: 100%;
  margin-top: var(--spacing-sm);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.feature-list i {
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.section-lead {
  margin: 0 auto var(--spacing-2xl);
  max-width: 700px;
  text-align: center;
}

/* Transform Section */
.transform-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.transform-quote {
  text-align: left;
}

.transform-quote .lead {
  font-size: 1.1rem;
  line-height: 1.7;
}

.transform-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.transform-visual figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.founder-placeholder {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

/* CTA Bar */
.cta-bar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: var(--spacing-xl) 0;
}

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.cta-inner h3 {
  margin: 0;
  color: white;
}

.cta-inner p {
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.85);
}

.cta-inner .btn {
  background: white;
  color: var(--primary);
  flex-shrink: 0;
}

.cta-inner .btn:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* ---------- COURSES ---------- */
.courses-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.course-detail {
  width: 100%;
}

/* Course Detail */
.course-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--spacing-md);
}

.live-pill {
  display: inline;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.course-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.course-modules ol {
  margin-left: 1.2rem;
  padding-left: 0.5rem;
}

.course-modules li {
  margin-bottom: 0.75rem;
}

.course-modules li ul {
  margin-top: 0.5rem;
  margin-left: 1rem;
  list-style: disc;
}

.course-side ul {
  list-style: none;
  margin: var(--spacing-md) 0;
}

.course-side li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.course-side i {
  color: var(--primary);
  flex-shrink: 0;
}

.course-meta {
  margin-top: var(--spacing-md);
  border-top: 1px solid var(--glass-border);
  padding-top: var(--spacing-md);
}

.course-meta p {
  margin-bottom: 0.75rem;
}

.course-meta .btn {
  margin-top: 0.5rem;
  width: 100%;
}

/* Upcoming */
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.upcoming {
  text-align: center;
}

.upcoming-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

/* Flow & Certificate */
.flow {
  margin-top: var(--spacing-lg);
}

.flow-list {
  list-style: decimal inside;
  margin: var(--spacing-md) 0;
}

.flow-list li {
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.certificate-preview {
  text-align: center;
  margin-top: var(--spacing-lg);
}

.cert-placeholder {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
}

.cert-placeholder img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.cert-placeholder i {
  font-size: 3rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: stretch;
}

.about-text h4,
.about-founder h4 {
  margin-top: var(--spacing-lg);
}

.about-founder figure {
  text-align: center;
}

.founder-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin: 0 auto var(--spacing-sm);
}

.about-founder figcaption {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
}

.timeline {
  list-style: none;
  margin: var(--spacing-md) 0;
}

.timeline li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* Reviews */
.review {
  position: relative;
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.quote-icon {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-lg);
  color: var(--accent);
  font-size: 1.8rem;
  opacity: 0.5;
}

.review p {
  margin: 0.5rem 0 var(--spacing-sm);
  flex-grow: 1;
}

.review cite {
  display: block;
  text-align: right;
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.contact-card input,
.contact-card textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  color: var(--text);
}

.contact-card input:focus,
.contact-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2);
}

.contact-card input::placeholder,
.contact-card textarea::placeholder {
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.form-actions .btn {
  flex: 1;
}

.form-note {
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
}

.form-note a {
  text-decoration: none;
}

.form-note a:hover {
  text-decoration: underline;
}

/* Contact Info */
.contact-info a {
  color: var(--primary);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-info .socials-inline a {
  margin-right: 1rem;
}

.map-faux {
  margin: var(--spacing-lg) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.contact-cta {
  margin-top: var(--spacing-lg);
  text-align: center;
}

/* Footer */
.footer {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
}

.footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.9rem;
}

.footer nav a:hover {
  color: var(--primary);
}

.footer-center p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.socials {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.socials a {
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.socials a:hover {
  color: var(--primary);
}

/* ---------- ANIMATIONS ---------- */
[data-anim] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-anim].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {

  .nav-list,
  .nav-cta .btn {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hero-inner,
  .about-grid,
  .course-grid,
  .contact-grid,
  .transform-inner {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  section {
    padding: var(--spacing-2xl) 0;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-inner .btn {
    width: auto;
  }

  .trust-stats {
    justify-content: center;
  }

  .card-cta {
    flex-direction: column;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
  }

  .footer nav {
    margin-bottom: 0.5rem;
  }

  .form-actions {
    flex-direction: column;
  }
}

/* ---------- POPUP STYLES ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.popup-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.popup-card {
  background: white;
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  transition: transform .3s ease;
}

.popup-overlay[aria-hidden="false"] .popup-card {
  transform: scale(1);
}

.popup-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.popup-close:hover {
  color: var(--text);
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.popup-icon.success {
  color: #10b981;
}

.popup-icon.error {
  color: #ef4444;
}

.popup-title {
  margin: var(--spacing-sm) 0;
  font-size: 1.35rem;
}

.popup-message {
  color: var(--text-light);
  margin: 0;
}

/* Particles Canvas - Full screen background */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}