/* ============================================================
   MIND OF MERCY — ADDITIONAL COMPONENT STYLES
   css/components.css
   ============================================================ */

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal-backdrop[hidden] { display: none; }
.modal-box {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalIn .22s ease;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.modal-box-wide { max-width: 720px; }
@keyframes modalIn { from { opacity:0; transform: translateY(-12px) scale(.97); } to { opacity:1; transform:none; } }
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--text-muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover { background: var(--gray-200); color: var(--text); }

/* ── USER AVATAR LARGE ───────────────────────────────────────── */
.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), var(--green));
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-md {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), var(--green));
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), var(--green));
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── SECTION HEADING PATTERN ─────────────────────────────────── */
.section-heading       { margin-bottom: var(--space-10); }
.section-heading.center { text-align: center; }
.section-heading h2    { margin-bottom: var(--space-3); }
.section-heading p     { max-width: 580px; font-size: 1.05rem; }
.section-heading.center p { margin: 0 auto; }

/* ── CERTIFICATE CARD ────────────────────────────────────────── */
.cert-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: var(--transition);
}
.cert-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.cert-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cert-locked {
  opacity: .55;
  border-style: dashed;
}
.cert-locked:hover { border-color: var(--border); box-shadow: none; }

/* ── NOTIFICATION ITEM ───────────────────────────────────────── */
.notif-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: var(--space-3);
  transition: var(--transition);
}
.notif-item:hover     { background: var(--bg-alt); }
.notif-item.unread    { border-color: var(--blue); background: var(--blue-light); }
.notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: .3rem;
  flex-shrink: 0;
}
.notif-dot.green  { background: var(--green); }
.notif-dot.gold   { background: var(--gold); }
.notif-dot.red    { background: var(--error); }

/* ── COURSE CARD ─────────────────────────────────────────────── */
.course-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.course-banner { height: 120px; display: flex; align-items: center; justify-content: center; }
.course-banner.emotional { background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid)); }
.course-banner.leadership { background: linear-gradient(135deg, #4A235A, #7D3C98); }
.course-banner.family    { background: linear-gradient(135deg, #8B5E08, var(--gold)); }
.course-banner.finance   { background: linear-gradient(135deg, #1a2a4a, #2c3e6e); }
.course-body { padding: var(--space-5); }
.course-meta { display: flex; gap: var(--space-4); font-size: .75rem; color: var(--text-muted); margin: var(--space-2) 0 var(--space-4); flex-wrap: wrap; }
.course-meta span { display: flex; align-items: center; gap: .25rem; }
.level-badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2rem .6rem; border-radius: var(--radius-full); }
.level-beginner     { background: #DCFCE7; color: #166534; }
.level-intermediate { background: #FEF9C3; color: #854D0E; }
.level-advanced     { background: #FEE2E2; color: #991B1B; }

/* ── PRESS CARD ──────────────────────────────────────────────── */
.press-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: var(--transition);
}
.press-card:hover { box-shadow: var(--shadow); }

/* ── BRAND ASSET CARD ────────────────────────────────────────── */
.asset-card {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: var(--transition);
  background: var(--bg);
}
.asset-card:hover { border-color: var(--blue); background: var(--blue-light); }

/* ── GALLERY GRID ─────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item.wide { grid-column: span 2; aspect-ratio: 2/1; }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,61,98,.7);
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption { color: #fff; font-size: .78rem; font-weight: 500; line-height: 1.4; }
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--gray-100);
  text-align: center;
  padding: var(--space-4);
}

/* ── TIMELINE ─────────────────────────────────────────────────── */
.timeline { position: relative; max-width: 700px; margin: 0 auto; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}
.timeline-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); margin-bottom: var(--space-8); align-items: center; position: relative; }
.timeline-row::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--blue);
  transform: translate(-50%, -50%);
  z-index: 1;
}
.timeline-row.green-dot::before { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.timeline-row.gold-dot::before  { background: var(--gold);  box-shadow: 0 0 0 2px var(--gold); }
.timeline-left  { text-align: right; padding-right: calc(var(--space-8) + var(--space-3)); }
.timeline-right { padding-left:  calc(var(--space-8) + var(--space-3)); }
.timeline-year  { font-family: var(--font-display); font-size: 1.1rem; font-weight: 900; color: var(--blue); }
.timeline-year.green  { color: var(--green); }
.timeline-year.gold   { color: var(--gold); }
.timeline-note {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: .855rem;
  color: var(--text);
}
.timeline-note.green { background: var(--green-light); }
.timeline-note.gold  { background: var(--gold-light); }

/* ── DATA SEARCH ROW ──────────────────────────────────────────── */
.search-row { display: flex; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.search-row .form-control { max-width: 160px; padding: .55rem .85rem; }
.search-row input[type="text"] { flex: 1; min-width: 200px; }

/* ── ADMIN QUICK ACTION ───────────────────────────────────────── */
.quick-actions { display: flex; flex-direction: column; gap: var(--space-2); }
.quick-actions .btn { justify-content: flex-start; text-align: left; font-size: .855rem; }

/* ── ACTIVITY FEED ────────────────────────────────────────────── */
.activity-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .85rem;
  font-weight: 700;
}
.activity-body   { flex: 1; min-width: 0; }
.activity-title  { font-size: .855rem; font-weight: 500; color: var(--text); margin-bottom: .15rem; }
.activity-time   { font-size: .75rem; color: var(--text-muted); }

/* ── MINI BAR CHART LABEL ─────────────────────────────────────── */
.chart-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.chart-title { font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: var(--space-5); }

/* ── RESPONSIVE OVERRIDES ─────────────────────────────────────── */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 2; }
  .timeline::before { left: var(--space-5); }
  .timeline-row { grid-template-columns: 1fr; padding-left: calc(var(--space-10) + var(--space-3)); }
  .timeline-row::before { left: var(--space-5); transform: translateY(-50%); }
  .timeline-left { text-align: left; padding-right: 0; padding-left: 0; }
  .timeline-right { padding-left: 0; }
  .modal-box { padding: var(--space-6); }
  .search-row .form-control { max-width: 100%; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.wide { grid-column: span 1; aspect-ratio: 1; }
  .cert-card { flex-direction: column; }
}

@media (max-width: 700px) {
  .circles-intro { grid-template-columns: 1fr !important; text-align: center; }
  .circles-intro img { width: 110px !important; margin: 0 auto; }
}
