/* ================================================================
   COMPONENTS — Buttons, cards, badges, form, misc UI
   ================================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.875rem 2rem;
  border-radius: var(--r-md);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
}

.btn svg { flex-shrink: 0; }

.btn-primary {
  background: var(--c-navy);
  color: var(--c-white);
  border-color: var(--c-navy);
}
.btn-primary:hover {
  background: var(--c-navy-light);
  border-color: var(--c-navy-light);
  box-shadow: var(--shadow-navy);
  transform: translateY(-1px);
}

.btn-crimson {
  background: var(--c-crimson);
  color: var(--c-white);
  border-color: var(--c-crimson);
}
.btn-crimson:hover {
  background: var(--c-crimson-dark);
  border-color: var(--c-crimson-dark);
  box-shadow: 0 6px 24px rgba(158,27,50,0.3);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--c-white);
}

.btn-outline-navy {
  background: transparent;
  color: var(--c-navy);
  border-color: var(--c-navy);
}
.btn-outline-navy:hover {
  background: var(--c-navy);
  color: var(--c-white);
}

.btn-outline-crimson {
  background: transparent;
  color: var(--c-crimson);
  border-color: var(--c-crimson);
}
.btn-outline-crimson:hover {
  background: var(--c-crimson);
  color: var(--c-white);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: 1.1rem 2.5rem;
  font-size: var(--fs-base);
  border-radius: var(--r-lg);
}

/* ── Ghost / text link ── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-crimson);
  transition: var(--ease);
}
.link-arrow:hover { gap: 1rem; }
.link-arrow svg { transition: var(--ease); }

/* ── Cards ── */
.card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--ease);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-body { padding: var(--sp-5); }
.card-body-sm { padding: var(--sp-3); }

.card-dark {
  background: var(--c-navy-light);
  border-color: rgba(255,255,255,0.08);
  color: var(--c-white);
}

.card-accent {
  border-left: 4px solid var(--c-crimson);
}

/* ── Image placeholder ── */
.img-placeholder {
  background: linear-gradient(135deg, var(--c-surface-3) 0%, var(--c-surface-4) 100%);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--c-ink-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-3);
}
.img-placeholder svg {
  opacity: 0.35;
  flex-shrink: 0;
}
.img-placeholder span {
  max-width: 20ch;
  line-height: 1.5;
  opacity: 0.7;
}

.img-placeholder-dark {
  background: linear-gradient(135deg, var(--c-navy-light) 0%, var(--c-navy) 100%);
  color: rgba(255,255,255,0.5);
}

/* ── Badges / chips ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.875rem;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.badge-navy    { background: var(--c-surface-4); color: var(--c-navy); }
.badge-crimson { background: var(--c-crimson); color: var(--c-white); }
.badge-open    { background: #d1fae5; color: #065f46; }
.badge-gold    { background: #fef3c7; color: #92400e; }

/* ── Tech stack chips ── */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}
.chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-navy);
}

/* ── Rule / divider ── */
.rule {
  height: 2px;
  background: linear-gradient(to right, var(--c-crimson) 0%, transparent 100%);
  border: none;
  border-radius: var(--r-full);
  margin-block: var(--sp-3);
  max-width: 4rem;
}
.rule-full {
  height: 1px;
  background: var(--c-border-light);
  border: none;
}

/* ── Stat block ── */
.stat-value {
  font-family: var(--f-display);
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--ls-tight);
  color: var(--c-coral);
}
.stat-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: var(--sp-1);
}

/* ── Forms ── */
.form-group { margin-bottom: var(--sp-3); }

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-navy);
  margin-bottom: var(--sp-1);
}
.form-label .req { color: var(--c-crimson); }

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.form-control:focus {
  border-color: var(--c-navy);
  box-shadow: 0 0 0 3px rgba(1,21,80,0.1);
}
.form-control::placeholder { color: var(--c-ink-faint); }

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.form-hint { font-size: var(--fs-xs); color: var(--c-ink-faint); margin-top: 0.375rem; }

.form-success {
  display: none;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3);
  color: #065f46;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

/* ── Progress bar ── */
.progress-wrap {
  background: rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  height: 12px;
  overflow: hidden;
  margin-block: var(--sp-2);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-coral) 100%);
  border-radius: var(--r-full);
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Timeline ── */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-navy), var(--c-crimson));
}
.timeline-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: var(--sp-6);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-crimson);
  border: 3px solid var(--c-surface);
  z-index: 1;
}
.timeline-dot--future { background: var(--c-ink-faint); }
.timeline-year {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-crimson);
  margin-bottom: 0.25rem;
}
.timeline-title {
  font-family: var(--f-display);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 0.25rem;
}
.timeline-body {
  font-size: var(--fs-sm);
  color: var(--c-ink-muted);
  line-height: var(--lh-loose);
}

/* ── Giving tier card ── */
.tier-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: var(--ease);
}
.tier-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tier-header {
  padding: var(--sp-5);
  text-align: center;
}
.tier-amount {
  font-family: var(--f-display);
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1;
}
.tier-name {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-top: var(--sp-1);
}
.tier-body {
  background: var(--c-white);
  padding: var(--sp-5);
}
.tier-perks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.tier-perk {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--c-ink-muted);
}
.tier-perk svg { flex-shrink: 0; margin-top: 2px; color: var(--c-crimson); }

/* ── Curriculum checklist ── */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--c-border-light);
  font-size: var(--fs-sm);
  color: var(--c-ink-muted);
  line-height: 1.6;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item svg { flex-shrink: 0; margin-top: 2px; color: var(--c-crimson); }
.checklist-item strong { color: var(--c-ink); display: block; font-weight: 600; }

/* ── Info box (notice / callout) ── */
.info-box {
  border-radius: var(--r-md);
  border-left: 4px solid var(--c-crimson);
  background: var(--c-surface-2);
  padding: var(--sp-3) var(--sp-4);
}
.info-box-dark {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--c-coral);
}

/* ── TVETA strip ── */
.tveta-strip {
  background: var(--c-navy);
  color: rgba(255,255,255,0.75);
  padding: var(--sp-3) 0;
}
.tveta-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
}
.tveta-strip__badge {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-weight: 700;
  color: var(--c-gold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.tveta-strip__text { font-size: var(--fs-xs); }

/* ── Why-choose grid icons ── */
.why-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--ease);
}
.why-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.why-card__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--c-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-card__icon svg { color: var(--c-navy); }
.why-card__title {
  font-family: var(--f-display);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 0.25rem;
}
.why-card__body { font-size: var(--fs-sm); color: var(--c-ink-muted); line-height: var(--lh-loose); }

/* ── Study mode cards ── */
.mode-card {
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: var(--sp-5);
  transition: var(--ease);
}
.mode-card:hover { background: rgba(255,255,255,0.1); }
.mode-number {
  font-family: var(--f-display);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255,255,255,0.08);
  margin-bottom: var(--sp-2);
}
.mode-icon { margin-bottom: var(--sp-3); }
.mode-title {
  font-family: var(--f-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-1);
}
.mode-body { font-size: var(--fs-sm); color: rgba(255,255,255,0.65); line-height: var(--lh-loose); }

/* ── Placeholder height helpers ── */
.h-36  { height: 9rem; }
.h-48  { height: 12rem; }
.h-56  { height: 14rem; }
.h-64  { height: 16rem; }
.h-80  { height: 20rem; }
.h-96  { height: 24rem; }
.h-full { height: 100%; }

/* ── Form control error state ── */
.form-control.error {
  border-color: var(--c-crimson);
  box-shadow: 0 0 0 3px rgba(158,27,50,0.12);
}
