/* Scholarship Compass — global styles */
:root {
  --navy: #0B2847;
  --navy-deep: #061b35;
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --cream: #FDF8EE;
  --grey-50: #F8FAFC;
  --grey-100: #EEF2F6;
  --grey-200: #E2E8F0;
  --grey-400: #94A3B8;
  --grey-600: #475569;
  --grey-800: #1E293B;
  --green: #059669;
  --red: #DC2626;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--grey-800);
  background: var(--cream);
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
@media (min-width: 720px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.7rem; }
}

a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--amber-dark); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* Header */
.site-header {
  background: var(--navy);
  color: var(--cream);
  padding: 1rem 0;
  border-bottom: 3px solid var(--amber);
}
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--cream); text-decoration: none; font-weight: 700; }
.logo-mark {
  background: var(--amber);
  color: var(--navy);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1rem;
}
.logo-text { font-family: 'Fraunces', Georgia, serif; font-size: 1.25rem; }
.primary-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }
.primary-nav a { color: var(--cream); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.primary-nav a:hover { color: var(--amber); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: var(--cream);
  padding: 3rem 0 2.5rem;
}
.hero h1 { color: var(--cream); margin-bottom: 0.4em; }
.hero .lede { font-size: 1.15rem; max-width: 640px; opacity: 0.92; }
.hero-cta-row { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.cta-btn-large {
  background: var(--amber);
  color: var(--navy);
  padding: 0.95rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
  display: inline-block;
  transition: background 0.15s;
}
.cta-btn-large:hover { background: white; color: var(--navy); }
.cta-btn-secondary {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(253,248,238,0.4);
  padding: 0.4rem 0;
  font-size: 0.95rem;
}
.cta-btn-secondary:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* Scholarship cards */
.scholarship-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.scholarship-card {
  background: white;
  padding: 1.25rem 1.4rem;
  border-radius: 10px;
  border: 1px solid var(--grey-200);
  box-shadow: 0 1px 3px rgba(11,40,71,0.04);
  transition: box-shadow 0.15s, transform 0.15s;
}
.scholarship-card:hover {
  box-shadow: 0 4px 16px rgba(11,40,71,0.08);
  transform: translateY(-1px);
}
.scholarship-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}
.scholarship-card h3 a { color: var(--navy); text-decoration: none; }
.scholarship-card h3 a:hover { color: var(--amber-dark); text-decoration: underline; }
.scholarship-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}
.scholarship-meta .tag {
  background: var(--grey-100);
  color: var(--grey-600);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 500;
}
.scholarship-meta .tag.value {
  background: #E0F2FE;
  color: #075985;
}
.scholarship-meta .tag.deadline {
  background: #FEF3C7;
  color: #92400E;
}
.scholarship-meta .tag.deadline-urgent {
  background: #FEE2E2;
  color: #991B1B;
}
.match-score {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}
.scholarship-card .desc {
  color: var(--grey-600);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

/* Detail page */
.scholarship-detail { padding: 2rem 0 3rem; }
.scholarship-header { margin-bottom: 1.5rem; }
.breadcrumb { font-size: 0.85rem; color: var(--grey-600); margin-bottom: 1rem; }
.breadcrumb a { color: var(--grey-600); }
.scholarship-header h1 { margin-bottom: 0.4rem; }
.scholarship-header .provider { font-weight: 500; color: var(--grey-600); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (min-width: 920px) {
  .detail-grid { grid-template-columns: 1fr 320px; }
}

.detail-main h2 { margin-top: 1.8rem; border-bottom: 2px solid var(--amber); padding-bottom: 0.3rem; display: inline-block; }
.detail-main p { margin: 0.6em 0; }
.detail-main ul { padding-left: 1.4rem; }

.detail-sidebar {
  background: white;
  padding: 1.25rem 1.4rem;
  border-radius: 10px;
  border: 1px solid var(--grey-200);
  box-shadow: 0 1px 3px rgba(11,40,71,0.04);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: 0.95rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .key { color: var(--grey-600); font-weight: 500; }
.summary-row .val { color: var(--navy); font-weight: 600; text-align: right; }

.cta-apply {
  display: block;
  background: var(--amber);
  color: var(--navy);
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
  transition: background 0.15s;
}
.cta-apply:hover { background: var(--amber-dark); color: var(--cream); }

.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grey-200);
}

/* Hub pages */
.hub-intro { padding: 2rem 0; }
.hub-intro p { font-size: 1.05rem; color: var(--grey-600); max-width: 720px; }
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
@media (min-width: 720px) { .hub-grid { grid-template-columns: 1fr 1fr 1fr; } }
.link-list { list-style: none; padding: 0; margin: 0.6rem 0; }
.link-list li { margin: 0.4rem 0; }
.link-list a { color: var(--grey-800); text-decoration: none; padding: 0.3rem 0; display: inline-block; border-bottom: 1px solid transparent; }
.link-list a:hover { color: var(--amber-dark); border-bottom-color: var(--amber); }

/* Filter bar (search/all scholarships page) */
.filter-bar {
  background: white;
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  border: 1px solid var(--grey-200);
  box-shadow: 0 1px 3px rgba(11,40,71,0.04);
  margin: 1.5rem 0 2rem;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 0.8rem;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-600);
}
.filter-field.grow { flex: 1 1 240px; }
.filter-field input,
.filter-field select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  background: white;
  color: var(--grey-800);
  min-width: 160px;
}
.filter-field input:focus,
.filter-field select:focus {
  outline: 2px solid var(--amber);
  outline-offset: -1px;
  border-color: var(--amber);
}
.clear-link {
  font-size: 0.85rem;
  color: var(--grey-600);
  align-self: end;
  padding-bottom: 0.55rem;
  margin-left: auto;
}
.results-count {
  color: var(--grey-600);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}
.empty {
  background: var(--cream);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: var(--grey-600);
}

/* Profile bar + modal */
.profile-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(135deg, #FFF8E5, var(--cream));
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}
.profile-prompt { color: var(--grey-800); flex: 1 1 240px; }
.profile-tag {
  flex: 1 1 240px;
  font-weight: 600;
  color: var(--navy);
}
.cta-btn {
  background: var(--amber);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}
.cta-btn:hover { background: var(--amber-dark); color: var(--cream); }
.link-btn {
  background: transparent;
  color: var(--navy);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0.4rem 0.6rem;
}
.link-btn:hover { color: var(--amber-dark); }
.match-score.personalised {
  background: var(--green);
  color: white;
}

.profile-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11,40,71,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.15s ease;
}
@keyframes fade-in { from {opacity:0;} to {opacity:1;} }
.profile-modal {
  background: white;
  padding: 1.8rem;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(11,40,71,0.4);
}
.profile-modal h2 { margin-top: 0; }
.modal-lede { color: var(--grey-600); font-size: 0.92rem; }
.profile-modal .filter-field {
  margin: 1rem 0;
  flex-direction: column;
}
.profile-modal .filter-field span {
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--navy);
}
.profile-modal select { padding: 0.6rem; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-200);
}

/* Static pages */
.static-page { max-width: 720px; padding: 2rem 0; }
.static-page h1 { margin-bottom: 1rem; }
.static-page h2 { margin-top: 2rem; }
.static-page p { margin: 0.8em 0; }
.static-page ul { padding-left: 1.4rem; }
.static-page li { margin: 0.3em 0; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer h2 { color: var(--cream); margin-bottom: 0.4em; }
.site-footer h3 { color: var(--cream); font-size: 1rem; margin-bottom: 0.6rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--amber); }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.6fr; }
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0.3rem 0; font-size: 0.92rem; }
.sister-list .sister-blurb {
  display: block;
  color: rgba(253,248,238,0.6);
  font-size: 0.8rem;
  margin-left: 0;
}
.footer-copy {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(253,248,238,0.15);
  font-size: 0.85rem;
  opacity: 0.75;
}
.small { font-size: 0.85rem; opacity: 0.85; }

/* Ad slot */
.ad-slot {
  margin: 2rem 0;
  text-align: center;
}

/* Match score detail */
.match-explainer {
  background: var(--cream);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  border-left: 4px solid var(--amber);
  margin: 1rem 0;
  font-size: 0.95rem;
}
