/* ===== River.bz — Mega Portal Styles ===== */

:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --gold: #c79324;
  --gold-light: #e8c547;
  --gold-dark: #a0761a;
  --navy: #1a1a2e;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ===== Header ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-dot { color: var(--gold); }

.main-nav { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}

.nav-link:hover { color: var(--text); background: var(--bg-alt); }
.nav-link.active { color: var(--gold-dark); background: #fef3c7; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 50%, #f0f9ff 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 2px 8px rgba(199,147,36,0.3);
}

.btn-primary:hover { background: var(--gold-dark); color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--border);
}

.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }

.btn-full { width: 100%; justify-content: center; }

/* Hero visual */
.hero-visual { display: flex; justify-content: center; align-items: center; }

.hero-graphic {
  position: relative;
  width: 400px;
  height: 400px;
}

.hero-lines {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(199,147,36,0.4);
}

.node.center { width: 20px; height: 20px; left: 190px; top: 190px; background: var(--navy); }
.node.n1 { left: 70px; top: 50px; }
.node.n2 { left: 310px; top: 50px; }
.node.n3 { left: 40px; top: 190px; }
.node.n4 { left: 340px; top: 190px; }
.node.n5 { left: 70px; top: 330px; }
.node.n6 { left: 310px; top: 330px; }
.node.n7 { left: 190px; top: 40px; }
.node.n8 { left: 190px; top: 340px; }

/* ===== Search ===== */
.search-section {
  padding: 0 0 40px;
  margin-top: -20px;
}

.search-box {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  transition: border-color var(--transition);
  outline: none;
}

.search-input:focus { border-color: var(--gold); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.search-results.active { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-alt); }

.search-result-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-weight: 600; font-size: 0.95rem; }
.search-result-desc { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 100px;
  background: #fef3c7;
  color: var(--gold-dark);
  font-weight: 500;
  flex-shrink: 0;
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

/* ===== Directory ===== */
.directory { padding: 60px 0; }
.directory-ministry { background: var(--bg-alt); }

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

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.brand-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--gold);
}

.brand-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.brand-domain {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.brand-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.brand-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 500;
}

.brand-tag.ministry {
  background: #f0fdf4;
  color: #15803d;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
  transition: color var(--transition);
}

.brand-link:hover { color: var(--gold); }

/* ===== Stats ===== */
.stats {
  padding: 60px 0;
  background: var(--navy);
  color: #fff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* ===== CTA ===== */
.cta {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.cta h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 24px;
}

/* ===== Page Hero (subpages) ===== */
.page-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ===== Content Section ===== */
.content-section { padding: 40px 0 80px; }

/* ===== Contact ===== */
.contact-section { padding: 40px 0 80px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  font-size: 0.85rem !important;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
}

.form-feedback {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.form-feedback.error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.routing-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.routing-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.routing-list li:last-child { border-bottom: none; }

/* ===== Investors ===== */
.investor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.investor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.investor-icon { margin-bottom: 16px; display: flex; justify-content: center; }

.investor-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.investor-tagline {
  font-size: 1rem;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 12px;
}

.investor-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.investor-card .btn { margin-top: 8px; }

.investor-disclaimer {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 24px;
}

.investor-disclaimer h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gold-dark);
}

.investor-disclaimer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Status ===== */
.status-summary {
  text-align: center;
  margin-bottom: 32px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
}

.status-dot.checking { background: #f59e0b; animation: pulse 1.5s infinite; }
.status-dot.all-up { background: #22c55e; }
.status-dot.partial { background: #f59e0b; }
.status-dot.down { background: #ef4444; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.status-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-card-dot.up { background: #22c55e; }
.status-card-dot.down { background: #ef4444; }
.status-card-dot.checking { background: #f59e0b; animation: pulse 1.5s infinite; }

.status-card-info { flex: 1; min-width: 0; }
.status-card-name { font-weight: 600; font-size: 0.9rem; }
.status-card-url { font-size: 0.75rem; color: var(--text-muted); }

.status-card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.status-footer { text-align: center; }

.status-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.status-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo-text { color: #fff; font-size: 1.25rem; }
.footer-brand p { font-size: 0.85rem; margin-top: 8px; line-height: 1.6; }
.footer-location { color: var(--gold) !important; }

.footer-links h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  padding: 4px 0;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-title { font-size: 2.5rem; }
  .hero-visual { display: none; }

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

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

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    box-shadow: var(--shadow-lg);
  }

  .mobile-menu-btn { display: flex; }

  .hero { padding: 40px 0; }
  .hero-title { font-size: 2rem; }

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

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .stat-number { font-size: 2rem; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

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