/* ==========================================================================
   BAKR — Scholarship directory (page-specific styles only)
   Navbar, footer, buttons, hero and design tokens live in the shared files:
   bakr-core.css, bakr-layout.css, bakr-pages.css. Loaded after those.
   Sections: shelf (sector filter), search bar, directory cards, scholarship modals.
   ========================================================================== */

:root {
  --warm-white: #fdfbf8;
  /* Directory surfaces and ink (the shared palette is in bakr-core.css) */
  --sd-green-900: #1e3b2a;
  --sd-green-700: #29553b;
  --sd-surface: #fffefa;
  --sd-vanilla: #fbf7ee;
  --sd-sage-tint: #eaf0e8;
  --sd-amber-tint: #fbeada;
  --sd-teal: #2d6470;
  --sd-teal-tint: #e6f0f1;
  --sd-border: #e6dfc9;
  --sd-ink: #23281f;
  --sd-ink-soft: #42483e;
  --ui-radius-card: 18px;
  --ui-radius-control: 10px;
}

/* ---------------------------- 5. PAGE LAYOUT ---------------------------- */
.directory-wrap { padding: 36px 0 2.5rem; }
.library-sidebar { margin-bottom: 20px; }
@media (min-width: 992px) {
  .library-sidebar { margin-bottom: 26px; }
  .tab-content,
  .tab-pane { min-height: 430px; } /* stops the page jumping when a short tab is selected */
}

/* ------------------------ 6. SHELF (SECTOR FILTER) ---------------------- */
.shelf-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 22px 16px 20px;
  border: 0;
  border-radius: 0 20px 0 20px;
  background: linear-gradient(145deg, var(--sd-green-700) 0%, var(--sd-green-900) 100%);
  box-shadow: 0 18px 40px -26px rgba(30, 59, 42, 0.48);
}
.shelf-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.shelf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 0 12px 0 12px;
  background: linear-gradient(150deg, var(--gold-light), var(--gold));
  color: var(--sd-green-900);
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(184, 145, 47, 0.35);
}
.shelf-icon svg { width: 20px; height: 20px; }
.shelf-heading h2 { margin: 0; font-size: var(--text-md); font-weight: 700; color: var(--sd-vanilla); }
.shelf-heading p  { margin: 2px 0 0; font-size: var(--text-caption); color: rgba(251, 247, 238, 0.72); }
.shelf-vertical-divider { display: none; }

.sector-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sector-tabs .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 210px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--sd-vanilla);
  text-align: left;
  transition: background .2s ease, border-color .2s ease;
}
.sector-tabs .nav-link i {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(234, 240, 232, 0.14);
  color: var(--gold-light);
  font-size: 17px;
}
.sector-tabs .nav-link i svg { width: 18px; height: 18px; }
.sector-tabs .nav-link strong { display: block; font-size: var(--text-sm); font-weight: 700; color: var(--sd-vanilla); }
.sector-tabs .nav-link small  { display: block; font-size: var(--text-xs); font-weight: 500; color: rgba(251, 247, 238, 0.72); }
.sector-tabs .nav-link:hover {
  background: rgba(253, 251, 248, 0.1);
  border-color: rgba(253, 251, 248, 0.16);
}
.sector-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.28);
}
.sector-tabs .nav-link.active i      { background: rgba(255, 255, 255, 0.58); color: var(--green-900); }
.sector-tabs .nav-link.active strong { color: var(--green-900); }
.sector-tabs .nav-link.active small  { color: var(--sd-green-900, #143a2b); }

/* Desktop: the shelf becomes one horizontal bar */
@media (min-width: 992px) {
  .shelf-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 132px;
    padding: 1.25rem 1.5rem;
  }
  .shelf-heading { flex: 0 0 230px; margin: 0; }
  .shelf-vertical-divider {
    display: block;
    align-self: stretch;
    width: 1px;
    background: rgba(251, 247, 238, 0.16);
  }
  .sector-tabs { flex: 1 1 auto; flex-wrap: nowrap; align-items: stretch; gap: .75rem; min-width: 0; }
  .sector-tabs .nav-link { flex: 1 1 0; width: auto; min-height: 72px; }
}
@media (max-width: 575.98px) {
  .sector-tabs { display: grid; grid-template-columns: 1fr; }
}

/* ------------------------------ 7. SEARCH BAR --------------------------- */
.directory-tools {
  width: 100%;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #d8bd70;
  border-radius: var(--ui-radius-card);
  background: linear-gradient(135deg, var(--sd-surface) 0%, #f4f0e5 100%);
  box-shadow: 0 12px 28px rgba(20, 58, 43, 0.07);
}
.directory-search {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d8bd70;
  border-radius: 13px;
  background: #fff;
}
.directory-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 .2rem rgba(184, 145, 47, 0.18);
}
.directory-search-icon {
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  font-size: 18px;
  color: #a77d19;
}
.directory-search-icon svg { width: 1.1em; height: 1.1em; }
.directory-search .form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  padding: 14px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: var(--text-md);
  color: var(--sd-green-900);
  text-overflow: ellipsis;
}
.directory-search .form-control:focus,
.directory-search .form-control:focus-visible { outline: 0; box-shadow: none; }
.directory-search .form-control::-webkit-search-cancel-button { display: none; }
.directory-search-clear {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  align-self: center;
  width: 38px;
  height: 38px;
  margin-right: 8px;
  padding: 0;
  border: 1px solid var(--sd-border);
  border-radius: var(--ui-radius-control);
  background: #f8f3e6;
  color: var(--sd-green-900);
}
.directory-search-clear:hover { background: var(--gold-light); border-color: var(--gold); }
.directory-search-clear svg { width: 14px; height: 14px; }
.directory-tool-meta {
  margin-top: 12px;
  font-size: var(--text-caption);
  color: var(--sd-ink-soft);
}
.directory-tool-meta svg { width: 1em; height: 1em; color: #a77d19; }

@media (max-width: 575.98px) {
  .directory-tools { padding: 10px; border-radius: 14px; }
  .directory-search { border-radius: 11px; }
  .directory-search-icon { padding: 0 6px 0 12px; font-size: 16px; }
  .directory-search .form-control { padding: 10px 6px; font-size: var(--text-caption); }
  .directory-search-clear { width: 32px; height: 32px; margin-right: 6px; border-radius: 8px; }
  .directory-tool-meta { margin-top: 10px; font-size: var(--text-xs); }
}

/* ------------------------ 8. DIRECTORY HEAD + CARDS --------------------- */
.directory-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.directory-head h2 { margin: 0 0 .5rem; font-size: 26px; font-weight: 700; color: var(--text-strong); }
.directory-head p  { max-width: 480px; margin: 0; font-size: var(--text-sm); color: var(--sd-ink-soft); }
.count-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--sd-surface);
  font-size: var(--text-caption);
  font-weight: 700;
  white-space: nowrap;
  color: var(--sd-green-900);
}
.count-bubble i { color: var(--gold); }

/* Equal-height card grid: scoped to the card rows only, so modal rows and the footer grid stay standard Bootstrap */
.tab-pane > .row > [class*="col-"] { display: flex; }
.tab-pane > .row > [hidden] { display: none !important; } /* search filter sets [hidden] */

.scholar-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  min-height: 270px;
  padding: 1.25rem;
  overflow: hidden;
  border: 1.5px solid #d8bd70;
  border-left: 4px solid var(--gold);
  border-radius: var(--ui-radius-card);
  background: linear-gradient(145deg, var(--sd-surface) 0%, #fff 78%);
  box-shadow: 0 8px 22px rgba(30, 59, 42, 0.055);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.scholar-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 72px;
  height: 72px;
  border-top: 2px solid rgba(184, 145, 47, 0.2);
  border-right: 2px solid rgba(184, 145, 47, 0.2);
  border-radius: 0 17px 0 0;
  pointer-events: none;
}
.scholar-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 16px 32px rgba(30, 59, 42, 0.13);
}
.scholar-card:has(:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.card-paper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  padding: 3px;
  border: 1px solid #d8bd70;
  border-radius: 16px;
  background: var(--sd-sage-tint);
  box-shadow: 0 4px 12px rgba(184, 145, 47, 0.12);
}
.logo-orbit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid var(--sd-surface);
  border-radius: 50%;
  background: #fff;
}
.logo-orbit img { width: 78%; height: 78%; object-fit: contain; }

.card-body-custom { display: flex; flex-direction: column; flex: 1; min-width: 0; height: 100%; }
.sector-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-bottom: .5rem;
  padding: 5px 9px;
  border-radius: 50px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
}
.sector-tag.internal   { background: var(--sd-sage-tint);  color: var(--sd-green-700); }
.sector-tag.government { background: var(--sd-teal-tint);  color: var(--sd-teal); }
.sector-tag.private    { background: var(--sd-amber-tint); color: var(--sd-green-900); }

.scholar-card h3 { margin: 0 0 .5rem; font-size: var(--text-md); font-weight: 700; line-height: 1.3; color: var(--sd-green-900); }
.scholar-card .card-body-custom > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0 0 1rem;
  font-size: var(--text-caption);
  line-height: 1.55;
  color: var(--sd-ink-soft);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 14px;
}
.card-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .5rem .85rem;
  border-radius: var(--ui-radius-control);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.5;
}
.card-actions .btn-details {
  border: 1px solid #a77d19;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--green-900);
  box-shadow: 0 5px 12px rgba(184, 145, 47, 0.18);
}
.card-actions .btn-details:hover {
  border-color: #a77d19;
  background: linear-gradient(135deg, #ffe9ad, #d0a53b);
  color: var(--green-900);
  transform: translateY(-1px);
}
.card-actions .btn-apply {
  border: 1px solid var(--gold);
  background: var(--sd-green-900);
  color: var(--sd-surface);
}
.card-actions .btn-apply:hover {
  border-color: var(--gold);
  background: var(--sd-green-700);
  color: var(--gold-light);
}

@media (max-width: 575.98px) {
  .scholar-card { min-height: 0; gap: .75rem; padding: 1rem; border-radius: 15px; }
  .card-paper { flex-basis: 58px; width: 58px; height: 58px; }
  .card-actions .btn { flex: 1 1 auto; }
}

/* ---------------------------- 9. SCHOLARSHIP MODALS --------------------- */
.modal-content.scholarship-modal {
  overflow: hidden;
  border: none;
  border-radius: var(--ui-radius-card);
  background: var(--sd-surface);
  box-shadow: 0 40px 80px -30px rgba(20, 40, 29, 0.5);
}

/* One header for every sector (DNSC, Government, Private) */
.scholarship-modal .modal-header {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 28px 24px;
  border: none;
  color: var(--warm-white);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(184, 145, 47, 0.25), transparent 60%),
    linear-gradient(120deg, var(--green-700) 0%, var(--green-900) 80%);
}
.modal-brand-line { display: flex; align-items: center; gap: 16px; width: 100%; padding-right: 34px; }
.modal-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 4px;
  border: 2px solid rgba(251, 247, 238, 0.4);
  border-radius: 50%;
  background: var(--warm-white);
  object-fit: contain;
}
.modal-category {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(246, 223, 160, 0.2);
  color: var(--gold-light);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .06em;
}
.modal-brand-line h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--warm-white); }
.modal-brand-line p  { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(251, 247, 238, 0.85); }
.scholarship-modal .btn-close {
  position: absolute;
  top: 20px;
  right: 22px;
  opacity: .8;
  transition: opacity .2s ease, transform .2s ease;
}
.scholarship-modal .btn-close:hover { opacity: 1; transform: rotate(90deg); }

.scholarship-modal .modal-body { padding: 24px 28px 8px; background: var(--warm-white); }

/* Section cards */
.modal-section {
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--sd-border);
  border-radius: var(--ui-radius-card);
  background: var(--sd-surface);
}
.modal-section.qualify      { background: var(--sd-sage-tint); }
.modal-section.requirements { background: var(--sd-amber-tint); }
.modal-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-strong);
}
.modal-section-title i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--sd-sage-tint);
  color: var(--sd-green-700);
  font-size: 13px;
}

/* Body copy: high-contrast, 15px */
.modal-section p {
  max-width: 62ch;
  margin: 0 0 .75rem;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.65;
  color: var(--sd-ink);
}
.modal-section p:last-child { margin-bottom: 0; }

/* Benefit tiles */
.benefit-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--sd-border);
  border-radius: 12px;
  background: linear-gradient(160deg, var(--sd-sage-tint), var(--sd-surface));
  transition: transform .2s ease, box-shadow .2s ease;
}
.row > [class*="col-"] > .benefit-tile { height: 100%; } /* equal-height tiles in a benefits grid only */
.benefit-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(31, 77, 58, 0.35); }
.benefit-tile strong { display: block; font-size: var(--text-md); line-height: 1.3; color: var(--text-strong); }
.benefit-tile span   { font-size: var(--text-caption); line-height: 1.45; color: var(--sd-ink-soft); }

/* Required documents */
.modal-section.requirements ul { margin: 0; padding: 0; list-style: none; }
.modal-section.requirements li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: 8px 0;
  border-bottom: 1px dashed var(--sd-border);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--sd-ink);
}
.modal-section.requirements li:last-child { border-bottom: none; }
.modal-section.requirements li::before {
  content: "\f26b"; /* bi-check-circle */
  flex: 0 0 auto;
  margin-top: .1rem;
  font-family: "bootstrap-icons";
  font-style: normal;
  font-weight: normal;
  line-height: 1.4;
  font-size: 15px;
  color: var(--text-accent);
}

/* Application strip + footer */
.application-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--sd-green-700), var(--sd-green-900));
  color: var(--warm-white);
}
.application-strip small {
  display: block;
  margin-bottom: 4px;
  font-size: var(--text-xs);
  letter-spacing: .04em;
  color: rgba(251, 247, 238, 0.94);
}
.application-strip strong { font-size: var(--text-sm); font-weight: 500; line-height: 1.55; color: rgba(251, 247, 238, 0.94); }
.application-strip .btn-light {
  flex-shrink: 0;
  min-height: 34px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--ui-radius-control);
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  color: var(--green-900);
  transition: transform .2s ease, box-shadow .2s ease;
}
.application-strip .btn-light:hover {
  color: var(--text-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.35);
}
.status-note { margin-top: 14px; padding-bottom: 6px; font-size: var(--text-caption); color: var(--sd-ink-soft); }
.status-note i { color: var(--gold); }

.scholarship-modal .modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--sd-border);
  background: var(--warm-white);
}
.scholarship-modal .modal-footer .btn-outline-secondary {
  min-height: 38px;
  padding: 8px 20px;
  border-color: var(--sd-border);
  border-radius: 999px;
  font-weight: 600;
  color: var(--sd-ink-soft);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.scholarship-modal .modal-footer .btn-outline-secondary:hover {
  border-color: var(--green-900);
  background: var(--green-900);
  color: var(--warm-white);
}

@media (max-width: 575.98px) {
  .modal-brand-line { flex-wrap: wrap; }
  .scholarship-modal .modal-header { padding: 22px 20px 20px; }
  .scholarship-modal .modal-body   { padding: 20px 16px 8px; }
  .application-strip { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Scholarship modals: contrast + equal-height grid
   ========================================================================== */
.scholarship-modal {
  --modal-ink: #1a221e;   /* deep dark ink for all modal body text */
}

/* 1. High-contrast text (weight 500+, no grey) */
.scholarship-modal .modal-section p,
.scholarship-modal .modal-section.overview p {
  color: var(--modal-ink);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.65;
}
.scholarship-modal .modal-section.requirements li {
  color: var(--modal-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.6;
}
.scholarship-modal .modal-section.requirements li::before {
  color: var(--text-accent);
}
.scholarship-modal .benefit-tile strong {
  color: var(--modal-ink);
  font-size: var(--text-md);
  font-weight: 700;
}
.scholarship-modal .benefit-tile span {
  color: var(--modal-ink);
  font-size: var(--text-caption);
  font-weight: 500;
  line-height: 1.45;
}
.scholarship-modal .status-note {
  color: var(--modal-ink);
  font-weight: 500;
}

/* 2. Balanced equal-height grid */
.scholarship-modal .modal-body .row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
}
.scholarship-modal .modal-section {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}
/* Let the content inside each card absorb leftover height */
.scholarship-modal .modal-section > ul,
.scholarship-modal .modal-section > .row {
  flex: 1 1 auto;
}
.scholarship-modal .modal-section > .row { align-content: stretch; }
.scholarship-modal .modal-section > .benefit-tile { flex: 1 1 auto; }

/* 3. Unified emerald header + legible gold badge (all sectors) */
.scholarship-modal .modal-header,
.scholarship-modal.sector-internal .modal-header,
.scholarship-modal.sector-government .modal-header,
.scholarship-modal.sector-private .modal-header {
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(184, 145, 47, 0.25), transparent 60%),
    linear-gradient(120deg, var(--green-700) 0%, var(--green-900) 80%);
}
.scholarship-modal .modal-category {
  background: rgba(246, 223, 160, 0.2);
  color: var(--gold-light);
  font-weight: 700;
}
/* ==========================================================================
   MOTION: entrance, hover and modal animations
   Everything lives inside no-preference, so users with "reduce motion" get none.
   Entrance animations use fill-mode `backwards` so they never fight hover transforms.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  @keyframes bk-rise     { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes bk-drop     { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
  @keyframes bk-pop      { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
  @keyframes bk-pulse    { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 145, 47, .35); } 50% { box-shadow: 0 0 0 7px rgba(184, 145, 47, 0); } }

  /* Shelf */
  .shelf-card { animation: bk-rise .6s ease backwards .15s; }
  .sector-tabs .nav-link { transition: background .2s ease, border-color .2s ease, transform .2s ease; }
  .sector-tabs .nav-link:hover { transform: translateY(-2px); }
  .sector-tabs .nav-link i { transition: transform .25s ease; }
  .sector-tabs .nav-link:hover i,
  .sector-tabs .nav-link.active i { transform: scale(1.1) rotate(-4deg); }

  /* Search bar */
  .directory-tools { animation: bk-rise .6s ease backwards .25s; }
  .directory-search { transition: border-color .2s ease, box-shadow .2s ease; }
  .directory-search-clear { transition: background .2s ease, border-color .2s ease, transform .2s ease; }
  .directory-search-clear:hover { transform: rotate(90deg); }

  /* Cards: staggered rise every time a sector tab is shown */
  .tab-pane.active .directory-head { animation: bk-rise .5s ease backwards; }
  .tab-pane.active .count-bubble   { animation: bk-pop .5s ease backwards .15s, bk-pulse 1.6s ease-out .7s 1; }
  .tab-pane.active > .row > [class*="col-"] { animation: bk-rise .55s cubic-bezier(.2, .7, .2, 1) backwards; }
  .tab-pane.active > .row > [class*="col-"]:nth-child(1) { animation-delay: .10s; }
  .tab-pane.active > .row > [class*="col-"]:nth-child(2) { animation-delay: .18s; }
  .tab-pane.active > .row > [class*="col-"]:nth-child(3) { animation-delay: .26s; }
  .tab-pane.active > .row > [class*="col-"]:nth-child(4) { animation-delay: .34s; }
  .tab-pane.active > .row > [class*="col-"]:nth-child(5) { animation-delay: .42s; }
  .tab-pane.active > .row > [class*="col-"]:nth-child(n+6) { animation-delay: .50s; }

  /* Card micro-interactions */
  .card-paper { transition: transform .35s ease, box-shadow .35s ease; }
  .scholar-card:hover .card-paper { transform: rotate(-6deg) scale(1.06); box-shadow: 0 8px 18px rgba(184, 145, 47, .28); }
  .card-actions .btn { transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
  .card-actions .btn:active { transform: scale(.97); }
  .card-actions .btn-apply i { display: inline-block; transition: transform .2s ease; }
  .card-actions .btn-apply:hover i { transform: translate(2px, -2px); }

  /* Modals: dialog eases in, then content cascades */
  .modal.fade .modal-dialog { transform: translateY(28px) scale(.97); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
  .modal.show .modal-dialog { transform: none; }
  .modal.show .modal-header      { animation: bk-drop .45s ease backwards .05s; }
  .modal.show .modal-logo        { animation: bk-pop .5s ease backwards .15s; }
  .modal.show .modal-section     { animation: bk-rise .5s ease backwards; }
  .modal.show .modal-body .row > [class*="col-"]:nth-child(1) .modal-section { animation-delay: .12s; }
  .modal.show .modal-body .row > [class*="col-"]:nth-child(2) .modal-section { animation-delay: .20s; }
  .modal.show .modal-body .row > [class*="col-"]:nth-child(3) .modal-section { animation-delay: .28s; }
  .modal.show .modal-body .row > [class*="col-"]:nth-child(4) .modal-section { animation-delay: .36s; }
  .modal.show .modal-section.requirements li { animation: bk-rise .4s ease backwards; }
  .modal.show .modal-section.requirements li:nth-child(1) { animation-delay: .30s; }
  .modal.show .modal-section.requirements li:nth-child(2) { animation-delay: .36s; }
  .modal.show .modal-section.requirements li:nth-child(3) { animation-delay: .42s; }
  .modal.show .modal-section.requirements li:nth-child(4) { animation-delay: .48s; }
  .modal.show .modal-section.requirements li:nth-child(n+5) { animation-delay: .54s; }
  .modal.show .application-strip { animation: bk-rise .5s ease backwards .5s; }
}

/* ---------- Legibility floor (audit 2026-11-09) ---------- */
.sector-tag { font-size: var(--text-xs); }
/* Visible keyboard focus on the search box (the 18% glow alone was too faint). */
.directory-search:focus-within { outline: 2px solid var(--sd-green-700, #1f4d3a); outline-offset: 2px; }

/* ---------- Qualifications in the modal (rendered from the scholarship rules, 2026-11-12) ---------- */
.scholarship-modal .pv-quals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scholarship-modal .pv-quals > li { border: 1px solid var(--sd-border, #e9e4d8); border-radius: 12px; padding: 9px 12px; background: #fff; }
.scholarship-modal .pv-quals > li.is-confirm { background: #fbf1dc; border-color: #f2dfae; }
.scholarship-modal .pv-qual-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.scholarship-modal .pv-qual-label { font-size: var(--text-sm); font-weight: 500; line-height: 1.45; }
.scholarship-modal .pv-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; flex: none; max-width: 50%; }
.scholarship-modal .pv-tag { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.scholarship-modal .pv-tag-req { background: #1f4d3a; color: #fff; }
.scholarship-modal .pv-tag-opt { background: #e7efe9; color: #1f4d3a; }
.scholarship-modal .pv-tag-confirm { background: #fff; color: #7d5f17; border: 1px solid #e6cf8f; }
.scholarship-modal .pv-anyof { margin: 6px 0 0; padding-left: 18px; font-size: var(--text-caption); color: #635e57; }
.scholarship-modal .pv-qual-note { display: flex; gap: 6px; margin: 6px 0 0; font-size: var(--text-caption); color: #635e57; }
.scholarship-modal .pv-missing { color: #a65b2a; font-style: italic; }
.scholarship-modal .modal-section.benefits ul { margin: 0 0 12px; padding-left: 18px; }
@media (max-width: 575.98px) {
  .scholarship-modal .pv-qual-main { flex-direction: column; gap: 4px; }
  .scholarship-modal .pv-tags { justify-content: flex-start; max-width: none; }
}
/* Icon is a flex item here; bakr-layout.css positions it absolutely for its own lists. */
.scholarship-modal .modal-section.requirements li::before { position: static; }

/* Application call status from the provider's dates (partials/call-status, 2026-11-15). */
.bk-call { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; padding: 8px 10px; border-radius: 10px; font-size: var(--text-caption); line-height: 1.45; border: 1px solid transparent; }
.bk-call > i { flex: none; margin-top: 1px; font-size: 1rem; }
.bk-call strong { display: block; font-size: var(--text-sm); }
.bk-call small { display: block; font-size: var(--text-xs); opacity: .85; }
.bk-call.is-open { background: #e8f4ec; border-color: #b9dcc6; color: #1d5a3a; }
.bk-call.is-upcoming { background: #fdf6e3; border-color: #ecd9a2; color: #6b5212; }
.bk-call.is-closed { background: #f3f1ee; border-color: #e2ddd6; color: #5b564f; }
.bk-call.is-compact { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 2px 9px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; }
.bk-call.is-compact > i { font-size: .85rem; margin: 0; }
