/* ============================================================
   FUNDHIVE SHARED STYLES
   Design tokens from landing page
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --honey: #F5A623;
  --honey-light: #FFF3D6;
  --honey-dark: #D4891A;
  --ink: #1A1A2E;
  --ink-light: #2D2D44;
  --ink-muted: #6B6B80;
  --cream: #FEFCF7;
  --white: #FFFFFF;
  --comb: #FFF8E7;
  --green: #22C55E;
  --green-light: #DCFCE7;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --blue: #3B82F6;
  --blue-light: #DBEAFE;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
}

a {
  color: var(--honey-dark);
  text-decoration: none;
}
a:hover {
  color: var(--honey);
}

/* ============================================================
   NAV
   ============================================================ */
.app-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 0.85rem 2rem;
  backdrop-filter: blur(20px);
  background: rgba(254, 252, 247, 0.92);
  border-bottom: 1px solid rgba(245, 166, 35, 0.1);
}
.app-nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.app-nav .logo-icon {
  width: 30px;
  height: 30px;
  background: var(--honey);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: white;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
}
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--honey);
  color: white;
}
.btn-primary:hover {
  background: var(--honey-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}
.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(0,0,0,0.1);
}
.btn-secondary:hover {
  border-color: var(--honey);
  color: var(--honey-dark);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
}
.btn-ghost:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.03);
}
.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}
.btn-outline-honey {
  background: transparent;
  color: var(--honey-dark);
  border: 1.5px solid var(--honey);
}
.btn-outline-honey:hover {
  background: var(--honey-light);
  color: var(--honey-dark);
}

/* ============================================================
   BADGES / CHIPS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-grant { background: var(--green-light); color: #15803D; }
.badge-accelerator { background: var(--blue-light); color: #1D4ED8; }
.badge-competition { background: #FEF3C7; color: #B45309; }
.badge-fellowship { background: #EDE9FE; color: #6D28D9; }
.badge-program { background: #FCE7F3; color: #BE185D; }
.badge-featured {
  background: var(--honey);
  color: white;
  font-size: 0.6rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.opp-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
}
.opp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 166, 35, 0.2);
}
.opp-card.featured {
  border-color: rgba(245, 166, 35, 0.3);
  box-shadow: 0 2px 12px rgba(245, 166, 35, 0.08);
}
.opp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.opp-card-org {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.opp-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.opp-card-desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opp-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.opp-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.opp-meta-item .icon {
  font-size: 0.85rem;
}
.opp-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
}
.opp-deadline {
  font-size: 0.78rem;
  font-weight: 500;
}
.opp-deadline.soon {
  color: var(--red);
}
.opp-deadline.open {
  color: var(--green);
}

/* ============================================================
   SEARCH & FILTERS
   ============================================================ */
.search-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 2rem;
}
.search-header {
  text-align: center;
  margin-bottom: 2rem;
}
.search-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.search-header p {
  color: var(--ink-muted);
  font-size: 1rem;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--white);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 0.6rem 1rem;
  box-shadow: var(--shadow-sm);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  transition: border-color 0.2s;
}
.search-bar:focus-within {
  border-color: var(--honey);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  background: transparent;
  color: var(--ink);
}
.search-bar input::placeholder {
  color: var(--ink-muted);
}
.search-icon {
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.filter-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid rgba(0,0,0,0.08);
  background: var(--white);
  color: var(--ink-muted);
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.filter-chip:hover {
  border-color: var(--honey);
  color: var(--honey-dark);
}
.filter-chip.active {
  background: var(--honey);
  color: white;
  border-color: var(--honey);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}
.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 0.25rem;
}
.sort-select {
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid rgba(0,0,0,0.08);
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
}
.sort-select:focus {
  border-color: var(--honey);
}

.results-info {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.results-info strong {
  color: var(--ink);
}

/* ============================================================
   GRID
   ============================================================ */
.opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 6.5rem 2rem 4rem;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-decoration: none;
}
.detail-back:hover {
  color: var(--ink);
}
.detail-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.detail-org {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}
.detail-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.detail-short {
  font-size: 1.1rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.detail-stat {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.detail-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.detail-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}
.detail-section {
  margin-bottom: 2rem;
}
.detail-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.detail-section p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.8;
}
.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-top: 0.5rem;
}
.detail-cta-box {
  background: var(--comb);
  border: 1px solid rgba(245, 166, 35, 0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.detail-cta-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.detail-cta-box p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  text-align: center;
}
.pricing-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.pricing-header p {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 3rem;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 750px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--white);
  border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: left;
  transition: all 0.3s;
}
.pricing-card.popular {
  border-color: var(--honey);
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.15);
  position: relative;
}
.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--honey);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pricing-plan-name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.pricing-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
}
.pricing-period {
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.pricing-desc {
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
}
.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}
.pricing-features li {
  font-size: 0.875rem;
  color: var(--ink);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.pricing-features li:last-child {
  border-bottom: none;
}
.pricing-features .check {
  color: var(--green);
  font-size: 1rem;
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-muted);
  cursor: pointer;
}
.modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.modal p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--honey);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}
.form-error {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}
.form-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.form-footer a {
  color: var(--honey-dark);
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-muted);
}
.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.empty-state h3 {
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.empty-state p {
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   LOADING
   ============================================================ */
.loading {
  display: flex;
  justify-content: center;
  padding: 3rem;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(245, 166, 35, 0.2);
  border-top-color: var(--honey);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  padding: 3rem 2rem;
  background: var(--ink);
  text-align: center;
}
.app-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-footer p {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}
.app-footer a {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}
.app-footer a:hover {
  color: var(--honey);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .app-nav { padding: 0.75rem 1rem; }
  .nav-links { display: none; }
  .search-section { padding: 5.5rem 1rem 1.5rem; }
  .opp-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 3rem;
  }
  .detail-container { padding: 5.5rem 1rem 3rem; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-container { padding: 5.5rem 1rem 3rem; }
  .filter-bar { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; }
  .filter-chip { white-space: nowrap; flex-shrink: 0; }
  .app-footer-inner { flex-direction: column; gap: 0.5rem; }
  .opp-card { padding: 1.25rem; }
}
@media (max-width: 480px) {
  .opp-card-name { font-size: 1rem; }
  .opp-amount { font-size: 1rem; }
  .detail-title { font-size: 1.5rem; }
}
