/* Master Junction — app.css
   This is lightweight baseline styling that complements Tailwind (CDN).
   Safe to use even without Tailwind. */

/* CSS variables (blue theme) */
:root {
  --mj-primary: #2563eb; /* blue-600 */
  --mj-primary-700: #1d4ed8; /* blue-700 */
  --mj-bg: #f9fafb; /* gray-50 */
  --mj-card: #ffffff;
  --mj-text: #111827; /* gray-900 */
  --mj-muted: #6b7280; /* gray-500 */
  --mj-ring: rgba(37, 99, 235, 0.35);
}

/* Base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--mj-bg);
  color: var(--mj-text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Containers (in case Tailwind isn't loaded) */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Cards */
.card {
  background: var(--mj-card);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 16px;
}

/* Buttons */
.btn {
  --_bg: var(--mj-primary);
  --_bg-hover: var(--mj-primary-700);
  --_color: #fff;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: var(--_bg);
  color: var(--_color);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.02s ease;
}
.btn:hover {
  background: var(--_bg-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn-ghost {
  --_bg: transparent;
  --_bg-hover: rgba(37, 99, 235, 0.1);
  --_color: var(--mj-primary);
  color: var(--_color);
  background: var(--_bg);
  border-color: rgba(37, 99, 235, 0.2);
}

/* Inputs */
.input,
.select,
.textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: var(--mj-text);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}
.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}
.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
/* Better select dropdown */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}
/* Checkbox styling */
input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  accent-color: #7c3aed;
}
input[type="checkbox"]:checked {
  background-color: #7c3aed;
  border-color: #7c3aed;
}
/* File input */
input[type="file"] {
  padding: 0.5rem;
  border: 2px dashed #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}
input[type="file"]:hover {
  border-color: #7c3aed;
  background: #faf5ff;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 600;
  color: #1f2937;
  background: #e5e7eb;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
}

/* Navbar */
.navbar {
  background: var(--mj-primary);
  color: #fff;
}
.navbar a {
  color: #fff;
  text-decoration: none;
}
.navbar a:hover {
  text-decoration: underline;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}
.table th,
.table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
}
.table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #374151;
}
.table tbody tr:hover {
  background: #f9fafb;
}

/* Prose (blog content) */
.prose {
  color: #111827;
}
.prose h1,
.prose h2,
.prose h3 {
  font-weight: 800;
  line-height: 1.2;
  margin: 1.2em 0 0.6em;
}
.prose h1 {
  font-size: 2rem;
}
.prose h2 {
  font-size: 1.5rem;
}
.prose h3 {
  font-size: 1.25rem;
}
.prose p {
  margin: 0.8em 0;
}
.prose a {
  color: var(--mj-primary);
  text-decoration: underline;
}
.prose img {
  max-width: 100%;
  border-radius: 12px;
}
.prose pre {
  background: #0b1020;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 10px;
  overflow: auto;
}

/* Chat bubbles */
.chat {
  display: flex;
  gap: 0.5rem;
  margin: 0.35rem 0;
}
.chat .avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dbeafe;
  flex: 0 0 28px;
}
.chat .bubble {
  max-width: 70%;
  background: #ffffff;
  border: 1px solid #eef2ff;
  border-radius: 14px;
  padding: 0.55rem 0.7rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.chat.me {
  justify-content: flex-end;
}
.chat.me .bubble {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.chat .time {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

/* Toasts */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast .item {
  background: #111827;
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 9998;
  background: rgba(17, 24, 39, 0.55);
}
.modal.open {
  display: grid;
}
.modal .panel {
  width: min(640px, 92vw);
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

/* Utilities */
.hidden {
  display: none !important;
}
[x-cloak] {
  display: none !important;
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 999px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   COURSE LISTING PAGE STYLES
   ============================================================ */

/* Programs Grid */
.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* Program Card */
.program-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* Program Header - Orange Gradient */
.program-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  padding: 2rem 2rem 2.5rem;
  position: relative;
}
.program-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 24px;
  background: #fff;
  border-radius: 24px 24px 0 0;
}

.program-level {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: #d97706;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.program-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.program-description {
  font-size: 0.95rem;
  opacity: 0.95;
  margin: 0 0 1.5rem;
  line-height: 1.6;
  max-width: 600px;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.program-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.program-meta-item svg {
  width: 20px;
  height: 20px;
}

/* Course Content Section */
.course-content-section {
  padding: 2rem;
}
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.content-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.module-count {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Curriculum Grid */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.curriculum-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}
.curriculum-item:hover {
  background: #f1f5f9;
  border-color: #c7d2fe;
}
.curriculum-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #6366f1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
}
.curriculum-content h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}
.curriculum-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

/* Assessment Section */
.assessment-section {
  padding: 0 2rem 2rem;
}
.assessment-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 20px;
  border: 2px solid #fcd34d;
}
.assessment-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.assessment-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #78350f;
}
.assessment-content p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
}
.assessment-features {
  display: flex;
  gap: 1.5rem;
}
.assessment-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #78350f;
}
.assessment-feature svg {
  width: 16px;
  height: 16px;
  color: #16a34a;
}

/* Variants Section */
.variants-section {
  padding: 2rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.variants-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 1.5rem;
}
.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Variant Card */
.variant-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
}
.variant-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
}
.variant-card.popular {
  border-color: #7c3aed;
  background: linear-gradient(to bottom, #faf5ff, #fff);
}
.popular-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}
.variant-icon {
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.variant-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem;
}
.variant-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.4;
}
.variant-price {
  margin-bottom: 1rem;
}
.price-currency {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}
.price-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
}
.price-monthly {
  display: block;
  font-size: 0.75rem;
  color: #7c3aed;
  font-weight: 600;
  margin-top: 0.25rem;
}
.variant-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.variant-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}
.variant-features li:last-child {
  border-bottom: none;
}
.feature-check {
  color: #16a34a;
  font-weight: 700;
}

/* Enrollment Button */
.btn-enroll {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-enroll.primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}
.btn-enroll.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}
.btn-enroll.outline {
  background: #fff;
  color: #6366f1;
  border: 2px solid #c7d2fe;
}
.btn-enroll.outline:hover {
  background: #eef2ff;
  border-color: #6366f1;
}
.btn-enroll.enrolled {
  background: #dcfce7;
  color: #16a34a;
  border: 2px solid #86efac;
  cursor: default;
}

