/* ==========================================================================
   Network Marketing World - Core Design System & Styling
   Aesthetics: Premium, Modern International Corporate Intelligence Platform
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #161f33;
  --bg-card-hover: #1e2942;
  --border-subtle: #23304a;
  --border-focus: #3b82f6;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-card: linear-gradient(180deg, rgba(22, 31, 51, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --container-max: 1320px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   Desktop: 2-tier layout (Brand bar, then full navigation bar UNDER logo)
   Mobile: Hamburger icon only; all buttons inside the offcanvas menu
   ========================================================================== */

.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

/* Top Utility / Brand Tier */
.header-brand-tier {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-tier-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.2;
}

.brand-title span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-slogan {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Desktop Search in Brand Tier */
.header-search-bar {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.header-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.header-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.header-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 15px;
}

/* Brand Tier Right Actions */
.brand-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.phone-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.phone-badge svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent-emerald);
}

.lang-switch {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-switch a {
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.lang-switch a.active {
  background: var(--accent-blue);
  color: #fff;
}

/* Tier 2: Dedicated Navigation Bar UNDER Logo */
.header-nav-tier {
  background-color: rgba(17, 24, 39, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-links-scrollable {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 0;
  scrollbar-width: none; /* Firefox */
}

.nav-links-scrollable::-webkit-scrollbar {
  display: none; /* Chrome */
}

.nav-link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link-item:hover {
  color: #ffffff;
  background-color: var(--bg-card);
}

.nav-link-item.active {
  color: #ffffff;
  font-weight: 600;
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.nav-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-ai {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* Hamburger Toggle Button */
.hamburger-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.hamburger-icon {
  width: 26px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Offcanvas Drawer */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 1999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-overlay.active {
  display: block;
  opacity: 1;
}

.drawer-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-actions-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-phone-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  color: var(--accent-emerald);
  font-weight: 600;
  font-size: 0.9rem;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.drawer-nav-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.92rem;
}

.drawer-nav-item a:hover {
  background: var(--bg-card);
  color: var(--accent-blue);
}

/* ==========================================================================
   BUTTONS & UI ELEMENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

.btn-emerald {
  background: var(--gradient-emerald);
  color: #fff;
}

.btn-gold {
  background: var(--gradient-gold);
  color: #111;
  font-weight: 700;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Cards & Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.section-head {
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

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

/* Hero Section */
.hero-section {
  padding: 60px 0 70px 0;
  background: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 18px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

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

.hero-search-box input {
  width: 100%;
  padding: 16px 140px 16px 52px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
}

.hero-search-box input:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow);
}

.hero-search-box .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.hero-search-box button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
}

/* Hero Stats Bar */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-number.gold { color: var(--accent-gold); }
.stat-number.blue { color: var(--accent-blue); }
.stat-number.emerald { color: var(--accent-emerald); }
.stat-number.purple { color: var(--accent-purple); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Company Table / Cards */
.company-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.company-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.company-avatar {
  width: 52px;
  height: 52px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-blue);
}

.company-meta h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.company-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Table styles */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 14px 18px;
  background-color: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.data-table tr:hover td {
  background-color: rgba(59, 130, 246, 0.04);
}

/* Star Rating component */
.stars-display {
  color: var(--accent-gold);
  display: inline-flex;
  gap: 2px;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px 0;
  margin-top: auto;
}

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

.footer-col h5 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (CRITICAL REQUIREMENT)
   - Mobile: Hamburger menu only. NO buttons in mobile header bar.
   - All buttons located inside the hamburger offcanvas.
   ========================================================================== */

@media (max-width: 991px) {
  /* Hide desktop-only elements from header */
  .header-search-bar,
  .brand-actions,
  .header-nav-tier {
    display: none !important;
  }

  /* Show hamburger toggle */
  .hamburger-toggle {
    display: flex !important;
  }

  .brand-tier-inner {
    padding: 2px 0;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .grid-cols-4, .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

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

@media (min-width: 992px) {
  .hamburger-toggle {
    display: none !important;
  }
}
