/* =========================================
   NEXBIDS GLOBAL STYLES
   Design system: Dark tech theme, global feel
   ========================================= */

:root {
  /* Brand Colors */
  --primary: #0057FF;
  --primary-light: #3380FF;
  --primary-dark: #003DBF;
  --accent-dsp: #2563EB;
  --accent-adx: #7C3AED;
  --accent-ssp: #059669;

  /* Neutrals */
  --bg-dark: #080C16;
  --bg-card: #0F1629;
  --bg-section: #111827;
  --bg-light: #1A2235;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);

  /* Text */
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  /* Typography */
  --font-en: 'Inter', -apple-system, sans-serif;
  --font-zh: 'Noto Sans SC', 'PingFang SC', sans-serif;

  /* Spacing */
  --section-py: 96px;
  --container-max: 1280px;
  --nav-h: 76px;

  /* Effects */
  --glow-primary: 0 0 40px rgba(0,87,255,0.25);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.4);
  --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.6);
  --gradient-primary: linear-gradient(135deg, #0057FF, #7C3AED);
  --gradient-hero: radial-gradient(ellipse at 60% 0%, rgba(0,87,255,0.15) 0%, transparent 60%), radial-gradient(ellipse at 0% 100%, rgba(124,58,237,0.1) 0%, transparent 50%), #080C16;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-en);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
body.zh { font-family: var(--font-zh); }

a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ===== CONTAINERS ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8, 12, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  background: rgba(8, 12, 22, 0.99);
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-right: 32px;
  flex-shrink: 0;
}
.logo-icon {
  font-size: 26px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-menu {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 2px;
}
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(249,250,251,0.75);
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: -0.1px;
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}
.nav-link.active {
  color: var(--text-primary) !important;
  background: rgba(0,87,255,0.14);
  border-radius: 9px;
}
.nav-link svg { opacity: 0.55; transition: transform 0.2s; }
.nav-item:hover .nav-link svg { transform: rotate(180deg); opacity: 0.9; }

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14,18,32,0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 12px;
  min-width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.22s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  transition: background 0.15s;
  cursor: pointer;
}
.dropdown-item:hover { background: rgba(255,255,255,0.06); }
.di-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.di-icon.di-icon-svg svg { display: block; }
.di-icon.dsp-icon { background: rgba(37,99,235,0.2); color: #60A5FA; font-size: 12px; font-weight: 700; }
.di-icon.adx-icon { background: rgba(124,58,237,0.2); color: #A78BFA; font-size: 12px; font-weight: 700; }
.di-icon.ssp-icon { background: rgba(5,150,105,0.2); color: #34D399; font-size: 12px; font-weight: 700; }
.di-title { font-size: 14.5px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.di-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.lang-toggle {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.lang-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
}
.btn-login {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  transition: opacity 0.2s, transform 0.2s;
  letter-spacing: -0.1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-login:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,87,255,0.3); }
.login-dropdown .dropdown-menu {
  right: 0;
  left: auto;
  transform: translateX(0) translateY(-8px);
  min-width: 240px;
}
.login-dropdown:hover .dropdown-menu,
.login-dropdown .dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) translateY(0);
  pointer-events: auto;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== SECTION TYPOGRAPHY ===== */
.section-tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(0,87,255,0.12);
  color: var(--primary-light);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border: 1px solid rgba(0,87,255,0.2);
}
.section-tag.green { background: rgba(5,150,105,0.12); color: #34D399; border-color: rgba(5,150,105,0.2); }
.section-tag.purple { background: rgba(124,58,237,0.12); color: #A78BFA; border-color: rgba(124,58,237,0.2); }

.section-headline {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-headline .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}
.section-sub.center { margin: 0 auto; text-align: center; }
.text-center { text-align: center; }
.text-center .section-headline, .text-center .section-tag { display: inline-block; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,87,255,0.35); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); transform: translateY(-2px); }
.btn-ghost {
  color: var(--primary-light);
  padding: 0;
  font-weight: 600;
}
.btn-ghost:hover { color: var(--primary); }
.btn-group { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.25s;
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.card-grid {
  display: grid;
  gap: 24px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== STAT BADGE ===== */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0,87,255,0.1);
  color: #60A5FA;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(0,87,255,0.15);
}
.stat-badge.green { background: rgba(5,150,105,0.1); color: #34D399; border-color: rgba(5,150,105,0.15); }
.stat-badge.purple { background: rgba(124,58,237,0.1); color: #A78BFA; border-color: rgba(124,58,237,0.15); }
.stat-badge.gold { background: rgba(245,158,11,0.1); color: #FCD34D; border-color: rgba(245,158,11,0.15); }

/* ===== SECTIONS ===== */
.section {
  padding: var(--section-py) 0;
}
.section-dark { background: var(--bg-dark); }
.section-card { background: var(--bg-card); }
.section-subtle { background: var(--bg-section); }

/* ===== HERO SECTION ===== */
.hero {
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-content {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 60px 32px 64px;
  position: relative;
  z-index: 1;
}
/* Two-column hero layout */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 48px;
  align-items: center;
}
@media (max-width: 1100px) {
  .hero-layout { grid-template-columns: 1fr 380px; gap: 32px; }
}
@media (max-width: 860px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
.hero-text { min-width: 0; }
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -2px;
  max-width: 680px;
  margin-bottom: 22px;
}
.hero p {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ===== HERO VISUAL (right side) ===== */
.hero-visual {
  position: relative;
  flex-shrink: 0;
}
.hero-viz-card {
  background: rgba(14,18,32,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,87,255,0.1);
  backdrop-filter: blur(20px);
}
.hvz-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.hvz-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.hvz-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hvz-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hvz-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.hvz-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hvz-delta {
  font-size: 11px;
  font-weight: 600;
  color: #34D399;
  background: rgba(52,211,153,0.1);
  padding: 2px 6px;
  border-radius: 100px;
  letter-spacing: 0;
}

/* mini bar chart */
.hvz-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
  padding: 0 2px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
}
.hvz-bar {
  flex: 1;
  background: linear-gradient(to top, rgba(0,87,255,0.7), rgba(124,58,237,0.4));
  border-radius: 4px 4px 2px 2px;
  animation: barGrow 0.6s ease-out both;
}
@keyframes barGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

/* channel breakdown rows */
.hvz-channels { display: flex; flex-direction: column; gap: 7px; }
.hvz-ch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.hvz-ch-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.hvz-ch-label { width: 46px; color: var(--text-muted); flex-shrink: 0; }
.hvz-ch-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.hvz-ch-bar { height: 100%; border-radius: 4px; }
.hvz-ch-pct { font-size: 11px; font-weight: 600; width: 30px; text-align: right; flex-shrink: 0; }

/* floating badges */
.hvz-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(14,18,32,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(16px);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: badgeFloat 3s ease-in-out infinite alternate;
}
@keyframes badgeFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

/* ===== METRICS BAND ===== */
.metrics-band {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 32px;
}
.metrics-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.metric-item .metric-num {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1.5px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.metric-item .metric-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== FEATURE TABS ===== */
.tab-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tab-btn {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0,87,255,0.12);
  border-color: rgba(0,87,255,0.3);
}

/* ===== PLATFORM CARDS ===== */
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
.platform-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.platform-card.dsp::before { background: linear-gradient(90deg, var(--accent-dsp), #3B82F6); }
.platform-card.adx::before { background: linear-gradient(90deg, var(--accent-adx), #8B5CF6); }
.platform-card.ssp::before { background: linear-gradient(90deg, var(--accent-ssp), #10B981); }
.platform-card:hover { border-color: var(--border-hover); transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 4px 10px;
  border-radius: 6px;
}
.dsp .platform-tag { color: #60A5FA; background: rgba(37,99,235,0.12); }
.adx .platform-tag { color: #A78BFA; background: rgba(124,58,237,0.12); }
.ssp .platform-tag { color: #34D399; background: rgba(5,150,105,0.12); }

.platform-card h3 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.platform-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.platform-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

/* ===== FEATURE LIST ===== */
.feature-list { list-style: none; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.feature-list li::before {
  content: '✓';
  color: #34D399;
  font-weight: 700;
  margin-top: 1px;
  flex-shrink: 0;
}

/* ===== QUOTE BLOCK ===== */
.quote-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 32px 0;
}
.quote-block blockquote {
  font-size: 18px;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.quote-block cite {
  font-size: 14px;
  color: var(--text-secondary);
  font-style: normal;
}

/* ===== CTA BAND ===== */
/* Consistent top spacing: always ensure visual separation from previous section */
.section:has(.cta-band) {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  /* subtle top border line to visually separate from adjacent same-bg sections */
  border-top: 1px solid rgba(255,255,255,0.05);
}
.cta-band {
  background: linear-gradient(135deg, rgba(0,87,255,0.12), rgba(124,58,237,0.12));
  border: 1px solid rgba(0,87,255,0.2);
  border-radius: 24px;
  padding: 64px;
  text-align: center;
  margin: 0 32px;
}
.cta-band h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; margin-bottom: 16px; }
.cta-band p { font-size: 18px; color: var(--text-secondary); margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ===== TECH PILLARS ===== */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.25s;
}
.pillar-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.pillar-icon {
  display: block;
  margin-bottom: 20px;
}
.pillar-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.pillar-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table th:first-child { border-radius: 8px 0 0 8px; }
.data-table th:last-child { border-radius: 0 8px 8px 0; }
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.data-table td:first-child { color: var(--text-primary); font-weight: 500; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .check { color: #34D399; }
.data-table .dash { color: var(--text-muted); }

/* ===== CASE STUDY CARD ===== */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.case-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.case-card-top {
  padding: 24px 24px 16px;
  flex: 1;
}
.case-industry {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 12px;
}
.case-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.case-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.case-metrics {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.case-metric-badge {
  background: rgba(0,87,255,0.08);
  color: #60A5FA;
  border: 1px solid rgba(0,87,255,0.15);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent-adx));
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-dark);
}
.timeline-year {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 4px;
}
.timeline-item p { font-size: 14px; color: var(--text-secondary); }

/* ===== TEAM CARD ===== */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  transition: all 0.25s;
}
.team-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.team-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 auto 16px;
}
.team-card h4 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.team-card .team-title { font-size: 13px; color: var(--primary-light); margin-bottom: 12px; }
.team-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ===== JOB CARD ===== */
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
  cursor: pointer;
}
.job-card:hover { border-color: var(--primary); background: rgba(0,87,255,0.04); }
.job-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.job-card h4 { font-size: 16px; font-weight: 700; }
.job-apply { padding: 6px 14px; background: transparent; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; white-space: nowrap; transition: all 0.2s; }
.job-apply:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(0,87,255,0.06); }
.job-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.job-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--bg-light);
  color: var(--text-secondary);
}

/* ===== CONTACT CARDS ===== */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.25s;
  cursor: pointer;
}
.contact-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.contact-icon { font-size: 32px; margin-bottom: 16px; }
.contact-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.contact-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.contact-response { font-size: 12px; color: var(--text-muted); }

/* ===== FORM ===== */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
}
.form-group select option { background: var(--bg-dark); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.form-check input { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-left {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-left.dsp { background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(8,12,22,1)); }
.login-left.ssp { background: linear-gradient(135deg, rgba(5,150,105,0.12), rgba(8,12,22,1)); }
.login-left.adx { background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(8,12,22,1)); }
.login-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.login-left.dsp .login-platform-badge { background: rgba(37,99,235,0.15); color: #60A5FA; }
.login-left.ssp .login-platform-badge { background: rgba(5,150,105,0.15); color: #34D399; }
.login-left.adx .login-platform-badge { background: rgba(124,58,237,0.15); color: #A78BFA; }
.login-left h2 { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.login-left p { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; }
.login-stat-row { display: flex; gap: 16px; flex-wrap: wrap; }
.login-stat {
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.login-stat strong { color: var(--text-primary); display: block; font-size: 20px; font-weight: 800; }

.login-right {
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
}
.login-form-wrap { width: 100%; max-width: 380px; }
.login-form-wrap h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.login-form-wrap p { font-size: 15px; color: var(--text-secondary); margin-bottom: 32px; }
.login-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
  position: relative;
}
.login-divider::before, .login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
.btn-google {
  width: 100%;
  padding: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}
.btn-google:hover { background: rgba(255,255,255,0.08); }
.login-links { display: flex; justify-content: space-between; margin-top: 20px; font-size: 13px; }
.login-links a { color: var(--primary-light); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb span { color: var(--text-secondary); }

/* ===== PAGE HERO VARIANTS ===== */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 32px 64px;
  max-width: var(--container-max);
  margin: 0 auto;
}
/* Full-width outer wrapper so background spans 100vw */
.page-hero-section {
  width: 100%;
}
/* Two-column layout for page heroes with visual */
.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 60px) 32px 60px;
}
.page-hero-inner .page-hero-text { min-width: 0; }
.page-hero-visual {
  flex-shrink: 0;
  position: relative;
}
/* SVG illustration card shared styles */
.ph-viz-card {
  background: rgba(14,18,32,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
}
.ph-viz-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.ph-viz-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ph-viz-title { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
.ph-viz-body { padding: 20px; }

/* Floating badge for page hero visuals */
.ph-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(14,18,32,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(16px);
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  animation: badgeFloat 3s ease-in-out infinite alternate;
}
@keyframes badgeFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

@media (max-width: 1100px) {
  .page-hero-inner { grid-template-columns: 1fr 340px; gap: 32px; }
}
@media (max-width: 860px) {
  .page-hero-inner { grid-template-columns: 1fr; }
  .page-hero-inner .page-hero-visual { display: none; }
}
.page-hero-tag { margin-bottom: 20px; }
.page-hero h1,
.page-hero-text h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  line-height: 1.1;
}
.page-hero p,
.page-hero-text p { font-size: 18px; color: var(--text-secondary); max-width: 640px; line-height: 1.7; margin-bottom: 36px; }

/* Animated progress bar for visuals */
@keyframes progressFill {
  from { width: 0; }
}
.ph-bar-fill { animation: progressFill 1.2s ease-out both; }
.ph-bar-fill:nth-child(2) { animation-delay: 0.15s; }
.ph-bar-fill:nth-child(3) { animation-delay: 0.3s; }
.ph-bar-fill:nth-child(4) { animation-delay: 0.45s; }

/* ===== GLOBAL TRAFFIC MAP ===== */
.global-traffic-section { background: var(--bg-darker, #07090f); }
.gtm-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  margin-bottom: 32px;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1225 100%);
}
/* SVG world map base layer — rendered below the particle canvas */
.gtm-worldmap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 20px;
}
/* D3-rendered country fills — overridden inline by JS, these are fallback defaults */
.gtm-worldmap-svg path {
  stroke-linejoin: round;
}
.gtm-canvas {
  display: block;
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 20px;
  background: transparent;
}
/* Overlay with live stats */
.gtm-stats-overlay {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(10,14,26,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 8px 20px;
  backdrop-filter: blur(20px);
  white-space: nowrap;
}
.gtm-stat { text-align: center; padding: 0 16px; }
.gtm-stat-num { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.gtm-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.gtm-stat-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.1); flex-shrink: 0; }
/* Region badge labels */
.gtm-region-badges { position: absolute; inset: 0; pointer-events: none; }
.gtm-region-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--badge-color, #60A5FA);
  background: rgba(10,14,26,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 3px 8px;
  border-radius: 100px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.gtm-region-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--badge-color, #60A5FA);
  flex-shrink: 0;
  animation: pulse 1.8s ease-in-out infinite;
}
/* Footer stats row */
.gtm-footer-stats {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}
.gtm-footer-stat { flex: 1; min-width: 100px; text-align: center; }
.gtm-footer-icon { font-size: 20px; margin-bottom: 6px; }
.gtm-footer-val { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }
.gtm-footer-unit { font-size: 12px; font-weight: 500; opacity: 0.7; }
.gtm-footer-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
@media (max-width: 768px) {
  .gtm-canvas { height: 300px; }
  .gtm-region-badge { display: none; }
  .gtm-stats-overlay { padding: 6px 12px; }
  .gtm-stat-num { font-size: 14px; }
  .gtm-footer-stats { gap: 8px; }
  .gtm-footer-val { font-size: 16px; }
}

/* ===== OFFICE GRID ===== */
.office-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.office-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.office-card .office-role { font-size: 12px; color: var(--primary-light); font-weight: 600; margin-bottom: 12px; }
.office-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.office-card a { color: var(--primary-light); font-size: 13px; }

/* ===== SPEC TABLE ===== */
.spec-table {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.spec-table tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.spec-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.spec-table td:first-child { color: var(--text-secondary); width: 40%; }
.spec-table td:last-child { color: var(--text-primary); font-weight: 500; }
.spec-table tr:last-child td { border-bottom: none; }

/* ===== RTB FLOW DIAGRAM ===== */
.rtb-flow-steps {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 28px 12px;
  overflow-x: auto;
}
.rtb-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 0 10px;
  text-align: center;
  flex: 1;
  min-width: 130px;
}
/* Separator line between steps */
.rtb-flow-step:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.06);
}
.rtb-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rtb-step-label {
  width: 100%;
  flex: 1;
}
.rtb-step-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.rtb-step-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.rtb-step-ms {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.05);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  margin-top: auto;
}
.rtb-step-arrow { display: none; }
@media (max-width: 900px) {
  .rtb-flow-steps {
    flex-direction: column;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 1px;
    padding: 16px;
  }
  .rtb-flow-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
    padding: 12px 8px;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .rtb-flow-step:last-child { border-bottom: none; }
  .rtb-step-label { width: auto; flex: 1; }
  .rtb-step-ms { margin-top: 0; margin-left: auto; }
}

/* ===== AWARD BADGES ===== */
.award-list { display: flex; flex-wrap: wrap; gap: 12px; }
.award-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.award-badge .award-icon { font-size: 20px; }
.award-badge .award-year { font-size: 13px; font-weight: 600; color: var(--primary-light); }
.award-badge .award-name { font-size: 13px; color: var(--text-primary); }

/* ===== RESOURCES ===== */
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.2s;
}
.resource-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.resource-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(0,87,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.resource-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.resource-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ===== COMPARISON TABLE ===== */
.comparison-table-wrap {
  overflow-x: auto;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.comparison-table th {
  padding: 16px 20px;
  text-align: center;
  background: var(--bg-light);
  font-size: 14px;
  font-weight: 600;
}
.comparison-table th:first-child { text-align: left; }
.comparison-table td {
  padding: 14px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}
.comparison-table td:first-child { text-align: left; color: var(--text-primary); font-weight: 500; }
.comparison-table .check-green { color: #34D399; font-size: 18px; }
.comparison-table .dash { color: var(--text-muted); }
.comparison-table .val { color: var(--text-primary); font-weight: 600; }

/* ===== PAGE TRANSITION ===== */
.page-transition {
  animation: fadeIn 0.35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BACK TO TOP / BREADCRUMB NAV ===== */
.sub-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
}
.sub-nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sub-nav-links { display: flex; gap: 24px; }
.sub-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.sub-nav-link:hover { color: var(--text-primary); }

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 32px;
}

/* ===== GRID UTILITY ===== */
.flex { display: flex; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.wrap { flex-wrap: wrap; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.w-full { width: 100%; }

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.lang-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
}
.lang-btn svg { opacity: 0.55; flex-shrink: 0; transition: transform 0.2s; }
.lang-selector:has(#langDropdown.open) .lang-btn svg { transform: rotate(180deg); }

.lang-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(14,18,32,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 8px;
  width: 260px;
  max-height: 420px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s cubic-bezier(0.16,1,0.3,1),
              transform 0.2s cubic-bezier(0.16,1,0.3,1),
              visibility 0.2s;
  z-index: 9999;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
}
.lang-option:hover { background: rgba(255,255,255,0.07); color: var(--text-primary); }
.lang-option.active { background: rgba(0,87,255,0.15); color: var(--primary-light); }
.lang-flag { font-size: 14px; flex-shrink: 0; }
.lang-name { font-size: 12.5px; }

/* Small footer variant */
.lang-btn-sm { padding: 6px 10px; font-size: 12px; }
.lang-selector-sm { display: inline-block; }

/* Footer lang dropdown: pops upward — position set by JS */
.lang-dropdown-up {
  /* position/top/right set dynamically by toggleLangDropdownFooter() */
}
.lang-dropdown-up.open {
  /* inherits from .lang-dropdown.open */
}

/* RTL support */
body.rtl { direction: rtl; }
/* direction:rtl already reverses flex order; no need for row-reverse */
body.rtl .nav-container { flex-direction: row; }
/* nav-actions: keep items in a fixed LTR order so login btn stays adjacent to lang selector */
body.rtl .nav-actions { flex-direction: row; direction: ltr; }
/* lang-dropdown anchors to the left edge of its trigger in RTL context */
body.rtl .lang-dropdown { right: auto; left: 0; }
/* login dropdown stays anchored to the right of the button */
body.rtl .login-dropdown .dropdown-menu { left: 0; right: auto; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}
.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}
.footer-tagline { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; max-width: 220px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.social-link:hover { border-color: var(--border-hover); color: var(--text-primary); }
.footer-col h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
  cursor: pointer;
}
.footer-col ul li a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p { font-size: 14px; color: var(--text-muted); }
.lang-toggle-sm {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.lang-toggle-sm:hover { color: var(--text-primary); border-color: var(--border-hover); }

/* ===== GLASS ICON — unified single definition ===== */
.gi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
  position: relative;
  border: 1px solid rgba(255,255,255,0.10);
  transition: transform 0.2s ease;
  line-height: 0;
  font-size: 0;
  vertical-align: middle;
}
.gi-sm { width: 36px; height: 36px; border-radius: 10px; }
.gi-md { width: 48px; height: 48px; border-radius: 12px; }
.gi-lg { width: 56px; height: 56px; border-radius: 14px; }
.gi-xl { width: 68px; height: 68px; border-radius: 16px; }

.gi-blue   { background: rgba(0,87,255,0.15);   color: #60A5FA; }
.gi-purple { background: rgba(124,58,237,0.15); color: #C084FC; }
.gi-green  { background: rgba(5,150,105,0.15);  color: #34D399; }
.gi-amber  { background: rgba(245,158,11,0.15); color: #FCD34D; }
.gi-red    { background: rgba(239,68,68,0.15);  color: #F87171; }
.gi-teal   { background: rgba(6,182,212,0.15);  color: #22D3EE; }
.gi-neutral{ background: rgba(255,255,255,0.06);color: #9CA3AF; }

.gi svg { display: block; color: transparent; }
.pillar-card .gi { width: 52px; height: 52px; border-radius: 14px; }
.card:hover .gi, .pillar-card:hover .gi { transform: scale(1.06); }

/* ===== METRIC COUNTER ANIMATION ===== */
.metric-num {
  transition: transform 0.3s ease;
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.metric-item.animate .metric-num {
  animation: countUp 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
/* Stagger each column */
.metric-item:nth-child(1).animate .metric-num { animation-delay: 0.0s; }
.metric-item:nth-child(2).animate .metric-num { animation-delay: 0.1s; }
.metric-item:nth-child(3).animate .metric-num { animation-delay: 0.2s; }
.metric-item:nth-child(4).animate .metric-num { animation-delay: 0.3s; }

/* ===== NAV ACTIVE STATE ===== */
.nav-active-dot {
  display: none;
  width: 4px; height: 4px;
  background: var(--primary-light);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  margin-bottom: 2px;
}
.nav-link.active .nav-active-dot {
  display: inline-block;
}

/* ===== PRIVACY POLICY MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeBackdrop 0.25s ease;
}
@keyframes fadeBackdrop {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 760px;
  width: 100%;
  max-height: 82vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: slideModal 0.3s cubic-bezier(0.34,1.2,0.64,1);
}
@keyframes slideModal {
  from { opacity: 0; transform: scale(0.93) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h2 { font-size: 20px; font-weight: 700; }
.modal-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text-primary); border-color: var(--border-hover); }
.modal-body {
  padding: 28px 32px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.modal-body h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 20px 0 8px; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 12px; }
.modal-body ul { margin: 8px 0 12px 20px; list-style: disc; }
.modal-body ul li { margin-bottom: 4px; }
.modal-footer-bar {
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  text-align: right;
}

/* ===== 404 PAGE ===== */
.page-404 {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 24px;
  padding: calc(var(--nav-h) + 60px) 32px 60px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,87,255,0.1) 0%, transparent 60%), var(--bg-dark);
}
.page-404 .err-code {
  font-size: clamp(80px,15vw,160px);
  font-weight: 900;
  letter-spacing: -8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.page-404 h2 { font-size: 28px; font-weight: 700; }
.page-404 p { color: var(--text-secondary); font-size: 16px; max-width: 480px; }

/* ===== COUNTRY SEARCH DROPDOWN ===== */
.country-select-wrap {
  position: relative;
}
.country-search-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.country-search-input:focus { border-color: var(--primary); }
.country-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-dark);
  border: 1px solid var(--primary);
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.country-dropdown-list.open { display: block; }
.country-option {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.country-option:hover, .country-option.selected { background: rgba(0,87,255,0.12); color: var(--text-primary); }
/* country-hidden-input removed — no longer used */

/* ===== PASSWORD TOGGLE ===== */
.pw-wrap {
  position: relative;
}
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s;
}
.pw-toggle:hover { color: var(--text-secondary); }

/* ===== PLATFORM CARD BTN EQUAL HEIGHT ===== */
.platform-card .card-actions {
  margin-top: auto;
}
.platform-card {
  display: flex;
  flex-direction: column;
}
.platform-card .platform-body {
  flex: 1;
}

/* ===== PARTNERS SECTION — CAROUSEL ===== */
.partners-section { padding: var(--section-py) 0; }

.partner-carousels {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 48px;
}

/* Each row: label on top, carousel below */
.partner-carousel-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Label / category tag header */
.partner-carousel-header {
  display: flex;
  align-items: center;
  padding: 0 2px;
}

/* Category tag pill */
.prow-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #60A5FA;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.partner-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  position: relative;
}

.pcarousel-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}
.pcarousel-btn:hover {
  background: var(--bg-light);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.partner-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.partner-carousel-track::-webkit-scrollbar { display: none; }

/* Partner banner card */
.pcard { flex-shrink: 0; scroll-snap-align: start; }
.pcard-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: default;
  transition: all 0.22s;
  min-width: 160px;
}
.pcard-inner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  filter: brightness(1.08);
}

/* Logo container */
.pcard-logo-wrap {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
}
.pcard-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  border-radius: 3px;
}
.pcard-abbr {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
  flex-shrink: 0;
}
.pcard-abbr-fallback {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}
.pcard-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.partner-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
}
@media (max-width: 640px) {
  .partner-stats-row { grid-template-columns: repeat(2, 1fr); padding: 24px 20px; }
  .prow-tag { font-size: 11px; padding: 4px 10px; }
  .pcard-inner { min-width: 130px; padding: 9px 14px 9px 10px; }
  .pcard-logo-wrap { width: 28px; height: 28px; border-radius: 6px; }
  .pcard-logo-img { width: 20px; height: 20px; }
  .pcard-abbr-fallback { width: 28px; height: 28px; font-size: 9px; }
  .pcard-name { font-size: 12px; }
}
@media (max-width: 480px) {
  /* handled in MOBILE Partners section below */
}
.partner-stat-num {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.partner-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .nav-menu { gap: 0; }
  .nav-link { padding: 8px 11px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --section-py: 64px; }
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg-dark);
    padding: 24px;
    overflow-y: auto;
    z-index: 999;
  }
  /* Dropdown menus hidden by default in mobile — controlled by .expanded via JS */
  .nav-menu.open .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    margin: 0;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    border: none;
    border-radius: 0;
    padding: 4px 0 8px;
    min-width: 0;
    width: 100%;
    display: none;
  }
  .nav-menu.open .dropdown.expanded .dropdown-menu {
    display: block;
  }
  .mobile-menu-btn { display: flex; }
  .login-dropdown { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .login-page { grid-template-columns: 1fr; }
  .login-left { padding: 40px; min-height: auto; }
  .login-right { padding: 40px; }
  .cta-band { padding: 40px 32px; margin: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-py: 48px; }
  .container { padding: 0 20px; }
  .nav-container { padding: 0 20px; }
  .hero-content { padding: 28px 20px; }
  .hero h1 { letter-spacing: -1px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .metric-item .metric-num { font-size: 32px; }
  .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; margin: 0 12px; }
  .contact-form { padding: 24px; }
  /* footer-grid layout handled in MOBILE — Footer section below */
  .page-hero { padding: calc(var(--nav-h) + 32px) 20px 40px; }
  .section { padding: 48px 0; }
}

/* =========================================
   SVG LOGO
   ========================================= */
.nexbids-logo {
  display: block;
  flex-shrink: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  margin-right: 24px;
  flex-shrink: 0;
  opacity: 0.95;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 1; }

/* =========================================
   GLASS ICON SYSTEM (merged — no duplicates)
   ========================================= */

/* Step number circle (glass) */
.step-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,87,255,0.25), rgba(153,52,255,0.25));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: white;
  box-shadow: 0 2px 12px rgba(0,87,255,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  margin: 0 auto 16px;
  flex-shrink: 0;
}

/* Dropdown icon glass upgrade — consolidated above */
.di-icon.dsp-icon {
  background: rgba(0, 87, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0,87,255,0.2);
  color: #60A5FA; font-size: 12px; font-weight: 700;
}
.di-icon.adx-icon {
  background: rgba(153, 52, 255, 0.18);
  box-shadow: 0 2px 8px rgba(153,52,255,0.2);
  color: #C084FC; font-size: 12px; font-weight: 700;
}
.di-icon.ssp-icon {
  background: rgba(5, 150, 105, 0.18);
  box-shadow: 0 2px 8px rgba(5,150,105,0.2);
  color: #34D399; font-size: 12px; font-weight: 700;
}

/* =========================================
   MOBILE — Touch Targets & Interaction
   ========================================= */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover transforms on touch devices to prevent sticky states */
  .card:hover,
  .platform-card:hover,
  .pillar-card:hover,
  .case-card:hover,
  .contact-card:hover,
  .team-card:hover,
  .job-card:hover,
  .resource-card:hover {
    transform: none;
    box-shadow: none;
  }
  .btn-primary:hover,
  .btn-secondary:hover { transform: none; box-shadow: none; }

  /* Larger tap targets */
  .nav-link { min-height: 48px; }
  .btn { min-height: 48px; }
  .dropdown-item { min-height: 52px; }
}

/* =========================================
   MOBILE NAV — Enhanced mobile menu
   ========================================= */
@media (max-width: 900px) {
  /* Hamburger animation — open state */
  .mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile nav menu full-screen overlay */
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(8,12,22,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 0 32px;
    overflow-y: auto;
    z-index: 999;
    gap: 0;
    animation: mobileMenuSlide 0.25s ease;
  }
  @keyframes mobileMenuSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Nav items in mobile */
  .nav-menu.open .nav-item {
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .nav-menu.open .nav-link {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 0;
    justify-content: space-between;
    color: var(--text-primary);
  }
  .nav-menu.open .nav-link.active {
    background: rgba(0,87,255,0.1);
    border-radius: 0;
  }

  /* Mobile dropdown — accordion style */
  .nav-menu.open .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    margin: 0;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    border: none;
    border-radius: 0;
    padding: 4px 0 8px;
    border-top: 1px solid var(--border);
    min-width: 0;
    width: 100%;
    display: none;
  }
  .nav-menu.open .dropdown.expanded .dropdown-menu {
    display: block;
  }
  .nav-menu.open .dropdown-item {
    padding: 12px 32px;
    border-radius: 0;
  }

  /* Chevron rotation on expanded */
  .nav-menu.open .dropdown.expanded .nav-link svg {
    transform: rotate(180deg);
    opacity: 0.9;
  }

  /* Mobile Login button — inline in menu */
  .nav-menu.open .mobile-login-section {
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    flex-direction: column;
    margin-top: 8px;
  }
  .nav-menu.open .mobile-login-section .btn-login-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    background: var(--gradient-primary);
    width: 100%;
  }

  /* Hide desktop login dropdown in mobile */
  .login-dropdown { display: none !important; }

  /* Language selector adjustment */
  .nav-actions .lang-selector { order: -1; }
  .lang-btn { padding: 7px 10px; }
  .lang-btn span { display: none; }
}

/* =========================================
   MOBILE — Home Page
   ========================================= */
@media (max-width: 640px) {
  /* Hero */
  .hero-content { padding: 24px 16px 40px; }
  .hero h1 {
    font-size: clamp(28px, 8vw, 40px);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
  }
  .hero p {
    font-size: 15px;
    margin-bottom: 28px;
  }
  .btn-group {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .btn-group .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
  .hero-badges {
    gap: 8px;
    flex-wrap: wrap;
  }
  .stat-badge { font-size: 12px; padding: 3px 10px; }

  /* Metrics band */
  .metrics-band { padding: 28px 16px; }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .metric-item .metric-num { font-size: 28px; letter-spacing: -1px; }
  .metric-item .metric-label { font-size: 12px; }
}

/* =========================================
   MOBILE — Section Layouts
   ========================================= */
@media (max-width: 900px) {
  .section { padding: 56px 0; }

  /* Two-col grids → single column */
  .home-tech-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: repeat(2"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(2"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: repeat(3"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:repeat(3"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* Spec table full width */
  .spec-table { font-size: 13px; }
  .spec-table td { padding: 12px 14px; }
}

@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }
  .nav-container { padding: 0 16px; }

  /* All multi-col inline grids → single column */
  [style*="grid-template-columns: repeat(3"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(3"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* Section typography */
  .section-headline { font-size: clamp(24px, 6vw, 36px); letter-spacing: -0.5px; }
  .section-sub { font-size: 15px; }

  /* Card padding */
  .card { padding: 20px; }
  .platform-card { padding: 24px; }
  .pillar-card { padding: 24px; }

  /* CTA Band */
  .cta-band {
    padding: 28px 20px;
    margin: 0 8px;
    border-radius: 16px;
  }
  .cta-band h2 { font-size: clamp(22px, 6vw, 32px); }
  .cta-band p { font-size: 15px; margin-bottom: 24px; }
  .cta-band .btn-group {
    flex-direction: column;
    gap: 10px;
  }
  .cta-band .btn-group .btn { width: 100%; justify-content: center; }

  /* Page hero */
  .page-hero { padding: calc(var(--nav-h) + 24px) 16px 32px; }
  .page-hero-inner {
    grid-template-columns: 1fr !important;
    padding: calc(var(--nav-h) + 24px) 16px 32px !important;
    gap: 24px !important;
  }
  .page-hero-inner .page-hero-visual { display: none !important; }
  .page-hero h1,
  .page-hero-text h1 { font-size: clamp(26px, 7vw, 42px); letter-spacing: -0.5px; margin-bottom: 14px; }
  .page-hero p,
  .page-hero-text p { font-size: 15px; margin-bottom: 24px; }

  /* Sub-nav scrollable */
  .sub-nav { padding: 10px 16px; overflow-x: auto; }
  .sub-nav-inner { gap: 8px; flex-wrap: nowrap; min-width: max-content; }
  .sub-nav-links { gap: 16px; flex-wrap: nowrap; }
  .sub-nav-link { font-size: 13px; white-space: nowrap; }
}

/* =========================================
   MOBILE — Cards & Grids
   ========================================= */
@media (max-width: 640px) {
  /* Card grids */
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .pillar-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Platform cards */
  .platform-card h3 { font-size: 22px; }
  .platform-stats { gap: 6px; }

  /* Quote block */
  .quote-block { padding: 20px 20px; }
  .quote-block blockquote { font-size: 15px; }

  /* Resource cards */
  .resource-card { flex-direction: column; gap: 12px; }

  /* Team cards grid */
  .team-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }

  /* Job cards */
  .job-card-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .job-apply { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .team-grid { grid-template-columns: 1fr !important; }
}

/* =========================================
   MOBILE — Table Overflow
   ========================================= */
@media (max-width: 768px) {
  /* Comparison & data tables — horizontal scroll */
  .comparison-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison-table { min-width: 480px; font-size: 13px; }
  .comparison-table th,
  .comparison-table td { padding: 10px 14px; }

  .data-table th,
  .data-table td { padding: 10px 12px; font-size: 13px; }

  /* Spec table responsive */
  .spec-table td:first-child { width: 50%; }
  .spec-table td { font-size: 13px; padding: 10px 14px; }

  /* Wrap long tables in scroll container */
  table.data-table,
  table.comparison-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* =========================================
   MOBILE — RTB Flow Diagram
   ========================================= */
@media (max-width: 640px) {
  .rtb-flow-diagram { margin-top: 32px !important; }
  .rtb-flow-steps {
    flex-direction: column;
    overflow-x: visible;
    gap: 0;
    padding: 12px;
    border-radius: 12px;
  }
  .rtb-flow-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-width: 0;
    padding: 14px 10px;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 14px;
  }
  .rtb-flow-step:last-child { border-bottom: none; }
  .rtb-step-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
  }
  .rtb-step-label { flex: 1; width: auto; }
  .rtb-step-num { font-size: 13px; margin-bottom: 3px; }
  .rtb-step-desc { font-size: 11px; }
  .rtb-step-ms {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 11px;
  }
}

/* =========================================
   MOBILE — Technology Page
   ========================================= */
@media (max-width: 900px) {
  /* Tech infrastructure grid */
  .section .home-tech-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

@media (max-width: 640px) {
  /* RTB infra items */
  .home-tech-grid > div > div[style*="display:flex"] {
    gap: 12px;
  }
}

/* =========================================
   MOBILE — Contact Page
   ========================================= */
@media (max-width: 768px) {
  .contact-form { padding: 24px 20px; border-radius: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  .contact-form { padding: 20px 16px; }
}

/* =========================================
   MOBILE — Login Page
   ========================================= */
@media (max-width: 768px) {
  .login-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-left {
    padding: 32px 24px 28px;
    min-height: auto;
  }
  .login-right {
    padding: 28px 24px 40px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .login-form-wrap { max-width: 100%; }
  .login-stat-row { gap: 10px; }
  .login-stat { padding: 8px 12px; }
  .login-stat strong { font-size: 16px; }
}

/* =========================================
   MOBILE — Footer
   ========================================= */
@media (max-width: 900px) {
  .footer { padding: 48px 0 0; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer { padding: 32px 0 0; }
  .footer-container { padding: 0 16px; }
  .footer-tagline { max-width: 100%; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 0;
  }

  /* ---- Collapsible footer columns on mobile ---- */
  .footer-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  /* Brand section stays expanded */
  .footer-brand {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }

  /* Each link column becomes an accordion item */
  .footer-col {
    border-bottom: 1px solid var(--border);
  }

  .footer-col h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Chevron arrow using CSS */
  .footer-col h4::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 8px;
    position: relative;
    top: -2px;
  }

  .footer-col.open h4::after {
    transform: rotate(-135deg);
    top: 2px;
  }

  /* Collapsed state: links hidden */
  .footer-col ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding-bottom 0.3s ease;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  /* Expanded state */
  .footer-col.open ul {
    max-height: 400px;
    padding-bottom: 16px;
  }
}

@media (max-width: 400px) {
  /* Already handled by flex column above on mobile */
}

/* =========================================
   MOBILE — Partners Section
   ========================================= */
@media (max-width: 768px) {
  .partner-carousels { gap: 20px; margin-bottom: 36px; }
  .partner-carousel-row { gap: 10px; }
  .partner-carousel-header { padding: 0; }
  .partner-carousel-wrap { width: 100%; }
  .pcarousel-btn { width: 30px; height: 30px; flex-shrink: 0; }
  .partner-stats-row {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 16px;
    gap: 16px;
    border-radius: 16px;
  }
  .partner-stat-num { font-size: 22px; }
  .partner-stat-label { font-size: 12px; }
}

@media (max-width: 640px) {
  /* Cards: comfortable width on small screens */
  .pcard { flex: 0 0 auto !important; }
  .pcard-inner {
    min-width: 140px;
    padding: 10px 14px 10px 10px;
  }
  /* Hide prev/next nav buttons — pure touch swipe on mobile */
  .pcarousel-btn { display: none !important; }
  .partner-carousel-track { padding: 4px 0 12px; }
}

@media (max-width: 480px) {
  .prow-tag { font-size: 11px; padding: 4px 10px; }
  .pcard-inner { min-width: 125px; }
}

/* =========================================
   MOBILE — Global Traffic Map
   ========================================= */
@media (max-width: 640px) {
  .gtm-canvas { height: 220px; }
  .gtm-stats-overlay {
    padding: 5px 10px;
    gap: 0;
    border-radius: 20px;
  }
  .gtm-stat { padding: 0 10px; }
  .gtm-stat-num { font-size: 12px; }
  .gtm-stat-label { font-size: 9px; }
  .gtm-stat-divider { height: 24px; }
  .gtm-footer-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 0;
  }
  .gtm-footer-val { font-size: 18px; }
  .gtm-footer-icon { font-size: 16px; }
  .gtm-region-badge { display: none; }
}

/* =========================================
   MOBILE — Modal
   ========================================= */
@media (max-width: 640px) {
  .modal-backdrop { padding: 12px; align-items: flex-end; }
  .modal-box {
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
  }
  @keyframes slideModal {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .modal-header { padding: 18px 20px; }
  .modal-body { padding: 20px; }
  .modal-footer-bar { padding: 12px 20px; }
}

/* =========================================
   MOBILE — Hero Visual Viz Card
   ========================================= */
@media (max-width: 860px) {
  .hero-visual { display: none; }
  .hero-layout { grid-template-columns: 1fr !important; }
}

/* =========================================
   MOBILE — Case Study Cards
   ========================================= */
@media (max-width: 640px) {
  .case-card { border-radius: 14px; }
  .case-metrics { gap: 6px; padding: 12px 16px; }
  .case-metric-badge { font-size: 11px; padding: 3px 8px; }
}

/* =========================================
   MOBILE — Award Badges
   ========================================= */
@media (max-width: 640px) {
  .award-list { gap: 8px; }
  .award-badge { padding: 9px 12px; }
  .award-badge .award-name { font-size: 12px; }
}

/* =========================================
   MOBILE — Breadcrumb & Sub-nav
   ========================================= */
@media (max-width: 640px) {
  .breadcrumb { font-size: 12px; gap: 6px; }
  .sub-nav { overflow-x: auto; }
  .sub-nav-inner { min-width: max-content; white-space: nowrap; }
}

/* =========================================
   MOBILE — 404 Page
   ========================================= */
@media (max-width: 640px) {
  .page-404 { padding: calc(var(--nav-h) + 40px) 16px 40px; }
  .page-404 .err-code { font-size: clamp(60px, 20vw, 100px); letter-spacing: -4px; }
  .page-404 h2 { font-size: 22px; }
  .page-404 p { font-size: 14px; }
  .page-404 .btn-group { flex-direction: column; width: 100%; }
  .page-404 .btn-group .btn { width: 100%; justify-content: center; }
}

/* =========================================
   MOBILE — Language Dropdown
   ========================================= */
@media (max-width: 640px) {
  .lang-dropdown {
    width: 260px;
    max-height: 380px;
  }
  /* nav-actions lang dropdown position is set by JS (fixed) */
}

/* =========================================
   MOBILE — Scrollable Overflow Helpers
   ========================================= */
@media (max-width: 768px) {
  /* Prevent horizontal overflow without breaking sticky children */
  .section { overflow-x: clip; }
  .page-hero-section { overflow-x: clip; }
}

/* =========================================
   MOBILE — Typography Adjustments
   ========================================= */
@media (max-width: 640px) {
  /* Platform card headings */
  .platform-card h3 { font-size: 20px; }
  .platform-card p { font-size: 14px; }

  /* Tab list */
  .tab-list { gap: 6px; }
  .tab-btn { padding: 7px 14px; font-size: 13px; }

  /* Stat badges in hero */
  .hero-badges { display: flex; flex-wrap: wrap; gap: 6px; }

  /* Timeline */
  .timeline { padding-left: 24px; }
  .timeline-dot { left: -20px; }
  .timeline-item p { font-size: 13px; }
  .timeline-year { font-size: 13px; }

  /* Office card */
  .office-card { padding: 18px; }

  /* Section dividers */
  .divider { margin: 0 16px; }
}

/* =========================================
   MOBILE — Safe Area (iPhone notch etc)
   ========================================= */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: env(safe-area-inset-bottom); }
  .navbar {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .nav-menu.open {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}

/* =========================================
   MOBILE — inline style grid overrides
   (for JS-rendered sections with inline styles)
   ========================================= */
@media (max-width: 768px) {
  /* Technology page: RTB infra two-col */
  section .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Products page feature grid */
  div[style*="grid-template-columns: 1fr 1fr;"] {
    grid-template-columns: 1fr !important;
  }
  /* Team grid */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Office grid */
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Case study details */
  div[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* tech-infra-grid mobile */
@media (max-width: 768px) {
  .tech-infra-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
}

/* MOBILE — home-tech-grid universal */
@media (max-width: 900px) {
  .home-tech-grid, .tech-infra-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* ---- SSP/Hiring steps handled below ---- */

/* MOBILE — repeat(4,1fr) grids */
@media (max-width: 768px) {
  div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2,1fr) !important;
  }
}
@media (max-width: 400px) {
  div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* MOBILE — repeat(5,1fr) grids */
@media (max-width: 900px) {
  div[style*="grid-template-columns:repeat(5,1fr)"] {
    grid-template-columns: repeat(3,1fr) !important;
  }
}
@media (max-width: 640px) {
  div[style*="grid-template-columns:repeat(5,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================
   MOBILE — Language Selector in Menu
   ========================================= */
.mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.mobile-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-lang-btn span:first-child { font-size: 15px; flex-shrink: 0; }
.mobile-lang-btn.active {
  background: rgba(0,87,255,0.15);
  border-color: rgba(0,87,255,0.4);
  color: #60A5FA;
  font-weight: 700;
}
.mobile-lang-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

/* =========================================
   MOBILE — Nav Menu Height Fix
   ========================================= */
@media (max-width: 900px) {
  /* Ensure the mobile menu extends the full remaining screen height */
  .nav-menu.open {
    height: calc(100dvh - var(--nav-h));
    max-height: none;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }
  /* Each nav item takes full width and is tappable */
  .nav-menu.open .nav-item {
    flex-shrink: 0;
  }
}

/* =========================================
   MOBILE — Horizontal Swipe Cards
   ========================================= */
/* Wrapper that converts card grids to horizontal scroll on mobile */
.swipe-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  /* hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.swipe-row::-webkit-scrollbar { display: none; }

.swipe-row > * {
  flex: 0 0 calc(85vw - 32px);
  max-width: 360px;
  scroll-snap-align: start;
}

/* Scroll indicator dots */
.swipe-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.swipe-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-hover);
  transition: all 0.3s;
}
.swipe-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--primary);
}

/* On desktop keep grid layout (these classes only affect mobile) */
.mobile-swipe-wrap .swipe-row { display: none; }
.mobile-swipe-wrap .card-grid { display: grid; }

@media (max-width: 768px) {
  .mobile-swipe-wrap .swipe-row { display: flex; }
  .mobile-swipe-wrap .card-grid { display: none; }
  .mobile-swipe-wrap { overflow: hidden; }
}

/* =========================================
   MOBILE — section card-grid-3 swipe 
   (platform cards, who-we-serve, case studies)
   ========================================= */
@media (max-width: 768px) {
  /* Turn swipeable card-grid into a horizontal swipe track */
  .card-grid-3.swipeable,
  .card-grid-4.swipeable,
  .card-grid-2.swipeable {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px !important;
    padding: 4px 0 16px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* extend past container edges for full-bleed feel */
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .card-grid-3.swipeable::-webkit-scrollbar,
  .card-grid-4.swipeable::-webkit-scrollbar,
  .card-grid-2.swipeable::-webkit-scrollbar { display: none; }

  /* Each card becomes a fixed-width slide */
  .card-grid-3.swipeable > *,
  .card-grid-4.swipeable > *,
  .card-grid-2.swipeable > * {
    flex: 0 0 min(80vw, 320px) !important;
    width: min(80vw, 320px) !important;
    max-width: none !important;
    scroll-snap-align: start;
  }

  /* Platform cards should keep their height natural */
  .platform-card {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Case study cards */
  .case-card {
    min-height: 220px;
  }
}

/* =========================================
   MOBILE — GTM Footer Stats Scroll
   ========================================= */
@media (max-width: 768px) {
  .gtm-footer-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 8px !important;
    padding-top: 16px;
    padding-bottom: 12px;
    /* bleed to edges for full-width scroll feel */
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    /* reset any grid props */
    grid-template-columns: none;
  }
  .gtm-footer-stats::-webkit-scrollbar { display: none; }
  .gtm-footer-stat {
    flex: 0 0 auto !important;
    width: 120px;
    min-width: 120px;
    padding: 12px 14px;
    scroll-snap-align: start;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
  }
}

/* =========================================
   MOBILE — Tab Lists Scroll
   ========================================= */
@media (max-width: 640px) {
  /* Make tab lists horizontally scrollable */
  .tab-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }

  /* Feature grids in product pages — scroll */
  .features-grid-3 {
    display: flex !important;
    overflow-x: auto;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .features-grid-3::-webkit-scrollbar { display: none; }
  .features-grid-3 > * {
    flex: 0 0 80vw;
    max-width: 320px;
    scroll-snap-align: start;
  }
}

/* =========================================
   MOBILE — Logo size
   ========================================= */
@media (max-width: 480px) {
  .nexbids-logo { width: 160px !important; height: auto !important; }
}

/* =========================================
   MOBILE — All Sub-page Adaptations
   ========================================= */

/* ---- pillar-grid: swipe on mobile ---- */
@media (max-width: 768px) {
  .pillar-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px !important;
    padding: 4px 0 16px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .pillar-grid::-webkit-scrollbar { display: none; }
  .pillar-grid > .pillar-card {
    flex: 0 0 min(82vw, 300px) !important;
    width: min(82vw, 300px) !important;
    scroll-snap-align: start;
  }
}

/* ---- Two-column "tech/story/mission" grids → stack on mobile ---- */
@media (max-width: 768px) {
  .home-tech-grid,
  .tech-infra-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
}

/* ---- Products Overview: platform-card inner grid → stack ---- */
@media (max-width: 768px) {
  .platform-card[style*="grid-template-columns:1fr auto"],
  .platform-card[style*="grid-template-columns: 1fr auto"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  /* stats mini-grid inside product overview cards */
  .platform-card div[style*="display:flex;flex-wrap:wrap"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* ---- SSP Integration 4-step grid + hiring steps → swipe ---- */
@media (max-width: 768px) {
  .integration-steps,
  .hiring-steps {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px !important;
    padding: 4px 0 16px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .integration-steps::-webkit-scrollbar,
  .hiring-steps::-webkit-scrollbar { display: none; }
  .integration-steps > *,
  .hiring-steps > * {
    flex: 0 0 min(65vw, 220px) !important;
    scroll-snap-align: start;
  }
}

/* ---- Quote block: tighter on mobile ---- */
@media (max-width: 640px) {
  .quote-block {
    padding: 20px 16px;
  }
  .quote-block blockquote {
    font-size: 15px;
    line-height: 1.65;
  }
}

/* ---- Spec table: full-width, smaller text on mobile ---- */
@media (max-width: 640px) {
  .spec-table {
    font-size: 12px;
  }
  .spec-table td {
    padding: 8px 10px;
  }
  .spec-table td:first-child { width: 45%; }
}

/* ---- Timeline: tighter on mobile ---- */
@media (max-width: 640px) {
  .timeline { padding-left: 24px; }
  .timeline-year { font-size: 13px; }
  .timeline-item p { font-size: 13px; }
  .timeline-item { margin-bottom: 24px; }
}

/* ---- Award list: single column on mobile ---- */
@media (max-width: 640px) {
  .award-list {
    flex-direction: column;
    gap: 8px;
  }
  .award-badge {
    width: 100%;
    padding: 12px 14px;
  }
}

/* ---- Resource card: simpler layout on mobile ---- */
@media (max-width: 640px) {
  .resource-card {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .resource-card .btn {
    width: 100%;
    justify-content: center;
  }
  /* resource title and format tag wrap */
  .resource-card div[style*="display:flex;align-items:flex-start;justify-content:space-between"] {
    flex-direction: column !important;
    gap: 6px !important;
  }
}

/* ---- Contact cards: tighter on mobile ---- */
@media (max-width: 640px) {
  .contact-card {
    padding: 20px 16px;
  }
}

/* ---- Job card: stack apply button ---- */
@media (max-width: 480px) {
  .job-card-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start !important;
  }
  .job-apply {
    align-self: flex-start;
  }
}

/* ---- Metrics band: horizontal scroll on very small screens ---- */
@media (max-width: 480px) {
  .metrics-band .metrics-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    padding-bottom: 4px;
    /* override the 2-col grid from earlier */
    grid-template-columns: none !important;
  }
  .metrics-band .metrics-grid::-webkit-scrollbar { display: none; }
  .metrics-band .metrics-grid .metric-item {
    flex: 0 0 min(60vw, 180px);
    scroll-snap-align: start;
    border-right: 1px solid var(--border);
    padding: 20px 16px;
  }
  .metrics-band .metrics-grid .metric-item:last-child { border-right: none; }
}

/* ---- Section sub-headline: smaller on mobile ---- */
@media (max-width: 640px) {
  .section-headline { font-size: clamp(20px, 5.5vw, 32px); }
  .section-sub { font-size: 14px; }
}

/* ---- Page hero heading: responsive size ---- */
@media (max-width: 640px) {
  .page-hero h1,
  .hero h1 { font-size: clamp(24px, 7vw, 42px) !important; line-height: 1.2 !important; }
  .page-hero p,
  .hero-sub { font-size: 14px !important; }
}

/* =========================================
   Products Overview — poc-body / poc-stats
   ========================================= */
.product-overview-card { padding: 32px; }
.poc-body { width: 100%; }
.poc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.poc-stat {
  text-align: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  min-width: 80px;
}

@media (max-width: 640px) {
  .product-overview-card { padding: 20px 16px; }
  .poc-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .poc-stat {
    padding: 10px 12px;
  }
}


/* =========================================
   Resource Category Layout
   ========================================= */
.resource-category { margin-bottom: 56px; }
.resource-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================
   Values List (Mission & Values)
   ========================================= */
.values-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================
   Jobs List (Careers)
   ========================================= */
.jobs-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.jobs-dept { /* intentionally empty, dept wrapper */ }
.jobs-dept-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================
   Award List Wrap
   ========================================= */
.award-list-wrap { /* desktop: normal flow */ }

/* =========================================
   Home Technology Stats Grid
   ========================================= */
.tech-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* =========================================
   MOBILE — Resource / Values / Jobs / Awards
   ========================================= */
@media (max-width: 768px) {

  /* Resource cards: horizontal swipe */
  .resource-list {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px !important;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 12px !important;
  }
  .resource-list::-webkit-scrollbar { display: none; }
  .resource-list > .resource-card {
    flex: 0 0 min(82vw, 340px) !important;
    flex-direction: column !important;
    scroll-snap-align: start;
  }
  .resource-list > .resource-card .btn { width: 100%; justify-content: center; }

  /* Values list: horizontal swipe */
  .values-list {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px !important;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 12px !important;
  }
  .values-list::-webkit-scrollbar { display: none; }
  .values-list > * {
    flex: 0 0 min(78vw, 300px) !important;
    scroll-snap-align: start;
  }

  /* Job dept cards: horizontal swipe per dept */
  .jobs-dept-cards {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px !important;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 12px !important;
  }
  .jobs-dept-cards::-webkit-scrollbar { display: none; }
  .jobs-dept-cards > .job-card {
    flex: 0 0 min(82vw, 320px) !important;
    scroll-snap-align: start;
  }

  /* Award list: horizontal swipe */
  .award-list-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 8px;
  }
  .award-list-wrap::-webkit-scrollbar { display: none; }
  .award-list {
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: max-content;
  }
  .award-badge { flex-shrink: 0; }

  /* Home Technology 2x2 stats: swipe track */
  .tech-stats-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px !important;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 12px !important;
  }
  .tech-stats-grid::-webkit-scrollbar { display: none; }
  .tech-stats-grid > * {
    flex: 0 0 min(44vw, 160px) !important;
    scroll-snap-align: start;
  }

  /* Global Reach: shrink map height on mobile */
  .section-compact-mobile { padding: 36px 0 !important; }
  .section-compact-mobile .gtm-canvas { height: 190px !important; }

  /* Partners section: less bottom padding */
  .partners-section { padding-bottom: 32px !important; }
  .partner-carousels { margin-bottom: 24px !important; }
}

/* =========================================
   BACK TO TOP BUTTON
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 87, 255, 0.38);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, box-shadow 0.2s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  box-shadow: 0 6px 24px rgba(0, 87, 255, 0.55);
  transform: translateY(-2px);
}
.back-to-top:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 87, 255, 0.3);
}
@media (max-width: 640px) {
  .back-to-top { bottom: 20px; right: 16px; width: 40px; height: 40px; }
}

/* ─── Skeleton Loading Screen ─── */
.skeleton-loader { padding: 120px 40px 80px; max-width: 900px; margin: 0 auto; }
.skeleton-hero { display: flex; flex-direction: column; gap: 16px; }
.skeleton-line {
  border-radius: 8px;
  background: linear-gradient(90deg,rgba(255,255,255,0.05) 25%,rgba(255,255,255,0.1) 50%,rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}
.skeleton-line-lg { height: 52px; width: 70%; }
.skeleton-line-md { height: 28px; width: 55%; }
.skeleton-line-sm { height: 20px; width: 40%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Focus Visible (keyboard navigation) ─── */
:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
  border-radius: 4px;
}
.dropdown-item:focus-visible,
.nav-link:focus-visible,
.btn-login:focus-visible {
  outline: 2px solid #60A5FA;
  outline-offset: 2px;
}