/* ==========================================================================
   MwalimuFocus.Co.Ke - Enterprise Global UI Core Design System
   Provides global tooltips, toast notifications, loaders, info drawers,
   notification center dropdown, button spinners, and skeleton loaders.
   ========================================================================== */

:root {
  --mf-toast-z: 999999;
  --mf-tooltip-z: 999990;
  --mf-overlay-z: 999980;
  --mf-notif-z: 999950;
  --mf-loader-z: 1000000;
}

/* --------------------------------------------------------------------------
   1. GLOBAL TOP PROGRESS BAR / NANO-LOADER
   -------------------------------------------------------------------------- */
.mf-top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #116535 0%, #22c55e 50%, #0284c7 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8), 0 0 4px rgba(2, 132, 199, 0.6);
  z-index: var(--mf-loader-z);
  opacity: 0;
  pointer-events: none;
  transition: width 0.22s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.3s ease;
}

.mf-top-progress.is-active {
  opacity: 1;
}

.mf-top-progress.is-done {
  width: 100% !important;
  opacity: 0;
  transition: width 0.15s ease, opacity 0.35s ease 0.15s;
}

/* --------------------------------------------------------------------------
   2. GLOBAL TOAST NOTIFICATION CONTAINER & CARDS
   -------------------------------------------------------------------------- */
.mf-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: var(--mf-toast-z);
  max-width: 420px;
  width: calc(100vw - 32px);
  pointer-events: none;
}

.mf-toast-item {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 18px 14px 16px;
  box-shadow: 0 12px 30px -6px rgba(11, 28, 36, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.mf-toast-item.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.mf-toast-item.is-hiding {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.25s ease-in, opacity 0.2s ease-in;
}

/* Toast Icon Badge */
.mf-toast-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.mf-toast-icon-wrap svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

/* Toast Body */
.mf-toast-body {
  flex: 1;
  min-width: 0;
}

.mf-toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 3px 0;
  line-height: 1.35;
}

.mf-toast-message {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

/* Close Button */
.mf-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
  margin-left: 4px;
  margin-top: -2px;
}

.mf-toast-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.mf-toast-close svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

/* Progress countdown line */
.mf-toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  border-radius: 0 0 12px 12px;
}

/* Toast Variants */
.mf-toast--success .mf-toast-icon-wrap {
  background: #dcfce7;
  color: #15803d;
}
.mf-toast--success .mf-toast-progress-bar {
  background: #22c55e;
}
.mf-toast--success {
  border-left: 4px solid #16a34a;
}

.mf-toast--error .mf-toast-icon-wrap {
  background: #fee2e2;
  color: #b91c1c;
}
.mf-toast--error .mf-toast-progress-bar {
  background: #ef4444;
}
.mf-toast--error {
  border-left: 4px solid #dc2626;
}

.mf-toast--warning .mf-toast-icon-wrap {
  background: #fef3c7;
  color: #b45309;
}
.mf-toast--warning .mf-toast-progress-bar {
  background: #f59e0b;
}
.mf-toast--warning {
  border-left: 4px solid #d97706;
}

.mf-toast--info .mf-toast-icon-wrap {
  background: #e0f2fe;
  color: #0369a1;
}
.mf-toast--info .mf-toast-progress-bar {
  background: #0284c7;
}
.mf-toast--info {
  border-left: 4px solid #0284c7;
}

/* --------------------------------------------------------------------------
   3. GLOBAL TOOLTIP SYSTEM
   -------------------------------------------------------------------------- */
.mf-tooltip-bubble {
  position: fixed;
  z-index: var(--mf-tooltip-z);
  background: #0f172a;
  color: #f8fafc;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 260px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.mf-tooltip-bubble.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Tooltip Arrow */
.mf-tooltip-bubble::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: #0f172a;
  transform: rotate(45deg);
}

.mf-tooltip-bubble[data-pos="top"]::after {
  bottom: -3px;
  left: calc(50% - 3px);
}

.mf-tooltip-bubble[data-pos="bottom"]::after {
  top: -3px;
  left: calc(50% - 3px);
}

.mf-tooltip-bubble[data-pos="left"]::after {
  right: -3px;
  top: calc(50% - 3px);
}

.mf-tooltip-bubble[data-pos="right"]::after {
  left: -3px;
  top: calc(50% - 3px);
}

/* --------------------------------------------------------------------------
   4. IN-APP NOTIFICATION BELL & DROPDOWN
   -------------------------------------------------------------------------- */
.mf-notif-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mf-notif-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.12s ease;
}

.mf-notif-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.mf-notif-btn:active {
  transform: scale(0.95);
}

.mf-notif-btn svg {
  width: 18px;
  height: 18px;
}

.mf-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b343d;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.5);
  animation: mfBadgePulse 2s infinite;
}

@keyframes mfBadgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Notification Dropdown Menu */
.mf-notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  z-index: var(--mf-notif-z);
  overflow: hidden;
  display: none;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mf-notif-dropdown.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mf-notif-head {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mf-notif-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.mf-notif-mark-read {
  font-size: 11.5px;
  font-weight: 700;
  color: #116535;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.mf-notif-list {
  max-height: 360px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mf-notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.mf-notif-item:hover {
  background: #f8fafc;
}

.mf-notif-item.is-unread {
  background: #f0fdf4;
}

.mf-notif-item.is-unread:hover {
  background: #e6fbf0;
}

.mf-notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.mf-notif-item-icon.icon-exam {
  background: #fee2e2;
  color: #b91c1c;
}

.mf-notif-item-icon.icon-scheme {
  background: #dcfce7;
  color: #15803d;
}

.mf-notif-item-icon.icon-payment {
  background: #e0f2fe;
  color: #0369a1;
}

.mf-notif-item-body {
  flex: 1;
}

.mf-notif-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  line-height: 1.35;
}

.mf-notif-item-text {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 4px;
}

.mf-notif-item-time {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
}

.mf-notif-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.mf-notif-footer a {
  font-size: 12px;
  font-weight: 700;
  color: #116535;
  text-decoration: none;
}

.mf-notif-footer a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   5. BUTTON SPINNERS & SKELETON LOADERS
   -------------------------------------------------------------------------- */
.mf-btn-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.mf-btn-loading > * {
  visibility: hidden !important;
}

.mf-btn-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: calc(50% - 9px);
  left: calc(50% - 9px);
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: mfSpin 0.75s linear infinite;
}

.mf-btn-outline-cart.mf-btn-loading::after {
  border: 2.5px solid rgba(15, 23, 42, 0.2);
  border-top-color: #0f172a;
}

@keyframes mfSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Skeleton Loading Elements */
.mf-skeleton {
  background: #e2e8f0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: mfShimmer 1.5s infinite linear;
  border-radius: 6px;
}

@keyframes mfShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mf-skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.mf-skeleton-title {
  height: 22px;
  margin-bottom: 12px;
  width: 70%;
  border-radius: 4px;
}

.mf-skeleton-card {
  height: 220px;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   6. GLOBAL FULLSCREEN / CONTAINER OVERLAY LOADER
   -------------------------------------------------------------------------- */
.mf-overlay-loader {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 36, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--mf-overlay-z);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.mf-overlay-loader.is-active {
  display: flex;
  opacity: 1;
}

.mf-overlay-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mf-overlay-loader.is-active .mf-overlay-card {
  transform: scale(1);
}

.mf-overlay-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #dcfce7;
  border-top-color: #116535;
  border-radius: 50%;
  animation: mfSpin 0.8s linear infinite;
  margin: 0 auto 18px auto;
}

.mf-overlay-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.mf-overlay-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   7. "MORE INFO" COMPACT POPOVER (Floating micro-dialog, auto-dismiss)
   -------------------------------------------------------------------------- */
.mf-more-info-popover {
  position: fixed;
  z-index: 1080;
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.mf-more-info-popover.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mf-more-info-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.mf-more-info-head {
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mf-more-info-head-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mf-more-info-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.2;
}

.mf-more-info-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}

.mf-more-info-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.mf-more-info-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.mf-more-info-body {
  padding: 11px 13px;
  overflow-y: auto;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.mf-more-info-body p {
  margin: 0 0 8px 0;
}

.mf-more-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mf-more-info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.4;
}

.mf-more-info-item-icon {
  width: 14px;
  height: 14px;
  color: #0f766e;
  flex-shrink: 0;
  margin-top: 1px;
}

.mf-more-info-item strong {
  color: #0f172a;
  font-weight: 700;
}

/* Monochromatic neutral rubric pill (replaces multi-color EE/ME/AE/BE) */
.mf-more-info-rubric {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
  text-align: center;
  min-width: 24px;
  line-height: 1.3;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

/* Legacy fallback: disable heavy fullscreen overlay */
.mf-more-info-overlay {
  display: none !important;
}

/* Inline More Info Trigger Badge */
.mf-info-pill-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mf-info-pill-trigger:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.mf-info-pill-trigger.is-active {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.mf-info-pill-trigger svg {
  width: 13px;
  height: 13px;
  color: #0f766e;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. ENTERPRISE M-PESA STK PUSH MODAL (GLOBAL)
   -------------------------------------------------------------------------- */
.mf-stk-modal,
.mf-enterprise-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 36, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--mf-overlay-z);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.mf-stk-modal.is-active,
.mf-enterprise-modal-overlay.is-active {
  display: flex;
  opacity: 1;
}

.mf-stk-modal-card,
.mf-enterprise-modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 32px 24px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mf-stk-modal.is-active .mf-stk-modal-card,
.mf-enterprise-modal-overlay.is-active .mf-enterprise-modal-card {
  transform: scale(1);
}

.mf-stk-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mf-stk-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Radar Pulse Indicator */
.mf-stk-radar-pulse {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px auto;
}

.mf-radar-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.25);
  animation: mfRadarPulse 1.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mf-radar-wave:nth-child(2) {
  animation-delay: 0.5s;
}

.mf-radar-center {
  position: absolute;
  inset: 12px;
  background: #116535;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(17, 101, 53, 0.3);
}

.mf-radar-center svg {
  width: 24px;
  height: 24px;
}

@keyframes mfRadarPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.mf-stk-badge {
  display: inline-block;
  background: #e6fbf0;
  color: #116535;
  border: 1px solid #bbf7d0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.mf-stk-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.mf-stk-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.mf-stk-phone-preview {
  background: #0f172a;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #ffffff;
  text-align: left;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mf-preview-header {
  font-size: 11px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.mf-preview-body {
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.45;
}

.mf-preview-body strong {
  color: #facc15;
}

.mf-stk-amount-pill {
  display: inline-block;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 999px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.mf-stk-countdown-pill {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
  border: 1px solid #fde68a;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .mf-toast-container {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }
  .mf-notif-dropdown {
    position: fixed;
    top: 60px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}

/* ==========================================================================
   10. LEGAL & INFORMATIONAL DOCUMENT PAGES (Terms, Privacy, Refund, About, Contact, Copyright)
   ========================================================================== */
.mf-doc-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 44px 0 38px 0;
  position: relative;
}

.mf-doc-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.mf-doc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 14px;
}

.mf-doc-breadcrumbs a {
  color: #116535;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.mf-doc-breadcrumbs a:hover {
  color: #0b4e44;
  text-decoration: underline;
}

.mf-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8fbe9;
  color: #116535;
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.mf-doc-title {
  font-size: 32px;
  font-weight: 800;
  color: #0b343d;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.mf-doc-subtitle {
  font-size: 15px;
  color: #475569;
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.mf-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 12.5px;
  color: #64748b;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.mf-doc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mf-doc-meta-item svg {
  width: 14px;
  height: 14px;
  color: #116535;
}

/* Page Body Layout */
.mf-doc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 0 60px 0;
}

@media (max-width: 960px) {
  .mf-doc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 40px 0;
  }
}

/* Sticky Sidebar */
.mf-doc-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mf-doc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.05);
}

.mf-doc-card-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mf-doc-card-title svg {
  width: 16px;
  height: 16px;
  color: #116535;
}

.mf-doc-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-doc-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mf-doc-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: translateX(2px);
}

.mf-doc-nav-link.is-active {
  background: #e8fbe9;
  color: #116535;
  font-weight: 700;
  border-left: 3px solid #116535;
}

.mf-doc-nav-sublist {
  list-style: none;
  margin: 4px 0 4px 16px;
  padding-left: 10px;
  border-left: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mf-doc-nav-sublink {
  font-size: 12.5px;
  color: #64748b;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  display: block;
  transition: all 0.12s;
}

.mf-doc-nav-sublink:hover {
  color: #116535;
  background: #f8fafc;
}

/* Main Content Article */
.mf-doc-article {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px 42px;
  box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.05);
  line-height: 1.7;
  color: #334155;
  font-size: 15px;
}

@media (max-width: 640px) {
  .mf-doc-article {
    padding: 24px 18px;
    border-radius: 12px;
  }
}

.mf-doc-section {
  margin-bottom: 38px;
  scroll-margin-top: 100px;
}

.mf-doc-section:last-child {
  margin-bottom: 0;
}

.mf-doc-h2 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mf-doc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e8fbe9;
  color: #116535;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.mf-doc-h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: #1e293b;
  margin: 22px 0 10px 0;
}

.mf-doc-p {
  margin-bottom: 16px;
  color: #334155;
}

.mf-doc-list {
  margin: 0 0 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mf-doc-list li {
  padding-left: 4px;
}

.mf-doc-callout {
  border-radius: 10px;
  padding: 18px 20px;
  margin: 22px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
}

.mf-doc-callout svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.mf-doc-callout.is-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #116535;
  color: #166534;
}

.mf-doc-callout.is-warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.mf-doc-callout.is-accent {
  background: #ecfeff;
  border: 1px solid #cffafe;
  border-left: 4px solid #0891b2;
  color: #155e75;
}

.mf-doc-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.mf-doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.mf-doc-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.mf-doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}

.mf-doc-table tr:last-child td {
  border-bottom: none;
}

.mf-doc-table tr:nth-child(even) td {
  background: #fafafa;
}

/* Contact Cards Grid */
.mf-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.mf-contact-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mf-contact-card:hover {
  border-color: #116535;
  box-shadow: 0 8px 24px -4px rgba(17, 101, 53, 0.12);
  transform: translateY(-2px);
}

.mf-contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.mf-contact-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.mf-contact-card-val {
  font-size: 14.5px;
  font-weight: 700;
  color: #116535;
  text-decoration: none;
  margin-bottom: 6px;
  display: inline-block;
}

.mf-contact-card-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
}

/* About Us Metrics Grid */
.mf-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.mf-stat-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

.mf-stat-num {
  font-size: 34px;
  font-weight: 800;
  color: #116535;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.mf-stat-label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.mf-stat-desc {
  font-size: 12px;
  color: #64748b;
}

/* Pillars grid */
.mf-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.mf-pillar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.18s ease;
}

.mf-pillar-card:hover {
  border-color: #0d9488;
  box-shadow: 0 6px 18px -3px rgba(13, 148, 136, 0.1);
}

.mf-pillar-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.mf-pillar-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.mf-pillar-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* ==========================================================================
   KMTC RESOURCES LANDING PAGE
   Custom 3-column category card layout
   ========================================================================== */

.mf-kmtc-landing {
  padding: 32px 0 64px;
}

.mf-kmtc-header {
  text-align: center;
  margin: 16px 0 36px;
}

.mf-kmtc-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
}

.mf-kmtc-flag {
  color: #116535;
}

.mf-kmtc-subtitle {
  font-size: 15px;
  color: #374151;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.65;
}

/* 3-column card grid */
.mf-kmtc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

/* 2-column variant for faculty-level pages */
.mf-kmtc-grid--2col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}


@media (max-width: 860px) {
  .mf-kmtc-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 600px) and (max-width: 860px) {
  .mf-kmtc-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

/* Individual card */
.mf-kmtc-card {
  background: #f0fdff;
  border: 1.5px solid #b2ebf2;
  border-radius: 14px;
  padding: 24px 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.mf-kmtc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -6px rgba(0, 131, 143, 0.18);
  border-color: #00acc1;
  background: #e0f7fa;
  text-decoration: none;
  color: inherit;
}

.mf-kmtc-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mf-kmtc-card-text {
  flex: 1;
  min-width: 0;
}

.mf-kmtc-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.35;
}

.mf-kmtc-card-desc {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.55;
  margin: 0;
}

.mf-kmtc-card-icon {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mf-kmtc-card-icon svg {
  display: block;
}

/* SEO info block below cards */
.mf-kmtc-seo-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 820px;
  margin: 0 auto;
}

.mf-kmtc-seo-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}

.mf-kmtc-seo-block p {
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 10px;
}

.mf-kmtc-seo-block p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   ENTERPRISE MODERN FORM CONTROL SYSTEM (GLOBAL UI CORE)
   Universal polished styling for textareas, emails, phone numbers,
   selects, passwords, numbers, and inputs across MwalimuFocus
   ========================================================================== */

.mf-form-group {
  margin-bottom: 20px;
  position: relative;
}

.mf-form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.mf-form-label .mf-req,
.mf-form-label span.req {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

.mf-form-hint {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 5px;
  line-height: 1.45;
}

/* Universal Modern Input, Textarea, and Select Styles */
.mf-form-input,
.mf-form-textarea,
.mf-form-select,
.mf-input-control,
.mf-vinput,
.mf-vtextarea,
.mf-checkout-input,
.mf-field-input,
input[type="text"]:not(.mf-search-input):not(.mf-search-text-input):not(.mf-browse-search-input):not(.mf-drawer-search-input),
input[type="email"]:not(.mf-newsletter-input),
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"]:not(.mf-search-input):not(.mf-search-text-input):not(.mf-browse-search-input):not(.mf-drawer-search-input),
input[type="url"],
textarea:not(.mf-legacy-textarea),
select.mf-modern-select {
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: #0f172a;
  box-sizing: border-box;
  outline: none;
  line-height: 1.4;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

/* Hover state */
.mf-form-input:hover,
.mf-form-textarea:hover,
.mf-form-select:hover,
.mf-input-control:hover,
.mf-vinput:hover,
.mf-vtextarea:hover,
.mf-checkout-input:hover,
.mf-field-input:hover,
input[type="text"]:not(.mf-search-input):not(.mf-search-text-input):not(.mf-browse-search-input):not(.mf-drawer-search-input):hover,
input[type="email"]:not(.mf-newsletter-input):hover,
input[type="tel"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="search"]:not(.mf-search-input):not(.mf-search-text-input):not(.mf-browse-search-input):not(.mf-drawer-search-input):hover,
textarea:hover:not(.mf-legacy-textarea) {
  border-color: #94a3b8;
}

/* Modern Active Focus State (Brand Forest Green Focus Ring) */
.mf-form-input:focus,
.mf-form-textarea:focus,
.mf-form-select:focus,
.mf-input-control:focus,
.mf-vinput:focus,
.mf-vtextarea:focus,
.mf-checkout-input:focus,
.mf-field-input:focus,
input[type="text"]:not(.mf-search-input):not(.mf-search-text-input):not(.mf-browse-search-input):not(.mf-drawer-search-input):focus,
input[type="email"]:not(.mf-newsletter-input):focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:not(.mf-search-input):not(.mf-search-text-input):not(.mf-browse-search-input):not(.mf-drawer-search-input):focus,
textarea:focus:not(.mf-legacy-textarea) {
  outline: none;
  border-color: #166534;
  box-shadow: 0 0 0 3.5px rgba(22, 101, 52, 0.14);
  background-color: #ffffff;
}

/* Modern Placeholder */
.mf-form-input::placeholder,
.mf-form-textarea::placeholder,
.mf-input-control::placeholder,
.mf-vinput::placeholder,
.mf-vtextarea::placeholder,
.mf-checkout-input::placeholder,
.mf-field-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

/* Disabled & Readonly */
.mf-form-input:disabled,
.mf-form-textarea:disabled,
input:disabled,
textarea:disabled,
.mf-form-input[readonly],
textarea[readonly] {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   SPECIALIZED TEXTAREA STYLING
   -------------------------------------------------------------------------- */
.mf-form-textarea,
.mf-vtextarea,
textarea {
  height: auto !important;
  min-height: 110px;
  padding: 12px 15px;
  line-height: 1.55;
  resize: vertical;
  border-radius: 9px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

textarea::-webkit-scrollbar {
  width: 6px;
}
textarea::-webkit-scrollbar-track {
  background: transparent;
}
textarea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
textarea::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------------------------------
   SPECIALIZED PHONE NUMBER INPUT STYLING
   Formatted for Kenyan M-Pesa Numbers (07XX / 01XX / +254)
   -------------------------------------------------------------------------- */
.mf-phone-input,
input[type="tel"],
input[name*="phone"],
input[id*="phone"] {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.35px;
}

/* Phone input with country / carrier prefix */
.mf-phone-wrap,
.mf-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.mf-phone-prefix,
.mf-input-prefix {
  position: absolute;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #166534;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}

.mf-phone-wrap .mf-form-input,
.mf-phone-wrap input,
.mf-phone-wrap .mf-form-input.has-prefix,
.mf-phone-wrap input[type="tel"],
.mf-input-wrapper .mf-form-input,
.mf-input-wrapper input[type="tel"] {
  padding-left: 78px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.35px;
}

/* --------------------------------------------------------------------------
   SPECIALIZED EMAIL INPUT STYLING
   -------------------------------------------------------------------------- */
input[type="email"],
.mf-input-email {
  letter-spacing: -0.01em;
}

/* Input Icon Wrappers (Email, Phone, Search, Password) */
.mf-input-icon-wrap,
.mf-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.mf-input-icon-wrap .mf-form-input,
.mf-input-icon-wrap input,
.mf-input-with-icon .mf-form-input,
.mf-input-with-icon input {
  width: 100%;
}

/* When has leading icon, pad left */
.mf-input-icon-wrap.has-leading-icon .mf-form-input,
.mf-input-icon-wrap.has-leading-icon input,
.mf-input-icon-wrap .mf-leading-icon + input,
.mf-input-icon-wrap .mf-leading-icon + .mf-form-input,
.mf-input-icon-wrap .mf-form-input.has-icon,
.mf-input-icon-wrap input.has-icon {
  padding-left: 42px !important;
  padding-right: 14px;
}

.mf-input-icon,
.mf-trailing-icon {
  position: absolute;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #166534;
  pointer-events: none;
  z-index: 2;
}

.mf-input-icon svg,
.mf-trailing-icon svg {
  width: 18px;
  height: 18px;
}

.mf-leading-icon {
  position: absolute;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.mf-leading-icon svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   SELECT DROPDOWNS (Modern Custom Chevron)
   -------------------------------------------------------------------------- */
select,
.mf-form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 40px !important;
  cursor: pointer;
}

select:focus,
.mf-form-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   DTE PP&P (Diploma in Teacher Education Pre-Primary & Primary) Resources
   Exact match to official MwalimuFocus design screenshot
   -------------------------------------------------------------------------- */
.mf-dte-page {
  padding: 24px 0 64px;
}

.mf-dte-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 4px 0 22px;
  color: #64748b;
  font-weight: 500;
}

.mf-dte-breadcrumb a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.mf-dte-breadcrumb a:hover {
  color: #0369a1;
  text-decoration: underline;
}

.mf-dte-breadcrumb-sep {
  color: #64748b;
  font-size: 14px;
  user-select: none;
  font-weight: 500;
}

.mf-dte-breadcrumb-current {
  color: #64748b;
  font-weight: 500;
}

.mf-dte-heading {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  line-height: 1.25;
}

.mf-dte-subtitle {
  font-size: 14.5px;
  line-height: 1.65;
  color: #334155;
  max-width: 1100px;
  margin: 0 0 32px;
}

.mf-dte-subtitle strong {
  font-weight: 700;
  color: #0f172a;
}

/* 3-Card Grid Matching Screenshot */
.mf-dte-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}

@media (max-width: 960px) {
  .mf-dte-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (min-width: 640px) and (max-width: 960px) {
  .mf-dte-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* DTE Card Base */
.mf-dte-card {
  background: #e6f9f6;
  border: 1px solid #c8f2ea;
  border-radius: 16px;
  padding: 24px 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.04);
}

.mf-dte-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(13, 148, 136, 0.18);
  border-color: #9de3d4;
  background-color: #daf5ef;
  text-decoration: none;
  color: inherit;
}

.mf-dte-card-content {
  flex: 1;
  min-width: 0;
  padding-right: 6px;
}

.mf-dte-card-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  line-height: 1.3;
}

.mf-dte-card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
  margin: 0;
}

.mf-dte-card-graphic {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mf-dte-card-graphic svg {
  width: 100%;
  height: 100%;
  max-width: 80px;
  max-height: 80px;
  display: block;
}

/* Filter Bar & Tabs */
.mf-dte-filters-wrap {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.mf-dte-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mf-dte-tab-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mf-dte-tab-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  text-decoration: none;
}

.mf-dte-tab-btn.active {
  background: #116535;
  border-color: #116535;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(17, 101, 53, 0.2);
}

.mf-dte-search-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mf-dte-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mf-dte-search-input:focus {
  border-color: #116535;
  box-shadow: 0 0 0 3px rgba(17, 101, 53, 0.12);
}

.mf-dte-search-submit {
  background: #116535;
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.mf-dte-search-submit:hover {
  background: #0d502a;
}

/* Curriculum Outline Section */
.mf-dte-curriculum-overview {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px;
  margin-top: 48px;
}

.mf-dte-curriculum-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
}

.mf-dte-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.mf-dte-unit-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.mf-dte-unit-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

.mf-dte-unit-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   DTE PP&P Curriculum Designs View (Exact match to design screenshot)
   -------------------------------------------------------------------------- */
.mf-dte-cd-page {
  padding: 24px 0 64px;
}

.mf-dte-cd-title {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 8px 0 14px;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.mf-dte-cd-subtitle {
  font-size: 15px;
  line-height: 1.65;
  color: #334155;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 36px;
}

.mf-dte-cd-subtitle strong {
  font-weight: 700;
  color: #0f172a;
}

/* 4-Card Responsive Grid */
.mf-dte-cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

@media (max-width: 1140px) {
  .mf-dte-cd-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .mf-dte-cd-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 500px) {
  .mf-dte-cd-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Individual Card (Pale Mint/Aqua Base) */
.mf-dte-cd-card {
  background: #e6f9f6;
  border: 1px solid #c4ede3;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.mf-dte-cd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px -6px rgba(13, 148, 136, 0.18);
  border-color: #9fe5d6;
}

/* Card Header (Subject Tag / Pill) */
.mf-dte-cd-header {
  padding: 13px 12px;
  text-align: center;
  border-bottom: 1px solid #c4ede3;
  background: rgba(255, 255, 255, 0.35);
}

.mf-dte-cd-subject {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: 0.3px;
}

/* Card Body (Title & Price) */
.mf-dte-cd-body {
  padding: 18px 14px 14px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mf-dte-cd-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #1d4ed8;
  margin: 0 0 12px;
  line-height: 1.35;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mf-dte-cd-card-title a {
  color: #1d4ed8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mf-dte-cd-card-title a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.mf-dte-cd-price-row {
  font-size: 13.5px;
  color: #334155;
  margin: 0 0 16px;
  font-weight: 500;
}

.mf-dte-cd-price-old {
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 5px;
  font-weight: 400;
}

/* Actions Section (Bottom Buttons) */
.mf-dte-cd-actions {
  background: #daf5ee;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #c4ede3;
}

.mf-dte-btn-buy,
.mf-dte-btn-cart {
  min-width: 130px;
  width: auto;
  padding: 7px 16px;
  background: #eefbf8;
  border: 1.5px solid #334155;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  box-sizing: border-box;
}

.mf-dte-btn-buy:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.mf-dte-btn-cart:hover {
  background: #116535;
  color: #ffffff;
  border-color: #116535;
  box-shadow: 0 2px 6px rgba(17, 101, 53, 0.2);
}

/* ==========================================================================
   EMERALD GREEN IN-CART BUTTONS & CARDS
   Exact match to user requirement:
   "If a user clicks 'add to cart', the items should turn into emerald green
   and display 'Remove from cart'. The addition to cart should play a sound
   when you click 'add to cart'"
   ========================================================================== */
.mf-dte-btn-cart.is-in-cart,
.mf-search-btn-cart.is-in-cart,
.mf-card-btn.is-in-cart,
.mf-card-btn--file.is-in-cart,
.mf-btn-secondary.is-in-cart,
.mf-btn-outline-cart.is-in-cart,
.add-to-cart-form button.is-in-cart,
#addToCartBtn.is-in-cart,
button.is-in-cart {
  background: #059669 !important;
  background-color: #059669 !important;
  border: 1.5px solid #047857 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.4) !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mf-dte-btn-cart.is-in-cart:hover,
.mf-search-btn-cart.is-in-cart:hover,
.mf-card-btn.is-in-cart:hover,
.mf-card-btn--file.is-in-cart:hover,
.mf-btn-secondary.is-in-cart:hover,
.mf-btn-outline-cart.is-in-cart:hover,
.add-to-cart-form button.is-in-cart:hover,
#addToCartBtn.is-in-cart:hover,
button.is-in-cart:hover {
  background: #047857 !important;
  background-color: #047857 !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.5) !important;
  transform: translateY(-1px);
}

.mf-dte-btn-cart.is-in-cart:active,
.mf-search-btn-cart.is-in-cart:active,
.mf-card-btn.is-in-cart:active,
#addToCartBtn.is-in-cart:active,
button.is-in-cart:active {
  transform: translateY(1px);
}

/* Card Container Turn Emerald Green */
.mf-dte-cd-card.is-in-cart,
.mf-search-card.is-in-cart,
.mf-product-card.is-in-cart,
.exam-card.is-in-cart {
  border-color: #10b981 !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.16), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Badge Pulse Feedback on Cart Add (Matches live mwalimufocus.co.ke) */
@keyframes mfBadgePulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); background-color: #059669 !important; color: #ffffff !important; }
  100% { transform: scale(1); }
}

.mf-cart-badge.is-pulsing,
.custom-cart-badge.is-pulsing,
#headerCartCount.is-pulsing,
#headerMobileCartCount.is-pulsing {
  animation: mfBadgePulse 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}




