/* Palette matches the plugin's existing admin UI (admin/settings-page.php):
   #177a31 / #1f9d57 / #dbe6dc / #566a5b. Font and max-width intentionally
   match the Funded Grad Search theme's landing page (see fgo-scholar-search/
   assets/css/landing.css) so browsing here doesn't feel like a different
   product from the search. Declared directly here rather than assumed from
   the active theme, so these pages still look right under any theme. */

.fgo-archive-wrap, .fgo-single-wrap {
  max-width: 1760px;
  margin: 0 auto;
  padding: 40px clamp(16px, 3vw, 56px) 80px;
  font-family: 'Courier New', Courier, monospace;
}

/* full-width-content (funded-grad-outreach.php) tells GP to stop capping
   .grid-container, but leaves its own side padding and, on some installs,
   its sidebar-reserving grid track in place regardless. #content,
   #primary, and #right-sidebar are IDs unique to GP's main content region,
   header and footer don't have them, so this can't reach either one.
   display:block on the parent rather than guessing at grid-template-columns:
   forcing that property directly turned out not to be reliable across GP
   installs, some lay this out with flexbox and a fixed width on #primary
   instead, display:block kills either one without needing to know which. */
body.post-type-archive-fgo_opportunity #right-sidebar {
  display: none !important;
}
body.post-type-archive-fgo_opportunity #content.site-content {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}
body.post-type-archive-fgo_opportunity #primary,
body.post-type-archive-fgo_opportunity .content-area {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}
body.post-type-archive-fgo_opportunity.full-width-content .grid-container {
  padding-left: 0;
  padding-right: 0;
}

.fgo-back-to-search { display: inline-block; margin-bottom: 20px; font-size: 13px; color: #5c6b60; text-decoration: none; }
.fgo-back-to-search:hover { color: #177a31; }

.fgo-archive-header h1 { margin: 0 0 8px; font-size: 32px; color: #16321d; }
.fgo-archive-sub { color: #566a5b; max-width: 640px; margin: 0 0 28px; }

.fgo-archive-body { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
@media (max-width: 780px) { .fgo-archive-body { grid-template-columns: 1fr; } }

.fgo-filters { position: sticky; top: 20px; border: 1px solid #dbe6dc; border-radius: 12px; padding: 16px; background: #fff; }
.fgo-filter-group { border: none; padding: 0 0 14px; margin: 0 0 14px; border-bottom: 1px solid #edf2ee; }
.fgo-filter-group:last-of-type { border-bottom: none; }
.fgo-filter-group legend { font-weight: 600; font-size: 13px; color: #16321d; margin-bottom: 8px; padding: 0; }
.fgo-filter-option { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; padding: 3px 0; cursor: pointer; }
.fgo-count { color: #8a998e; }

.fgo-btn { display: inline-block; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.fgo-btn-primary { background: #177a31; color: #fff; }
.fgo-btn-primary:hover { background: #146a2a; color: #fff; }
.fgo-btn-ghost { background: #fff; color: #566a5b; border-color: #dbe6dc; margin-left: 6px; }

.fgo-results-meta { color: #566a5b; font-size: 13px; margin-bottom: 14px; }

.fgo-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.fgo-card { border: 1px solid #dbe6dc; border-radius: 12px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.fgo-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.fgo-badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; background: #eaf6ee; color: #146a2a; border-radius: 999px; padding: 3px 9px; }
.fgo-badge-source { background: #16321d; color: #fff; }

.fgo-card-title { margin: 0; font-size: 17px; line-height: 1.3; }
.fgo-card-title a { color: #16321d; text-decoration: none; }
.fgo-card-title a:hover { text-decoration: underline; }
.fgo-card-funder { font-size: 13px; color: #566a5b; }
.fgo-card-meta-row { display: flex; gap: 14px; font-size: 12px; color: #8a998e; }
.fgo-card-excerpt { font-size: 13px; color: #444; margin: 2px 0 6px; flex-grow: 1; }

.fgo-pagination { margin-top: 28px; display: flex; gap: 6px; }
.fgo-pagination .page-numbers { padding: 6px 11px; border: 1px solid #dbe6dc; border-radius: 6px; text-decoration: none; color: #16321d; font-size: 13px; }
.fgo-pagination .page-numbers.current { background: #177a31; color: #fff; border-color: #177a31; }

.fgo-empty { padding: 32px; text-align: center; color: #566a5b; border: 1px dashed #dbe6dc; border-radius: 12px; }

/* Single */
.fgo-back-link { display: inline-block; margin-bottom: 18px; color: #566a5b; text-decoration: none; font-size: 13px; }
.fgo-single-title { font-size: 28px; color: #16321d; margin: 10px 0 4px; }
.fgo-single-funder { color: #566a5b; margin-bottom: 18px; }
.fgo-single-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; border: 1px solid #dbe6dc; border-radius: 12px; padding: 16px; margin-bottom: 22px; }
.fgo-single-facts div { display: flex; flex-direction: column; gap: 2px; }
.fgo-single-facts strong { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #8a998e; }
.fgo-single-facts span { font-size: 14px; color: #16321d; }
.fgo-single-content { line-height: 1.7; color: #333; margin-bottom: 26px; }
.fgo-source-link { margin-bottom: 24px; }

.fgo-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid #edf2ee; padding-top: 18px; }
.fgo-share-label { font-size: 13px; color: #566a5b; font-weight: 600; }
.fgo-share-btn { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid #dbe6dc; background: #fff; color: #16321d; text-decoration: none; cursor: pointer; }
.fgo-share-btn:hover { background: #eaf6ee; }
