/* ================== GLOBAL VARIABLES ================== */
:root {
  --bg:#f6f7f9;
  --card:#fff;
  --ink:#222;
  --muted:#6c757d;
  --border:#e9ecef;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,0.08);

  --blue:#007bff;
  --blue2:#00c6ff;
  --green:#16a34a;

  --desktop:#007bff;
  --mobile:#00c6ff;
  --tablet:#ffb703;
  --other:#9b59b6;

  --win:#007bff;
  --mac:#ff7b00;
  --ios:#00c6ff;
  --android:#34c759;
  --violet:#9b59b6;
  --slate:#64748b;
  --orange:#ffb703;
  --cyan:#00c6ff;
}

* {
  box-sizing: border-box;
}

/* ================== BASE LAYOUT ================== */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding-top: 24px;          /* space above dashboard */
}

/* Main analytics container */
.shell {
  max-width: 820px;
  width: 100%;
  margin: 0 auto 60px;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

/* ================== CARDS / COMMON ================== */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 16px;
  text-align: left;
}

/* ================== TOP NAV (SMALL) ================== */

.small-navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.small-navbar a {
  text-decoration: none;
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
}

.nav-right select {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--blue);
  color: #fff;
}

/* ================== SEARCH + RANGE ================== */

.searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
}

.searchbar input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 14.5px;
  background: transparent;
}

.searchbar .icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
  font-weight: 700;
}

.ranges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
}

.chip.active {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef5ff;
}

.chip.more {
  position: relative;
}

/* More dropdown */
.dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 50;
}

.dropdown.open { display: block; }

.dropdown .opt {
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.dropdown .opt:hover { background: #f7f9fc; }

.dropdown .hr {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.dropdown .custom {
  display: grid;
  gap: 8px;
}

.dropdown .custom input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.dropdown .apply {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

/* ================== KPI CARDS ================== */

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kpi .label {
  font-size: 12.5px;
  color: var(--muted);
}

.kpi .value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
}

/* ================== LINE CHART ================== */

.chartwrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

svg {
  display: block;
  width: 100%;
  height: 340px;
}

.note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  text-align: right;
}

.line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
}

.area { fill: rgba(0, 123, 255, 0.12); }

.dot { fill: var(--blue); }

/* ================== DEVICES PIE ================== */

.wrap-2col {
  display: flex;
  flex-direction: column;      /* chart on top, breakdown below */
  align-items: center;
  gap: 16px;
}

.wrap-2col .chart {
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.wrap-2col .legend {
  width: 100%;
}

.legend {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}

.legend h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #111;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.item:first-of-type { border-top: 0; }

.key {
  display: flex;
  align-items: center;
  gap: 10px;
}

.swatch {
  width: 22px;
  height: 16px;
  border-radius: 4px;
}

.tip {
  position: fixed;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  font-size: 12px;
  padding: 8px;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateY(4px);
}

/* ================== WORLD MAP ================== */

.map-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

#map-svg {
  display: block;
  width: 100%;
  height: 360px;
  background: #fff;
}

/* Country table below map */
.table {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.head {
  background: #f8fafc;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 100px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 100px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.row:nth-child(even) { background: #fbfcfe; }

.right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

/* ================== GRID LAYOUTS FOR CARDS ================== */

/* Devices + Map */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* smaller min to avoid overflow */
  gap: 16px;
}

/* Sources, Browsers, OS – stacked vertically
.grid-3 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-title {
  margin: 0 0 8px;
  font-size: 15px;
}

.list {
  display: grid;
  gap: 8px;
}

.row .left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: 999px;
} */

.mini.card {
  margin-bottom: 16px;
}

/* ================== PREMIUM ANALYTICS UI BITS ================== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.premium-badge {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.enhanced-tooltip {
  position: absolute;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  max-width: 200px;
}

.data-freshness {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.data-freshness.fresh { color: var(--green); }
.data-freshness.stale { color: var(--orange); }

/* ================== RESPONSIVE CONTENT ================== */

@media (max-width: 900px) {
  .shell {
    max-width: 720px;
  }

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

@media (max-width: 600px) {

  body {
    padding-top: 12px;
  }

  .shell {
    max-width: 100%;
    padding: 0 12px;
    margin-bottom: 40px;
  }

  .small-navbar {
    justify-content: center;
  }

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

  .grid-2 {
    grid-template-columns: 1fr;   /* Devices & map stacked */
  }

  svg {
    height: auto;                 /* let height adapt */
  }

  #map-svg {
    min-height: 260px;
  }
}

/* ================== FOOTER (FULL-WIDTH + RESPONSIVE) ================== */

.footer-section {
  width: 100%;
  margin: 0;
  padding: 80px 20px 30px;
  background: #0056b3;
  color: #fff;
}

.footer-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Top area */
.footer-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  margin-bottom: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}

/* Brand */
.footer-brand {
  max-width: 360px;
}

.footer-logo {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tagline {
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 1rem;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: all .3s;
}

.social-link:hover {
  background: #667eea;
  transform: translateY(-3px);
}

.social-icon { font-size: 1.2rem; }

/* Link columns */
.footer-links-section { min-width: 0; }

.footer-heading {
  font-size: 1.1rem;
  margin-bottom: 18px;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 2px;
  background: #667eea;
}

.footer-links-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .25s;
}

.footer-link:hover {
  color: #fff;
  transform: translateX(4px);
}

.link-icon {
  min-width: 22px;
  font-size: 1.05rem;
}

/* Platform chips */
.footer-platforms {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}

.platforms-title {
  text-align: center;
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.platforms-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.platform-tag {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  transition: all .25s;
}

.platform-tag:hover {
  background: rgba(102,126,234,0.25);
  border-color: #667eea;
}

.platform-icon { font-size: 1rem; }

/* Newsletter */
.footer-newsletter {
  max-width: 520px;
  margin: 0 auto 50px;
  text-align: center;
  padding: 30px 20px;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
}

.newsletter-title {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.footer-newsletter p {
  margin: 0 0 18px;
  color: rgba(255,255,255,0.85);
}

.newsletter-form {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.newsletter-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.1);
  color: #fff;
  font-size: 0.98rem;
}

.newsletter-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.newsletter-input:focus {
  outline: none;
  border-color: #667eea;
}

.newsletter-btn {
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .25s;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.newsletter-note {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.65);
}

/* Bottom area */
.footer-bottom { text-align: center; }

.footer-copyright p {
  margin: 6px 0;
  color: rgba(255,255,255,0.85);
}

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

.footer-legal {
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.16);
  border-bottom: 1px solid rgba(255,255,255,0.16);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.legal-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.88rem;
}

.legal-link:hover { color: #fff; }

.separator {
  color: rgba(255,255,255,0.35);
}

.footer-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.stat-item {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.8);
}

.stat-item strong {
  display: block;
  font-size: 1.3rem;
  color: #ffd54f;
}

.footer-attribution {
  margin-top: 22px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.7);
}

.heart { color: #ff6b6b; }

.attribution-link {
  color: #ffd54f;
  text-decoration: none;
}

.attribution-link:hover { text-decoration: underline; }

/* Footer responsive */

@media (max-width: 992px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    margin: 0 auto;
  }

  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links-section {
    text-align: center;
  }

  .footer-link {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-input,
  .newsletter-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .footer-section {
    padding: 50px 14px 24px;
  }

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

  .platforms-grid {
    flex-direction: column;
    align-items: center;
  }

  .platform-tag {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .legal-links {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .separator { display: none; }

  .footer-stats {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .footer-logo { font-size: 2rem; }
  .footer-tagline { font-size: 0.95rem; }
  .footer-heading { font-size: 1rem; }
  .newsletter-title { font-size: 1.2rem; }
  .stat-item strong { font-size: 1.2rem; }
}
/* ==== FAQ SECTION ==== */
.faq {
 
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.faq h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

/* Each FAQ item */
.faq details {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.faq details[open] {
  background: #eef5ff;
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

/* Summary (question) */
.faq summary {
  list-style: none;          /* remove default arrow */
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Custom arrow icon */
.faq summary::marker,
.faq summary::-webkit-details-marker {
  display: none;             /* hide browser marker */
}

.faq summary::after {
  content: "＋";
  font-weight: 700;
  font-size: 16px;
  color: var(--blue);
  transition: transform 0.2s ease, color 0.2s ease;
}

/* When open, change icon */
.faq details[open] summary::after {
  content: "−";
  color: var(--blue2);
}

/* Answer text */
.faq p {
  margin: 8px 0 4px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

/* Mobile tweaks */
@media (max-width: 540px) {
  .faq {
    margin: 24px 12px 32px;
    padding: 14px;
  }

  .faq h2 {
    font-size: 18px;
  }
}
/* Wrapper styling */
.nav-right {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  border-radius: 999px;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: .25s ease;
}

/* Hover effect */
.nav-right:hover {
  border-color: var(--blue);
  box-shadow: 0px 4px 12px rgba(0,123,255,0.12);
}

/* Add globe icon before dropdown */
.nav-right::before {
  content: "🌍";
  font-size: 18px;
  display: inline-block;
}

/* Style the select */
.nav-right select {
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding-right: 20px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  
  /* Custom dropdown arrow */
  background-image: url("data:image/svg+xml,%3Csvg fill='%23007bff' height='18' width='18' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* Mobile adaptation */
@media(max-width:540px){
  .nav-right {
    padding: 5px 10px;
  }

  .nav-right select {
    font-size: 13px;
  }
}
/* about.css - Uses same header style as index; standalone file for About page */
:root{
  --blue1:#007bff; --blue2:#00c6ff; --bg:#f7f9fc; --card:#fff;
  --muted:#596572; --radius:14px; --shadow:0 10px 30px rgba(15,23,42,0.06);
  --header-h:72px; --content-max:980px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Poppins",system-ui,Arial;
  background:linear-gradient(180deg,#f8fbff 0%, #eef7ff 100%);
  color:#111;
  -webkit-font-smoothing:antialiased;
}

/* Fixed header (same across pages) */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  background:linear-gradient(90deg,var(--blue1),var(--blue2));
  display:flex;
  align-items:center;
  box-shadow:var(--shadow);
  z-index:999;
}
.nav-wrap{max-width:1200px;margin:0 auto;padding:0 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:700}
.brand .brand-text{color:#fff}
.main-nav{display:flex;gap:14px}
.main-nav a{color:#fff;text-decoration:none;padding:8px 10px;border-radius:8px;font-weight:600}
.main-nav a.active, .main-nav a:hover{background:rgba(255,255,255,0.08)}

/* mobile toggle */
.mobile-toggle{display:none;background:transparent;border:none;color:#fff;font-size:20px}

@media (max-width:820px){
  .main-nav{display:none}
  .mobile-toggle{display:block}
  .page-card{margin:16px;padding:20px}
}

/* ========== Mobile menu & hamburger (consolidated) ========== */

/* hamburger bars */
.hamburger{display:inline-block;width:26px;height:18px;position:relative}
.bar{ display:block; position:absolute; left:0; width:100%; height:3px; border-radius:3px; background:#fff; transform-origin:center; transition: transform .28s cubic-bezier(.2,.9,.2,1), opacity .18s ease, top .18s ease}
.bar-1{ top:0 } .bar-2{ top:7.5px } .bar-3{ top:15px }

/* animate to X when open */
body.nav-open .bar-1{ transform: translateY(7.5px) rotate(45deg); top:7.5px }
body.nav-open .bar-2{ opacity:0; transform: scaleX(0) }
body.nav-open .bar-3{ transform: translateY(-7.5px) rotate(-45deg); top:7.5px }

/* mobile menu container */
.mobile-menu{ position:fixed; inset:0; display:none; z-index:9990; pointer-events:none }
/* backdrop below panel */
.mobile-menu-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,0.45); z-index:9991; opacity:0; transition:opacity .28s ease }
/* panel slides in from right */
.mobile-menu-panel{ position:absolute; top:0; right:0; width:min(92%,360px); height:100%; background:linear-gradient(180deg,#fff,#f5fbff); box-shadow:-20px 0 40px rgba(10,20,40,.15); transform:translateX(100%); transition:transform .32s cubic-bezier(.2,.9,.2,1); padding:28px 18px; display:flex; flex-direction:column; gap:18px; z-index:9992; pointer-events:auto; border-radius:8px 0 0 8px }

/* nav list inside panel */
.mobile-menu-nav{ display:flex; flex-direction:column; gap:12px; margin-top:8px }
.mobile-menu-nav a{ color:#0b1722; text-decoration:none; font-weight:700; padding:12px 10px; border-radius:8px }
.mobile-menu-nav a:hover{ background:rgba(0,123,255,0.06); color:var(--blue1) }

/* show when open */
body.nav-open .mobile-menu{ display:block; pointer-events:auto }
body.nav-open .mobile-menu-backdrop{ opacity:1 }
body.nav-open .mobile-menu-panel{ transform:translateX(0) }

/* close button in panel */
.btn-ghost{ background:transparent; border:1px solid rgba(0,0,0,0.06); padding:10px 14px; border-radius:10px; cursor:pointer; align-self:center }
#mobileClose{ position:absolute; top:16px; right:18px; font-size:22px; background:none; border:none; color:var(--blue1); cursor:pointer; z-index:9994; }

/* ensure no accidental full-screen .mobile-nav interfering */
.mobile-nav{ display:none !important }

/* small screens tweak */
@media(max-width:420px){ .mobile-menu-panel{ width:92vw } }

/* Ensure navbar becomes responsive at <=611px */
@media (max-width: 992px) {
  .main-nav { display: none !important; }
  .mobile-toggle { display: flex; }
  .nav-wrap { gap: 8px; }
  .logo { font-size: 20px; }
  .logo svg { width: 40px; height: 40px; }
  .logo .brand-text { font-size: 20px; font-weight:700 }
  .mobile-panel-head svg { width:40px;height:40px }
  .mobile-panel-head strong { font-size:20px }
}
@media(max-width: 992px){
  .site-header .main-nav { display:none!important; }
  .site-header .mobile-toggle { display:flex!important; }
}

/* Fixed header (same across pages) */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  background:linear-gradient(90deg,var(--blue1),var(--blue2));
  display:flex;
  align-items:center;
  box-shadow:var(--shadow);
  z-index:999;
}
.nav-wrap{max-width:1200px;margin:0 auto;padding:0 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:700}
.brand .brand-text{color:#fff}
.main-nav{display:flex;gap:14px}
.main-nav a{color:#fff;text-decoration:none;padding:8px 10px;border-radius:8px;font-weight:600}
.main-nav a.active, .main-nav a:hover{background:rgba(255,255,255,0.08)}

/* mobile toggle */
.mobile-toggle{display:none;background:transparent;border:none;color:#fff;font-size:20px}

.logo{
  height: auto;
  
}
/* Fix logo scaling */
.header .logo svg {
  width: 35px !important;
  height: 35px !important;
  min-width: 35px;
  max-width: 35px;
  flex-shrink: 0;
}


.header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header .brand-text {
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .header .brand-text {
    font-size: 1rem;
  }

  .header .logo svg {
    width: 30px !important;
    height: 30px !important;
  }
}
/* Make header full width */
.header.site-header {
  width: 100%;
  background: linear-gradient(90deg, #007bff, #00c6ff);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation layout fix */
.nav-wrap {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo + text alignment */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Distance between menu items */
.main-nav a {
  margin: 0 14px;
  font-size: 15px;
  font-weight: 500;
}

/* Space between header and page content */
.analytics-heading {
  margin-top: 30px;
  padding-top: 20px;
}
/* ===== Fancy back-arrow close button (like Home) ===== */

.mobile-back-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #00c6ff, #007bff);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* white arrow “<” inside the blue square */
.mobile-back-btn::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);   /* makes a nice back arrow */
}

/* Hide old Close button style if still present anywhere */
.btn-ghost#mobileClose {
  display: none;
}
.mobile-back-btn {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 65px;
  height: 65px;

  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.22);

  font-size: 48px; /* bigger icon */
  line-height: 0;
  font-weight: 900;
  color: #007bff;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: 0.3s ease-in-out;
}

.mobile-back-btn:hover {
  transform: scale(1.12);
}

.mobile-back-btn:active {
  transform: scale(0.9);
}
/* reset the old mobileClose styles */
#mobileClose {
  all: unset;                 /* remove all previous styles */
}

/* BIG circular back/close button */
.mobile-back-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 60px;                /* bigger circle */
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, #ffffff, #e3f0ff);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  outline: none;
}

/* big arrow inside the circle */
.mobile-back-btn::before {
  content: "";
  display: block;
  width: 18px;                /* arrow size */
  height: 18px;
  border: 3px solid #007bff;
  border-top: 0;
  border-right: 0;
  transform: rotate(135deg) translateX(2px);
}
#mobileClose {
  all: unset;   /* keep this so old styles are removed */
}
/* ================== FIX BOTTOM STATS + HAMBURGER ================== */

/* 1) Keep hamburger bars clean and separate */
.hamburger .bar {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  transform-origin: center;
  transition:
    transform .28s cubic-bezier(.2,.9,.2,1),
    opacity .18s ease,
    top .18s ease;
}
.hamburger .bar-1 { top: 0; }
.hamburger .bar-2 { top: 7.5px; }
.hamburger .bar-3 { top: 15px; }

/* 2) Analytics “Sources / Browsers / OS” layout */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* Stack them nicely on small screens */
@media (max-width: 720px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* 3) Rows inside the analytics lists (NOT the world map table) */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each analytics row (e.g., “Facebook 13”) */
.list .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 4px 0;
  border: 0;
  background: transparent;
}

/* Left part: dot + label */
.list .row .left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* 4) The grey background bar + colored fill INSIDE the card */
.list .bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.list .bar .fill {
  height: 100%;
  border-radius: 999px;
}

/* 5) Make sure the world map table keeps its own row styling */
.table .row {
  display: grid;
  grid-template-columns: 1fr 100px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.table .row:nth-child(even) {
  background: #fbfcfe;
}
/* ================== FIX BOTTOM STATS + HAMBURGER ================== */

/* 1) Keep hamburger bars clean and separate */
.hamburger .bar {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  transform-origin: center;
  transition:
    transform .28s cubic-bezier(.2,.9,.2,1),
    opacity .18s ease,
    top .18s ease;
}
.hamburger .bar-1 { top: 0; }
.hamburger .bar-2 { top: 7.5px; }
.hamburger .bar-3 { top: 15px; }

/* 2) Analytics “Sources / Browsers / OS” layout */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* Stack them nicely on small screens */
@media (max-width: 720px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* 3) Rows inside the analytics lists (NOT the world map table) */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each analytics row (e.g., “Facebook 13”) */
.list .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 4px 0;
  border: 0;
  background: transparent;
}

/* Left part: dot + label */
.list .row .left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* 4) The grey background bar + colored fill INSIDE the card */
.list .bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.list .bar .fill {
  height: 100%;
  border-radius: 999px;
}

/* 5) Make sure the world map table keeps its own row styling */
.table .row {
  display: grid;
  grid-template-columns: 1fr 100px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.table .row:nth-child(even) {
  background: #fbfcfe;
}
/*.mini.card {
  overflow: hidden;
  position: relative;
}*/

/*.list .bar,
.list .bar .fill {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
*/

/* ===== FINAL: Analytics bottom cards (Sources / Browsers / OS) ===== */

/* each mini analytics card */
.mini.card {
  position: relative;
  overflow: hidden;
}

/* one row inside list: "Facebook 13" etc. */
.list .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 4px 12px 8px;   /* card inner padding */
  border: 0;
  background: transparent;
}

/* left side: colored dot + label */
.list .row .left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* bar sits UNDER the row, with padding, not full-bleed */
.list .bar {
  grid-column: 1 / -1;
  position: relative;
  height: 6px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 12px 0 22px;  /* indent so it lines up under text */
}

/* colored fill inside the grey bar */
.list .bar .fill {
  height: 100%;
  border-radius: 999px;
}
