/* ============================================================
   PENNOLA — grants.css
   SBA & 8(a) Page Styles (supplements style.css)
   ============================================================ */

/* === MAIN LAYOUT === */
.grants-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* === QUICK NAV PILLS === */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0 8px;
  justify-content: center;
}

.qnav-pill {
  background: var(--gold);
  color: var(--navy);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s;
}

.qnav-pill:hover {
  background: #b8952f;
  transform: translateY(-2px);
}

/* === SECTION LAYOUT === */
.grants-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

.grants-section.alt-bg {
  background: var(--surface);
  margin: 0 -24px;
  padding: 60px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 10px 0 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.65;
}

.section-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
}

/* === SCREENER === */
.screener-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.screener-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.screen-q {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screen-label {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.yn-row {
  display: flex;
  gap: 10px;
}

.yn-btn {
  padding: 8px 28px;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--text);
}

.yn-btn:hover {
  border-color: var(--gold);
  color: var(--navy);
}

.yn-btn.active-yes {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.yn-btn.active-no {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.screener-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.result-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 14px;
}

.result-pass {
  text-align: center;
}

.result-pass .result-badge {
  background: #d4edda;
  color: #155724;
  border: 2px solid #28a745;
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 16px;
  display: inline-block;
}

.result-pass .result-badge .big-icon {
  font-size: 2.5rem;
  display: block;
}

.result-pass .result-badge strong {
  font-size: 1.1rem;
  display: block;
  margin-top: 6px;
}

.result-fail .result-badge {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #dc3545;
}

.result-partial .result-badge {
  background: #fff3cd;
  color: #856404;
  border: 2px solid #ffc107;
}

.result-issues {
  text-align: left;
  margin: 16px 0;
}

.result-issues li {
  color: #721c24;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.result-next {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: left;
  background: var(--surface);
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 12px;
}

/* === INFO GRID (8a cards) === */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.2s;
}

.info-card:hover {
  box-shadow: 0 4px 18px rgba(10,22,40,0.10);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.info-card h3 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === STEP TIMELINE === */
.step-timeline {
  margin-top: 20px;
}

.step-timeline h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: 1.3rem;
  margin-bottom: 24px;
  text-align: center;
}

.step-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.step-row::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: var(--gold);
  opacity: 0.4;
}

.step-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 18px 0;
  position: relative;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-body {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex: 1;
}

.step-body h4 {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-body p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === LOAN CARDS === */
.loan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.loan-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: box-shadow 0.2s;
}

.loan-card:hover {
  box-shadow: 0 4px 20px rgba(10,22,40,0.10);
}

.loan-card.featured {
  border-color: var(--gold);
  border-width: 2px;
}

.loan-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.loan-card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.loan-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
  font-family: 'Playfair Display', serif;
}

.loan-details {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.loan-details li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}

.loan-details li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.loan-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loan-link {
  display: block;
  text-align: center;
  padding: 9px 16px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.18s;
}

.loan-link:hover { background: #162440; }

.loan-link.secondary {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}

.loan-link.secondary:hover {
  background: var(--navy);
  color: #fff;
}

/* === TABLE WRAP === */
.table-wrap {
  overflow-x: auto;
}

.table-wrap h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.priority-high { color: #155724; font-weight: 700; }
.priority-med  { color: #856404; font-weight: 700; }
.priority-low  { color: var(--text-muted); font-weight: 600; }

/* === CHECKLIST GRID === */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.checklist-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.checklist-card h3 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.4;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chk {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-list {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-list li {
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.5;
}

/* === ALERT BOX === */
.alert-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 8px;
}

.alert-box.warning {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #664d03;
}

.alert-box.info {
  background: #cff4fc;
  border-left: 4px solid #0dcaf0;
  color: #055160;
}

/* === CODE GRID === */
.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.code-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
}

.code-card.primary-code {
  border-color: var(--gold);
  border-width: 2px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 20px;
  align-items: start;
}

.code-badge {
  grid-column: 1 / -1;
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  width: fit-content;
}

.code-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  margin-bottom: 6px;
}

.code-card.primary-code .code-number {
  font-size: 2.8rem;
  color: var(--gold);
}

.code-card h3 {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.code-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.code-includes {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 8px;
  grid-column: 1 / -1;
  line-height: 1.5;
}

/* === RESOURCE GRID === */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.resource-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resource-card:hover {
  box-shadow: 0 6px 24px rgba(10,22,40,0.12);
  transform: translateY(-3px);
}

.res-icon {
  font-size: 2rem;
}

.resource-card h3 {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.resource-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.res-link {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.83rem;
  margin-top: auto;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .screener-grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .code-grid {
    grid-template-columns: 1fr 1fr;
  }

  .code-card.primary-code {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .code-grid {
    grid-template-columns: 1fr;
  }

  .loan-cards {
    grid-template-columns: 1fr;
  }

  .step-row::before { display: none; }
}

/* === PRINT === */
@media print {
  .no-print, .quick-nav, nav, .print-btn { display: none !important; }
  .grants-section.alt-bg { background: #f8f9fa !important; }
  .resource-card, .info-card, .loan-card, .step-body { break-inside: avoid; }
}
