:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #EAFBFF;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e5e7eb;
  --color-primary: #14BBBE;
  --color-primary-hover: #13a7aa;
  --color-secondary: #155877;
  --color-secondary-hover: #20759c;
  --radius: 10px;
  --container: 1200px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

.nav__container {
  margin: 0 auto;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__logo img {
  height: 3.5rem;
  width: auto;
  display: block;
}

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}

.nav__toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

.nav__menu {
  position: absolute;
  inset: var(--header-h) 0 auto 0;
  background: var(--color-bg);
  width: 100vw;
  left: -20px;
  list-style: none;
  margin: 0;
  padding: 20px;
  display: flex;
  text-align: center;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
}

.nav__menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.nav__menu a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.nav__menu a:hover {
    font-weight: 700;
    color: var(--color-secondary);
  }

.nav__actions {
  margin-left: auto;   
  display: flex;
  gap: .2rem;
  margin-right: .5rem;
}

.nav-icon {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  width: auto;
}

.cart-display img {
  height: 20px;
  vertical-align: middle;
}

.wishlist-display img {
  height: 35px;
  vertical-align: middle;
}

.badge-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.badge-count.wishlist {
  right: 0;
}

.fly-item {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .7s;
  fill: var(--color-secondary);
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.btn--ghost {
  color: var(--color-primary);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  margin-top: 50px;
  background-color: #f8fafc; 
  background-image: 
    radial-gradient(at 10% 20%, rgba(59, 130, 246, 0.25) 0px, transparent 100%),
    radial-gradient(at 90% 80%, rgba(45, 212, 191, 0.35) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(168, 85, 247, 0.1) 0px, transparent 40%);
}

.hero-content {
  padding: 30px;
}

.hero__image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero__image img {
  position: relative;
  z-index: 2;
  max-width: 200px;
}

.hero-btn-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn__hero {
  display: inline-block;
  text-decoration: none;
  align-items: center;
  padding: 10px 19px;
  margin: 10px;
  border-radius: 999px;
  border: none;
  background: var(--color-secondary);
  color: var(--color-bg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 5px 5px rgba(0, 0, 0, .3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn__hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
  background: var(--color-secondary-hover);
}

.promo {
  background: var(--color-primary);
}

.promo:hover {
  background: var(--color-primary-hover);
}

.courses-container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.courses {
  padding: 48px 0;
  scroll-margin-top: 80px;
}

.courses-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.3px;
}

.courses-header p {
  margin: 0 0 20px;
  color: var(--muted);
}

.courses-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.tab {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.tab.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.courses-grid {
  display: grid;
  gap: 20px;
  margin-top: 12px;
}

.course-card {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 13px 40px rgba(2, 6, 23, .12);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 10px rgba(2, 6, 23, .3);
  border-color: #dbeafe;
}

.course-card:hover .course-media img {
  transform: scale(1.05);
}

.course-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.badge.new {
  background: #ecfeff;
  color: #0891b2;
}

.course-card:hover .badge {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

.course-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.course-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.description {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.course-rating {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.stars {
  color: #f59e0b;
  letter-spacing: 1px;
}

.course-price {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.price {
  font-weight: 700;
}

.old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 13px;
}

.card-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--color-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 5px rgba(0,0,0,.3);
  background-color: var(--color-primary-hover);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: white;
}

.icon-btn.active svg {
  stroke: #fff;
  fill: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s;
}

.modal.show {
  visibility: visible;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  max-width: 520px;
  width: calc(100% - 32px);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  transform: translateY(20px) scale(.96);
  transition: transform .25s ease;
}

.modal.show .modal-content {
  transform: translateY(0) scale(1);
}

.modal-image {
  display: block;
  width: 100%;
  height: auto;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

.modal-close:hover {
  background: rgb(233, 233, 233);
}

@media (min-width: 768px) {
  .courses-header h2 {
    font-size: 32px;
  }
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav__actions {
    margin-right: 1rem;
  }
}

@media (min-width: 900px) {
  .nav__toggle {
    display: none;
  }

  .nav {
    display: flex;
    align-items: center;
  }

  .nav__logo,
  .nav__menu,
  .nav__actions {
    flex: 1;
  }

  .nav__logo {
    display: flex;
    justify-content: flex-start;
  }

  .nav__menu {
    display: flex;
    flex-direction: row;
    position: static;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav__menu a:hover {
    color: var(--color-secondary);
    font-weight: 700;
  }

  .nav__actions {
    display: flex;
    justify-content: flex-end;
  }

  .hero {
    padding: 30px 0 0 30px;
  }

  .hero__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  .hero__image {
    overflow: visible;
  }

  .hero__image img {
    max-width: 30vw;
    height: auto;
    margin-right: 4rem;
    margin-top: 4rem;
  }

  .hero-btn-container {
    gap: 2rem;
  }

  .btn__hero {
    scale: 1.2;
  }

  .modal-content {
    scale: .85;
  }
}

@media (min-width: 1024px) {
  .nav__container {
    max-width: 100%;
  }

  .nav__actions {
    gap: 1.5rem;
  }

  .hero-content p {
    display: flex;
    padding: 0 3rem;
    gap: 20rem;
  }
  
  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}