/* Imfashanyigisho page colors aligned with the IKIZAME blue-gray theme. */
:root {
  --brand: #0D47A1;
  --brand-dark: #0B3D91;
  --brand-light: #E3EFFA;
  --bg: #EAF0F6;
  --surface: #F8FAFC;
  --text: #1F2937;
  --muted: #64748B;
  --border: #D7E1EA;
  --site-ink: #1F2937;
  --site-green: #0D47A1;
  --site-green-dark: #0B3D91;
  --site-green-strong: #0D47A1;
  --site-green-soft: #E3EFFA;
  --site-bg: #EAF0F6;
  --site-surface: #F8FAFC;
  --site-border: #D7E1EA;
  --site-muted: #64748B;
  --site-shadow: 0 8px 24px rgba(31,60,90,.08);
}

html,
body {
  background: linear-gradient(180deg, #EAF1F7 0%, #F3F7FA 52%, #E8EFF5 100%);
  color: #1F2937;
}

/* Keep the existing navigation layout and emphasize its current-page link. */
.navbar {
  border-bottom-color: rgba(255,255,255,.14);
  background: #0D47A1;
  box-shadow: 0 2px 12px rgba(13,71,161,.12);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.navbar-brand,
.navbar-brand-wrap { color: #FFFFFF; }
.navbar-brand-wrap img { filter: drop-shadow(0 2px 6px rgba(187,222,251,.18)); }
.navbar .navbar-links a {
  border-color: transparent;
  background: transparent;
  color: #D6E4F2;
  box-shadow: none;
}
.navbar .navbar-links a i { color: #D6E4F2; }
.navbar .navbar-links a:hover:not(.active) {
  border-color: rgba(147, 197, 255, 0.22);
  background: rgba(30, 96, 190, 0.28);
  color: #FFFFFF;
  transform: none;
  box-shadow: inset 0 -2px 0 rgba(90, 160, 255, 0.95);
}
.navbar .navbar-links a:hover:not(.active) i,
.navbar .navbar-links a.active,
.navbar .navbar-links a.active i { color: #FFFFFF; }
.navbar .navbar-links a.active {
  border-color: rgba(154, 205, 255, 0.3);
  border-radius: 6px;
  background: rgba(36, 109, 220, 0.34);
  box-shadow: inset 0 -3px 0 #5ba8ff;
}
.navbar .navbar-links a:focus-visible { outline-color: #BBDEFB; }
.lang-badge {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #D6E4F2;
  box-shadow: none;
}
.mobile-menu-toggle {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
  color: #FFFFFF;
}

/* Give the title area a soft Imigongo texture without reducing text contrast. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid #D7E1EA;
  background: linear-gradient(135deg, #E7EFF6 0%, #F3F7FA 55%, #E1EAF3 100%);
  color: #1F2937;
  box-shadow: none;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  background-image:
    url('../images/imigongo-pattern.svg'),
    linear-gradient(135deg, transparent 49.8%, rgba(13,71,161,.12) 49.95%, rgba(13,71,161,.12) 50.05%, transparent 50.2%),
    linear-gradient(45deg, transparent 49.85%, rgba(21,101,192,.10) 49.96%, rgba(21,101,192,.10) 50.04%, transparent 50.15%),
    radial-gradient(circle, rgba(100,130,160,.18) 1px, transparent 1.7px);
  background-size: 180px 180px, 144px 144px, 144px 144px, 96px 96px;
  background-position: left 3% top 8%, left 0 top 0, left 72px top 72px, left 24px top 24px;
  background-repeat: repeat;
  mask-image: linear-gradient(90deg, #000 0%, #000 22%, transparent 78%);
}
.hero::after { background: radial-gradient(circle, rgba(21,101,192,.06) 0%, transparent 70%); }
.hero-icon {
  border: 1px solid #C9DCEB;
  background: #E3EFFA;
  color: #0D47A1;
}
.hero h1 { color: #1F2937; }
.hero p { color: #64748B; }

.main { color: #1F2937; }
.summary-stat,
.doc-card,
.skeleton-card {
  border-color: #D7E1EA;
  background: #F8FAFC;
  color: #1F2937;
  box-shadow: 0 8px 24px rgba(31,60,90,.08);
}
.summary-stat .label,
.summary-stat .value small,
.doc-info p { color: #64748B; }
.summary-stat .value,
.section-head h2,
.doc-info h3 { color: #1F2937; }
.section-head h2 i { color: #0D47A1; }
.doc-count-badge { background: #E3EFFA; color: #0D47A1; }
.filter-pill {
  border-color: #D7E1EA;
  background: #F8FAFC;
  color: #64748B;
}
.filter-pill:hover { border-color: #BFCFDF; background: #EEF5FB; color: #0D47A1; }
.filter-pill.active {
  border-color: #0D47A1;
  background: #0D47A1;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(13,71,161,.16);
}
.search-input {
  border-color: #D7E1EA;
  background: #F8FAFC;
  color: #1F2937;
}
.search-input:focus { border-color: #1565C0; box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
.search-clear { background: #E3EFFA; color: #0D47A1; }
.doc-card { transition: transform .2s, box-shadow .2s, border-color .2s; }
.doc-card:hover { border-color: #BFCFDF; box-shadow: 0 14px 30px rgba(31,60,90,.12); }
.doc-type-icon { background: #E3EFFA; color: #0D47A1; }
.icon-pdf { background: #FDECEC; color: #B42318; }
.icon-word { background: #E3EFFA; color: #1565C0; }
.icon-img { background: #E8F3EC; color: #15803D; }
.tag-pdf { background: #FDECEC; color: #B42318; }
.tag-word { background: #E3EFFA; color: #1565C0; }
.tag-read { background: #E8F3EC; color: #15803D; }
.tag-paid,
.pay-pill { background: #E3EFFA; color: #0D47A1; }

/* Paid resources remain visually distinct while using the same calm surfaces. */
.doc-card.paid {
  border-color: #B7D0E8;
  background: linear-gradient(160deg, #F8FAFC 0%, #EEF5FB 100%);
  box-shadow: 0 8px 24px rgba(31,60,90,.08);
}
.doc-card.paid:hover { border-color: #8FB2D3; box-shadow: 0 14px 30px rgba(31,60,90,.12); }
.doc-card.paid .doc-type-icon { background: #E3EFFA; color: #0D47A1; }
.doc-card.paid .doc-info h3 { color: #1F2937; }
.paid-badge {
  background: #0D47A1;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(13,71,161,.2);
}
.btn-read {
  background: #0D47A1;
  box-shadow: 0 6px 16px rgba(13,71,161,.16);
}
.btn-read:hover { background: #0B3D91; }
.btn-download {
  border-color: #CDE4D4;
  background: #E8F3EC;
  color: #166534;
  box-shadow: none;
}
.btn-download:hover { background: #DCEDE2; }
.btn-download.locked { border-color: #D7E1EA; background: #EEF2F6; color: #94A3B8; }
.btn-pay { background: #0D47A1; color: #FFFFFF; }
.btn-pay:hover { background: #0B3D91; }
.btn-secondary { border-color: #B7D0E8; background: #E3EFFA; color: #0D47A1; }
.btn-secondary:hover { background: #DCEAF7; }

/* Payment labels and controls follow the page palette; status text keeps its meaning. */
.resource-payment-panel { border-color: #D7E1EA; background: #EEF5FB; }
.resource-payment-panel .pay-form-label { color: #1F2937; }
.resource-payment-panel .pay-note { color: #64748B; }
.resource-payment-panel input,
.pay-modal-box input { border-color: #D7E1EA; color: #1F2937; }
.resource-payment-panel input:focus,
.pay-modal-box input:focus { border-color: #1565C0; box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
.pay-modal-box { border: 1px solid #D7E1EA; background: #F8FAFC; }
.pay-modal-title { color: #1F2937; }
.pay-modal-title i { color: #0D47A1; }
.pay-modal-price { background: #E3EFFA; color: #0D47A1; }
.pay-modal-actions .btn-pay { background: #0D47A1; }
.pay-modal-actions .btn-pay:hover { background: #0B3D91; }
.pay-modal-actions .btn-cancel { background: #E3EFFA; color: #334155; }
.pay-modal-status,
.resource-payment-panel .payment-status { color: #64748B; }
.skeleton-card { background: #F8FAFC; }
.skel { background-image: linear-gradient(90deg, #EEF2F6 25%, #D7E1EA 50%, #EEF2F6 75%); }
.empty-state i,
.no-results i { color: #B7C7D8; }
.empty-state h3,
.no-results p { color: #64748B; }

.site-footer,
footer {
  background: #0D47A1;
  color: #FFFFFF;
}
.site-footer h2,
.site-footer h3,
.site-footer-brand,
footer strong { color: #FFFFFF; }
.site-footer p,
.site-footer a,
footer a { color: #C9D9EA; }
.site-footer a:hover,
footer a:hover { color: #FFFFFF; }
.site-footer-bottom { border-top-color: rgba(214,228,242,.22); color: #C9D9EA; }

.study-plan-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid #B7D0E8;
  border-radius: 8px;
  background: #E3EFFA;
  color: #0D47A1;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.study-plan-print:hover { background: #DCEAF7; }
.study-plan-exam-date { margin: 0 0 14px; color: #334155; font-size: .9rem; font-weight: 700; }

.road-sign-explainer {
  width: min(100%, 980px);
  margin: 0 0 28px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #D7E1EA;
  border-radius: 8px;
  background: #F8FAFC;
  box-shadow: 0 8px 24px rgba(31,60,90,.06);
  scroll-margin-top: 20px;
}
.road-sign-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.road-sign-eyebrow { margin: 0 0 6px; color: #0D47A1; font-size: .7rem; font-weight: 800; }
.road-sign-heading h2 { margin: 0 0 8px; color: #1F2937; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.road-sign-heading p:not(.road-sign-eyebrow) { max-width: 650px; margin: 0; color: #64748B; font-size: .92rem; line-height: 1.6; }
.road-sign-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #B7D0E8;
  border-radius: 8px;
  background: #FFFFFF;
  color: #0D47A1;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}
.road-sign-share:hover { background: #E3EFFA; }
.road-sign-share-status { min-height: 1.25em; margin: 6px 0 10px; color: #166534; font-size: .82rem; font-weight: 700; }
.road-sign-categories { display: grid; gap: 14px; }
.road-sign-category { min-width: 0; padding: 16px; border: 1px solid #D7E1EA; border-radius: 6px; background: #FFFFFF; }
.road-sign-category h3 { margin: 0 0 6px; color: #1F2937; font-size: 1rem; }
.road-sign-category-description,
.road-sign-form,
.road-sign-asset-note { margin: 0 0 8px; color: #64748B; font-size: .87rem; line-height: 1.55; }
.road-sign-form { color: #475569; }
.road-sign-asset-note { margin: 10px 0 0; font-size: .8rem; }
.road-sign-examples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.road-sign-example { min-width: 0; padding: 10px; border: 1px solid #D7E1EA; border-radius: 6px; background: #F8FAFC; }
.road-sign-example img { display: block; width: 100%; height: 112px; object-fit: contain; object-position: center; margin: 0 auto 8px; background: #FFFFFF; }
.road-sign-example h4 { margin: 0 0 5px; color: #1F2937; font-size: .85rem; line-height: 1.35; }
.road-sign-example p { margin: 0; color: #64748B; font-size: .78rem; line-height: 1.45; }
.road-sign-practice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  margin-top: 16px;
  padding: 0 16px;
  border-radius: 6px;
  background: #166534;
  color: #FFFFFF;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}
.road-sign-practice:hover { background: #14532D; }

.paid-exam-cta { width: min(100%, 980px); margin: 0 0 28px; padding: clamp(20px, 3vw, 30px); border: 1px solid #B7D0E8; border-radius: 8px; background: linear-gradient(145deg, #EFF7FF, #FFFFFF); box-shadow: 0 8px 24px rgba(31,60,90,.06); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.paid-exam-cta-eyebrow { margin: 0 0 6px; color: #0D47A1; font-size: .7rem; font-weight: 800; }
.paid-exam-cta h2 { margin: 0 0 8px; color: #1F2937; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.paid-exam-cta p:not(.paid-exam-cta-eyebrow) { max-width: 650px; margin: 0; color: #64748B; font-size: .92rem; line-height: 1.6; }
.paid-exam-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex-shrink: 0; }
.paid-exam-cta-primary, .paid-exam-cta-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; border-radius: 6px; font-size: .9rem; font-weight: 800; text-decoration: none; }
.paid-exam-cta-primary { gap: 10px; background: #166534; color: #FFFFFF; }
.paid-exam-cta-primary:hover { background: #14532D; }
.paid-exam-cta-secondary { border: 1px solid #B7D0E8; background: #FFFFFF; color: #0D47A1; }
.paid-exam-cta-secondary:hover { background: #E3EFFA; }

@media (max-width: 600px) {
  .road-sign-explainer { padding: 18px 14px; }
  .road-sign-heading { flex-direction: column; }
  .road-sign-share { align-self: flex-start; }
  .road-sign-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road-sign-practice { width: 100%; text-align: center; }
  .paid-exam-cta { align-items: stretch; flex-direction: column; }
  .paid-exam-cta-actions { width: 100%; }
  .paid-exam-cta-primary, .paid-exam-cta-secondary { flex: 1; }
}

@media (max-width: 1024px) {
  .road-sign-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .road-sign-examples { grid-template-columns: minmax(0, 1fr); }
  .road-sign-example { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; align-items: start; }
  .road-sign-example img { grid-row: span 2; height: 88px; margin: 0; }
}

@media (max-width: 360px) {
  .road-sign-explainer { padding: 12px; }
  .road-sign-heading h2 { font-size: 1.12rem; }
  .road-sign-heading p:not(.road-sign-eyebrow) { font-size: .82rem; line-height: 1.45; }
  .road-sign-share-status { margin: 2px 0 6px; }
  .road-sign-category { padding: 10px; }
  .road-sign-category-description,
  .road-sign-form { font-size: .8rem; line-height: 1.45; }
  .road-sign-example { grid-template-columns: 76px minmax(0, 1fr); padding: 8px; column-gap: 8px; }
  .road-sign-example img { height: 76px; }
  .road-sign-example h4 { font-size: .8rem; }
  .road-sign-example p { font-size: .74rem; }
  .road-sign-practice { min-height: 44px; margin-top: 12px; padding: 0 10px; }
  .paid-exam-cta { padding: 14px 12px; }
  .paid-exam-cta h2 { font-size: 1.12rem; }
  .paid-exam-cta p:not(.paid-exam-cta-eyebrow) { font-size: .82rem; line-height: 1.45; }
  .paid-exam-cta-actions { flex-direction: column; }
  .paid-exam-cta-primary, .paid-exam-cta-secondary { width: 100%; }
}

@media print {
  @page { size: A4; margin: 14mm; }

  html,
  body {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    background: #FFFFFF !important;
    color: #111827 !important;
  }

  body { display: block !important; }
  body > * { display: none !important; }
  body .navbar,
  body .navbar.always-visible-nav,
  body .navbar.home-premium-nav.home-direct-nav,
  .hero,
  .pay-modal-overlay,
  footer { display: none !important; }
  body > main.main {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .main > * { display: none !important; }
  .main > .study-plan-panel {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
  }
  .study-plan-header,
  .study-plan-form,
  .study-plan-summary,
  .study-plan-print { display: none !important; }
  .study-plan-result,
  .study-plan-result[hidden] {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #FFFFFF !important;
    color: #111827 !important;
  }
  .study-plan-result h3,
  .study-plan-exam-date,
  .study-plan-day-date,
  .study-plan-day-title,
  .study-plan-day p { color: #111827 !important; }
  .study-plan-days { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .study-plan-day {
    break-inside: avoid;
    border-color: #CBD5E1 !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
  }
  .study-plan-day-meta span { background: #FFFFFF !important; color: #111827 !important; }
}

.paid-exam-cta { width: min(100%, 980px); margin: 0 0 28px; padding: clamp(20px, 3vw, 30px); border: 1px solid #B7D0E8; border-radius: 8px; background: linear-gradient(145deg, #EFF7FF, #FFFFFF); box-shadow: 0 8px 24px rgba(31,60,90,.06); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.paid-exam-cta-eyebrow { margin: 0 0 6px; color: #0D47A1; font-size: .7rem; font-weight: 800; }
.paid-exam-cta h2 { margin: 0 0 8px; color: #1F2937; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.paid-exam-cta p:not(.paid-exam-cta-eyebrow) { max-width: 650px; margin: 0; color: #64748B; font-size: .92rem; line-height: 1.6; }
.paid-exam-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex-shrink: 0; }
.paid-exam-cta-primary, .paid-exam-cta-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; border-radius: 6px; font-size: .9rem; font-weight: 800; text-decoration: none; }
.paid-exam-cta-primary { gap: 10px; background: #166534; color: #FFFFFF; }
.paid-exam-cta-primary:hover { background: #14532D; }
.paid-exam-cta-secondary { border: 1px solid #B7D0E8; background: #FFFFFF; color: #0D47A1; }
.paid-exam-cta-secondary:hover { background: #E3EFFA; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(21,101,192,.38);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .navbar .navbar-links a {
    border-color: transparent !important;
    background: transparent !important;
    color: #D6E4F2 !important;
    box-shadow: none !important;
  }
  .navbar .navbar-links a i { color: #D6E4F2 !important; }
  .navbar .navbar-links a:hover:not(.active) {
    border-color: rgba(255,255,255,.14) !important;
    background: rgba(255,255,255,.10) !important;
    color: #FFFFFF !important;
  }
  .navbar .navbar-links a:hover:not(.active) i,
  .navbar .navbar-links a.active,
  .navbar .navbar-links a.active i { color: #FFFFFF !important; }
  .navbar .navbar-links a.active {
    border-color: rgba(255,255,255,.18) !important;
    background: rgba(255,255,255,.12) !important;
  }
  .hero::before { opacity: .035; }
}
