/* ============================================================
   TRADE GRID — discover.css
   Discover Companies Page
   ============================================================ */

:root {
  --primary:       #0D3B3B;
  --accent:        #0FA3B1;
  --light:         #B5EAF0;
  --white:         #FFFFFF;
  --primary-dark:  #082828;
  --nav-height:    68px;
  --radius:        14px;
  --dm-bg:         #F0FAFB;
  --dm-surface:    #FFFFFF;
  --dm-text:       #1A1A1A;
  --dm-text-sec:   #4a6464;
  --dm-border:     rgba(13,59,59,0.10);
  --dm-input-bg:   #F0FAFB;
}

body.dark-mode {
  --dm-bg:       #011635;
  --dm-surface:  #041e45;
  --dm-text:     #e2eaf5;
  --dm-text-sec: #7ea8cc;
  --dm-border:   rgba(100,160,220,0.12);
  --dm-input-bg: #031a3d;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: 'Inter', sans-serif;
  background: var(--dm-bg);
  color: var(--dm-text);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: 'Inter', sans-serif; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--primary);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex; align-items: center;
  transition: background 0.3s;
}
body.dark-mode .top-nav {
  background: #010e24;
  border-bottom: 1px solid rgba(100,160,220,0.10);
}
.nav-container {
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-size: 1.25rem; font-weight: 700;
  color: #fff; letter-spacing: 0.02em;
}
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Dark mode toggle */
.dark-mode-toggle {
  background: none; border: none; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(181,234,240,0.75); font-size: 20px;
  cursor: pointer; transition: color 0.2s, transform 0.2s;
}
.dark-mode-toggle:hover { color: #fff; transform: rotate(-15deg); }
.dark-mode-toggle .icon-lamp-off { display: flex; }
.dark-mode-toggle .icon-lamp-on  { display: none; }
body.dark-mode .dark-mode-toggle .icon-lamp-off { display: none; }
body.dark-mode .dark-mode-toggle .icon-lamp-on  { display: flex; }

/* Nav buttons */
.nav-back {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid rgba(181,234,240,0.2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-back:hover { color: #fff; border-color: rgba(181,234,240,0.4); background: rgba(181,234,240,0.07); }
.nav-back i { font-size: 16px; }

.btn-ghost {
  font-size: 0.85rem; font-weight: 500;
  color: rgba(255,255,255,0.8); padding: 8px 16px; transition: color 0.2s;
}
.btn-ghost:hover { color: #fff; }

.btn-primary-nav {
  font-size: 0.85rem; font-weight: 600;
  color: var(--primary); background: var(--light);
  padding: 10px 22px; border-radius: 8px; border: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary-nav:hover { background: #fff; transform: translateY(-1px); }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page-wrapper {
  padding-top: var(--nav-height);
  background: linear-gradient(160deg, #0a2e2e 0%, #0D3B3B 45%, #0f4545 100%);
  min-height: 100vh;
  transition: background 0.3s;
}
body.dark-mode .page-wrapper {
  background: linear-gradient(160deg, #010e24 0%, #011635 45%, #021f4a 100%);
}
.page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}

/* ============================================================
   HERO
   ============================================================ */
.discover-hero { text-align: center; padding: 0 0 52px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(181,234,240,0.10);
  border: 1px solid rgba(181,234,240,0.25);
  border-radius: 40px; padding: 6px 16px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--light); margin-bottom: 24px;
}
.hero-badge i { font-size: 14px; }
.discover-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800;
  color: #fff; letter-spacing: -0.02em;
  margin-bottom: 16px; line-height: 1.15;
}
.discover-hero p {
  font-size: 1rem; color: var(--light);
  max-width: 560px; margin: 0 auto; opacity: 0.85; line-height: 1.7;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 36px; flex-wrap: wrap;
}
.filter-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(181,234,240,0.6); margin-right: 4px;
}
.filter-btn {
  padding: 7px 16px; border-radius: 40px;
  border: 1px solid rgba(181,234,240,0.2);
  background: rgba(255,255,255,0.04);
  color: rgba(181,234,240,0.75);
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; letter-spacing: 0.03em;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.filter-btn:hover {
  background: rgba(181,234,240,0.08);
  border-color: rgba(181,234,240,0.35);
  color: rgba(181,234,240,1);
}
.filter-btn.active {
  background: rgba(15,163,177,0.2);
  border-color: rgba(15,163,177,0.5);
  color: var(--light);
}
/* ============================================================
   PREVIEW LABEL
   ============================================================ */
.preview-label {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.preview-label-left { font-size: 0.85rem; color: rgba(181,234,240,0.6); }
.preview-label-left span { color: var(--light); font-weight: 700; }
.preview-count-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(181,234,240,0.08);
  border: 1px solid rgba(181,234,240,0.18);
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.75rem; color: rgba(181,234,240,0.65); font-weight: 500;
}
.preview-count-chip i { font-size: 13px; color: #f59e0b; }

/* ============================================================
   COMPANY CARDS GRID
   ============================================================ */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.company-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(181,234,240,0.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
  position: relative;
}
body.dark-mode .company-card {
  background: rgba(255,255,255,0.03);
  border-color: rgba(181,234,240,0.08);
}
.company-card:hover {
  transform: translateY(-5px);
  border-color: rgba(181,234,240,0.35);
  background: rgba(255,255,255,0.09);
}

/* Card banner */
.card-banner {
  height: 72px;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 20px;
}
.card-banner-1 { background: linear-gradient(135deg, #083d3d 0%, #0e5555 100%); }
.card-banner-2 { background: linear-gradient(135deg, #082c3a 0%, #0e4558 100%); }
.card-banner-3 { background: linear-gradient(135deg, #1a2e0a 0%, #2a4510 100%); }

/* Verified badge */
.verified-badge {
  display: flex; align-items: center; gap: 5px;
  background: rgba(181,234,240,0.15);
  border: 1px solid rgba(181,234,240,0.3);
  border-radius: 20px; padding: 4px 10px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--light);
}
.verified-badge i { font-size: 12px; color: #22c55e; }

/* Card avatar */
.card-avatar {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  margin: -28px 0 0 20px;
  border: 2px solid rgba(181,234,240,0.2);
  position: relative; z-index: 2; flex-shrink: 0;
}
.avatar-1 { background: #0FA3B1; color: #fff; }
.avatar-2 { background: #0a5c7a; color: var(--light); }
.avatar-3 { background: #2a5c10; color: #b8e68a; }

/* Card body */
.card-body { padding: 14px 20px 22px; }
.card-header-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px; margin-bottom: 14px;
}
.card-company-name {
  font-size: 1.05rem; font-weight: 700; color: #fff;
  line-height: 1.25; margin-bottom: 3px;
}
.card-location {
  font-size: 0.78rem; color: rgba(181,234,240,0.6);
  display: flex; align-items: center; gap: 4px;
}
.card-location i { font-size: 12px; }

/* Type badges */
.card-type-badge {
  padding: 4px 10px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; white-space: nowrap;
  flex-shrink: 0; margin-top: 2px;
}
.badge-exporter {
  background: rgba(15,163,177,0.18);
  border: 1px solid rgba(15,163,177,0.35);
  color: var(--light);
}
.badge-importer {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd;
}
.badge-both {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
  color: #86efac;
}

.card-description {
  font-size: 0.85rem; color: rgba(181,234,240,0.7);
  line-height: 1.65; margin-bottom: 16px;
}

/* Tags */
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.card-tag {
  font-size: 0.72rem; color: var(--light);
  background: rgba(181,234,240,0.08);
  border: 1px solid rgba(181,234,240,0.18);
  border-radius: 20px; padding: 4px 11px; font-weight: 500;
}

/* Stats */
.card-stats {
  display: flex; gap: 0;
  border-top: 1px solid rgba(181,234,240,0.1);
  padding-top: 14px; margin-top: 4px;
}
.card-stat {
  flex: 1; text-align: center; padding: 0 8px;
  border-right: 1px solid rgba(181,234,240,0.1);
}
.card-stat:last-child { border-right: none; }
.stat-num {
  font-size: 1.1rem; font-weight: 700; color: var(--light);
  display: block; margin-bottom: 2px;
}
.stat-lbl {
  font-size: 0.68rem; color: rgba(181,234,240,0.5);
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* Connect button — locked */
.card-actions { margin-top: 16px; }
.btn-connect-locked {
  width: 100%; padding: 11px;
  background: rgba(181,234,240,0.07);
  border: 1px solid rgba(181,234,240,0.2);
  border-radius: 10px;
  color: rgba(181,234,240,0.5);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: not-allowed;
}
.btn-connect-locked i { font-size: 15px; }

/* ============================================================
   LOCK / CTA SECTION
   ============================================================ */
.lock-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(181,234,240,0.15);
  border-radius: var(--radius);
  overflow: hidden; padding: 52px 40px; text-align: center;
}
body.dark-mode .lock-section {
  background: rgba(255,255,255,0.02);
  border-color: rgba(181,234,240,0.08);
}
.lock-icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(181,234,240,0.1);
  border: 1px solid rgba(181,234,240,0.25);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-size: 32px; color: var(--light);
}
.lock-section h2 {
  font-size: 1.5rem; font-weight: 800; color: #fff;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.lock-section p {
  font-size: 0.92rem; color: rgba(181,234,240,0.75);
  max-width: 480px; margin: 0 auto 32px; line-height: 1.7;
}
.lock-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.btn-lock-primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 30px; border-radius: 10px;
  background: var(--light); color: var(--primary);
  font-size: 0.9rem; font-weight: 700; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s; text-decoration: none;
}
.btn-lock-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-lock-primary i { font-size: 17px; }
.btn-lock-secondary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 28px; border-radius: 10px;
  background: transparent; color: rgba(181,234,240,0.8);
  border: 1px solid rgba(181,234,240,0.3);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.btn-lock-secondary:hover {
  color: #fff; border-color: rgba(181,234,240,0.55);
  background: rgba(181,234,240,0.07);
}

/* Lock perks */
.lock-perks {
  display: flex; justify-content: center; gap: 32px;
  margin-top: 28px; flex-wrap: wrap;
}
.lock-perk {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: rgba(181,234,240,0.6);
}
.lock-perk i { font-size: 14px; color: #22c55e; }

/* ============================================================
   FOOTER
   ============================================================ */
.page-footer {
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 32px 40px; text-align: center;
  transition: background 0.3s;
}
body.dark-mode .page-footer {
  background: #010e24;
  border-top: 1px solid rgba(100,160,220,0.08);
}
.page-footer p { font-size: 0.82rem; color: rgba(181,234,240,0.45); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .companies-grid { grid-template-columns: repeat(2, 1fr); }
  .page-inner { padding: 48px 24px 80px; }
  .nav-container { padding: 0 20px; }
}
@media (max-width: 600px) {
  .companies-grid { grid-template-columns: 1fr; }
  .lock-section { padding: 36px 24px; }
  .lock-perks { gap: 16px; }
}