:root {
  --primary: #1E1E2F;
  --accent: #E04A4A;
  --text: #FFFFFF;
  --secondary: #2C2C3E;
  --primary-bg: #fefefe;
  --secondary-bg: #ffffff;
  --tertiary-bg: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.95);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --accent-primary: #ef4444;
  --accent-secondary: #dc2626;
  --accent-tertiary: #b91c1c;
  --accent-coral: #f97316;
  --accent-pink: #ec4899;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-primary: rgba(239, 68, 68, 0.15);
  --border-secondary: rgba(0, 0, 0, 0.06);
  --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-coral));
  --gradient-secondary: linear-gradient(135deg, var(--accent-secondary), var(--accent-pink));
  --gradient-bg: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 249, 250, 1));
  --shadow-primary: 0 8px 32px rgba(239, 68, 68, 0.08);
  --shadow-secondary: 0 8px 32px rgba(220, 38, 38, 0.08);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(239, 68, 68, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #EFF2F7;
  color: var(--text-primary);
}

/* ===== HEADER ===== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary);
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1000;
  padding: 0 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
}

.landing-page-container-codemate-logo {
  flex: 1;
  display: flex;
  align-items: center;
}

.landing-page-container-codemate-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.navbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: inherit;
}

.nav-link:hover {
  color: var(--accent);
}

.header-profile {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-profile-pic {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: block;
  border: 2px solid #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dropdown {
  position: absolute;
  top: 80px;
  right: 5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  width: 220px;
  display: none;
  z-index: 1001;
  padding: 0.8rem 0.5rem;
}

.dropdown.show {
  display: block;
}

.dropdown a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
  cursor: pointer;
}

.dropdown a:hover {
  background: #f0f0f0;
}

.dropdown a i {
  margin-right: 10px;
  color: #666;
}

hr {
  margin: 0.5rem 0.7rem;
}

/* ===== HAMBURGER ===== */

.topnav {
  display: none;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-icon {
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.menu-icon span {
  background-color: white;
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon.active .bar1 {
  transform: translateY(9px) rotate(45deg);
}

.menu-icon.active .bar2 {
  opacity: 0;
  transform: scaleX(0);
}

.menu-icon.active .bar3 {
  transform: translateY(-9px) rotate(-45deg);
}

/* ===== MOBILE NAV MENU ===== */

#myLinks {
  display: none;
  position: fixed;
  top: 100px;
  left: 0;
  width: 100%;
  background: #1E1E2F;
  z-index: 998;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#myLinks.show {
  display: flex;
}

#myLinks a {
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s;
}

#myLinks a:hover {
  background: rgba(255,255,255,0.05);
}

/* ===== COURSE HEADER ===== */

.course-header {
  text-align: center;
  margin-bottom: 6rem;
}

.course-heading {
  font-size: 3.5rem;
  padding-top: 8rem;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.course-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SECTION HEADINGS ===== */

.languages-heading, .ai-courses-heading {
  max-width: 1250px;
  margin: 0 auto;
  padding-bottom: 2rem;
  font-size: 2.3rem;
  font-weight: 700;
}

.ai-courses-heading {
  padding-top: 5rem;
}

.languages-heading::before, .ai-courses-heading::before {
  content: '';
  width: 4px;
  height: 35px;
  background: var(--gradient-primary);
  border-radius: 2px;
  display: inline-block;
  margin-right: 0.7rem;
}

/* ===== COURSE GRIDS ===== */

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.languages, .ai-courses {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1250px;
  margin: 0 auto;
  justify-content: flex-start;
  animation: slideUp 0.6s ease-out;
}

.ai-courses {
  padding-bottom: 7rem;
}

.languages > a, .ai-courses > a {
  padding: 2rem;
  border-radius: 15px;
  background: var(--gradient-card);
  color: inherit;
  border: 1px solid var(--border-secondary);
  border-top: 4px solid var(--accent-primary);
  border-left: 4px solid var(--secondary);
  box-shadow: var(--shadow-card);
  flex: 1 1 320px;
  max-width: 100%;
  height: 290px;
  align-self: stretch;
  box-sizing: border-box;
  font-size: 1.1em;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.languages > a:hover, .ai-courses > a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary);
  border-color: var(--border-primary);
}

.languages > a > h3:first-of-type, .ai-courses > a > h3:first-of-type {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.languages > a > h2, .ai-courses > a > h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0;
}

.languages > a > h3:last-of-type, .ai-courses > a > h3:last-of-type {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* ===== LEVEL BADGES ===== */

svg {
  height: 1.25rem;
  width: 1.25rem;
  vertical-align: middle;
}

.beginner-level, .advanced-level {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-top: auto;
  margin-bottom: 0.1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  width: fit-content;
}

.beginner-level > span, .advanced-level > span {
  line-height: 1;
  font-size: 0.875rem;
}

.beginner-level {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.advanced-level {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-tertiary);
  border: 1px solid var(--border-primary);
}

/* ===== RESPONSIVE ===== */

@media (min-width: 1000px) and (max-width: 1406px) {
  .header {
    padding: 0 2rem;
  }

  .navbar {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 15px;
  }
}

@media (max-width: 1000px) {
  .header {
    padding: 0 1rem;
    padding-left: 2rem;
  }

  .navbar {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 15px;
  }

  .landing-page-container-codemate-logo {
    flex: 0 0 250px;
    margin-right: 2rem;
  }

  .landing-page-container-codemate-logo a span {
    font-size: 1.5rem !important;
  }

  .landing-page-container-codemate-logo a img {
    height: 48px !important;
    width: 48px !important;
  }
}

@media (max-width: 1024px) {
  .header {
    padding: 0 2rem;
  }

  .dropdown {
    right: 2rem;
  }
   .landing-page-container-codemate-logo a span {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 900px) {
  .landing-page-container-codemate-logo {
    margin-right: 0.5rem;
  }
 
}

@media (max-width: 850px) {
  .header {
    padding: 0 1.2rem;
    height: 70px;
  }

  .landing-page-container-codemate-logo {
    flex: 1
  }

  .navbar {
    display: none;
  }

  .header-profile {
    flex: 0;
    margin-right: 1rem;
  }

  .topnav {
    display: flex;
  }

  #myLinks {
    top: 70px;
  }

  .dropdown {
    right: 1rem;
    top: 60px;
  }

  .course-header {
    margin-bottom: 3rem;
  }

  .course-heading {
    font-size: 2.2rem;
    padding-top: 5rem;
  }

  .course-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .languages-heading,
  .ai-courses-heading {
    padding-left: 1rem;
    font-size: 1.6rem;
  }

  .languages,
  .ai-courses {
    padding: 0 1rem;
    gap: 16px;
  }

  .languages > a,
  .ai-courses > a {
    flex: 1 1 100%;
    height: auto;
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 1rem;
  }

  .course-heading {
    font-size: 1.8rem;
  }

  .languages > a,
  .ai-courses > a {
    padding: 1.5rem;
  }
}

