/**
 * AI Learning Journey Widget
 * Horizontal scroll carousel with snap
 * Prefix: .nwj-
 */

/* Container */
.nwj-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 16px;
  box-sizing: border-box;
}

/* Header */
.nwj-header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.nwj-header__title {
  font-size: 36px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.nwj-header__subtitle {
  font-size: 18px;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* Carousel Wrapper */
.nwj-carousel {
  position: relative;
  width: 100%;
}

/* Track - Horizontal scroll */
.nwj-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 24px;
  padding: 16px 16px 48px 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.nwj-track::-webkit-scrollbar {
  display: none;
}

/* Card */
.nwj-card {
  scroll-snap-align: center;
  flex-shrink: 0;
  width: 340px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.nwj-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.01);
  transform: translateY(-2px);
}

/* Card Header */
.nwj-card__header {
  background-color: #f8fafc;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nwj-card__month {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.nwj-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #3b82f6;
}

/* Card Body */
.nwj-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nwj-card__title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.3;
}

.nwj-card__desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.nwj-card__desc strong {
  color: #0f172a;
  font-weight: 600;
}

/* Exercise Box */
.nwj-exercise {
  border-radius: 12px;
  padding: 16px;
  border: 1px solid;
}

.nwj-exercise__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.nwj-exercise__label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nwj-exercise__desc {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

/* Exercise Color Variations */
.nwj-exercise--blue { background-color: #eff6ff; border-color: #dbeafe; }
.nwj-exercise--blue .nwj-exercise__label { color: #1d4ed8; }
.nwj-exercise--blue .nwj-exercise__label svg { color: #1d4ed8; }

.nwj-exercise--indigo { background-color: #eef2ff; border-color: #e0e7ff; }
.nwj-exercise--indigo .nwj-exercise__label { color: #4338ca; }
.nwj-exercise--indigo .nwj-exercise__label svg { color: #4338ca; }

.nwj-exercise--violet { background-color: #f5f3ff; border-color: #ede9fe; }
.nwj-exercise--violet .nwj-exercise__label { color: #6d28d9; }
.nwj-exercise--violet .nwj-exercise__label svg { color: #6d28d9; }

.nwj-exercise--purple { background-color: #faf5ff; border-color: #f3e8ff; }
.nwj-exercise--purple .nwj-exercise__label { color: #7e22ce; }
.nwj-exercise--purple .nwj-exercise__label svg { color: #7e22ce; }

.nwj-exercise--rose { background-color: #fff1f2; border-color: #ffe4e6; }
.nwj-exercise--rose .nwj-exercise__label { color: #be123c; }
.nwj-exercise--rose .nwj-exercise__label svg { color: #be123c; }

.nwj-exercise--emerald { background-color: #ecfdf5; border-color: #d1fae5; }
.nwj-exercise--emerald .nwj-exercise__label { color: #047857; }
.nwj-exercise--emerald .nwj-exercise__label svg { color: #047857; }

.nwj-exercise--cyan { background-color: #ecfeff; border-color: #cffafe; }
.nwj-exercise--cyan .nwj-exercise__label { color: #0e7490; }
.nwj-exercise--cyan .nwj-exercise__label svg { color: #0e7490; }

.nwj-exercise--amber { background-color: #fffbeb; border-color: #fef3c7; }
.nwj-exercise--amber .nwj-exercise__label { color: #b45309; }
.nwj-exercise--amber .nwj-exercise__label svg { color: #b45309; }

.nwj-exercise--sky { background-color: #f0f9ff; border-color: #e0f2fe; }
.nwj-exercise--sky .nwj-exercise__label { color: #0369a1; }
.nwj-exercise--sky .nwj-exercise__label svg { color: #0369a1; }

.nwj-exercise--fuchsia { background-color: #fdf4ff; border-color: #fae8ff; }
.nwj-exercise--fuchsia .nwj-exercise__label { color: #a21caf; }
.nwj-exercise--fuchsia .nwj-exercise__label svg { color: #a21caf; }

.nwj-exercise--teal { background-color: #f0fdfa; border-color: #ccfbf1; }
.nwj-exercise--teal .nwj-exercise__label { color: #0f766e; }
.nwj-exercise--teal .nwj-exercise__label svg { color: #0f766e; }

.nwj-exercise--orange { background-color: #fff7ed; border-color: #ffedd5; }
.nwj-exercise--orange .nwj-exercise__label { color: #c2410c; }
.nwj-exercise--orange .nwj-exercise__label svg { color: #c2410c; }

/* Navigation Buttons */
.nwj-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: #475569;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

.nwj-nav-btn:hover {
  color: #0f172a;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.nwj-nav-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.3);
}

.nwj-nav-btn svg {
  width: 24px;
  height: 24px;
}

.nwj-nav-btn--prev {
  left: -16px;
}

.nwj-nav-btn--next {
  right: -16px;
}

.nwj-carousel:hover .nwj-nav-btn {
  display: flex;
}

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

@media (min-width: 768px) {
  .nwj-card {
    width: 380px;
  }
}

@media (max-width: 768px) {
  .nwj-container {
    padding: 32px 12px;
  }
  
  .nwj-header__title {
    font-size: 28px;
  }
  
  .nwj-header__subtitle {
    font-size: 16px;
  }
  
  .nwj-header {
    margin-bottom: 32px;
  }
  
  .nwj-nav-btn {
    display: none !important;
  }
  
  .nwj-card {
    width: 300px;
  }
}

@media (max-width: 480px) {
  .nwj-card {
    width: 280px;
  }
}
