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

:root {
  --bg-base:    #F0F6FF;
  --bg-card:    #FFFFFF;
  --bg-card2:   #E6F0FF;
  --border:     #D4E3F8;
  --blue:       #1C6FEB;
  --blue-light: #4A9BFF;
  --blue-dark:  #0F4DB8;
  --text:       #111827;
  --muted:      #5A6A85;
  --accent:     #1A3B6E;
  --nav-h:      80px;
}

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

html { scroll-behavior: smooth; }

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 5%;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(28,111,235,0.06);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(28,111,235,0.10); }
.nav-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; overflow: hidden;
  height: 46px; width: 192px;
}
.nav-logo img {
  width: 192px;
  height: 192px;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  text-decoration: none; letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--blue); color: #fff;
  padding: 9px 22px; border-radius: 4px;
  font-size: 13px; font-weight: 600;
  text-decoration: none; letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--blue-light); transform: translateY(-1px); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ── Page offset ── */
.page-top { padding-top: var(--nav-h); }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(160deg, #EBF3FF 0%, #F7FBFF 50%, #EEF5FF 100%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: 0.35;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto; padding: 0 5%;
  padding-top: 80px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.15em;
  color: var(--blue); text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: ''; width: 28px; height: 1px; background: var(--blue);
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--text);
  max-width: 800px; margin-bottom: 24px;
}
.hero h1 span { color: var(--blue); }
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--muted); max-width: 520px;
  line-height: 1.7; margin-bottom: 44px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  background: var(--blue); color: #fff;
  padding: 14px 32px; border-radius: 4px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.03em;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--blue-light); transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--text);
  padding: 14px 32px; border-radius: 4px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.03em;
  text-decoration: none; border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ── Stats band ── */
.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 5%;
  background: #FFFFFF;
}
.stats-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat-item { text-align: center; padding: 16px 0; }
.stat-num {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800; color: var(--text);
  letter-spacing: -0.03em; line-height: 1;
  margin-bottom: 8px;
}
.stat-num span { color: var(--blue); }
.stat-label {
  font-size: 13px; color: var(--muted);
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ── Sections ── */
.section {
  padding: 100px 5%;
  max-width: 1280px; margin: 0 auto;
}
.section-full { padding: 100px 5%; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 16px; color: var(--muted);
  max-width: 580px; line-height: 1.7;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 36px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--blue); box-shadow: 0 8px 32px rgba(28,111,235,0.08); transform: translateY(-4px); }
.card-icon {
  width: 48px; height: 48px; border-radius: 8px;
  background: rgba(28,111,235,0.08);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; color: var(--blue); }
.card h3 {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin-bottom: 12px;
}
.card p { font-size: 14px; color: var(--muted); line-height: 1.7; }
.card-tag {
  display: inline-block; margin-top: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue);
}

/* ── 3-col grid ── */
.grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 40px; align-items: center;
}

/* ── Divider ── */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Philosophy block ── */
.philosophy-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 64px;
}
.philosophy-quote {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 300; color: var(--text);
  line-height: 1.8; letter-spacing: -0.01em;
  border-left: 3px solid var(--blue);
  padding-left: 28px; margin-bottom: 40px;
}
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.pillar-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--blue); text-transform: uppercase; margin-bottom: 8px;
}
.pillar h4 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.pillar p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── News cards ── */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.news-card:hover { border-color: var(--blue); box-shadow: 0 8px 32px rgba(28,111,235,0.08); transform: translateY(-4px); }
.news-img {
  width: 100%; height: 180px; object-fit: cover;
  background: var(--bg-card2);
}
.news-img-placeholder {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, var(--bg-card2) 0%, var(--border) 100%);
  display: flex; align-items: center; justify-content: center;
}
.news-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.news-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 11px; color: var(--muted); margin-bottom: 12px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.news-meta span { color: var(--blue); }
.news-card h3 {
  font-size: 15px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 10px;
  flex: 1;
}
.news-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.news-link {
  font-size: 12px; font-weight: 600; color: var(--blue);
  text-decoration: none; letter-spacing: 0.05em;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.2s;
}
.news-link:hover { gap: 8px; }

/* ── News filters ── */
.news-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
  padding: 8px 18px; border-radius: 4px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Insights tabs ── */
.insights-tabs {
  display: flex; gap: 0; margin-bottom: 40px;
  border-bottom: 2px solid var(--border);
}
.insights-tab {
  padding: 14px 32px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border: none;
  background: transparent; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}
.insights-tab:hover { color: var(--text); }
.insights-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.insights-pane { display: none; }
.insights-pane.active { display: block; }

/* ── Article cards (Analysis tab) ── */
.article-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
}
.article-card:hover { border-color: var(--blue); box-shadow: 0 8px 32px rgba(28,111,235,0.08); transform: translateY(-4px); }
.article-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg-card2); display: block; }
.article-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-card-cat {
  display: inline-block; margin-bottom: 12px;
  background: rgba(28,111,235,0.08); color: var(--blue);
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 3px;
}
.article-card h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  line-height: 1.4; margin-bottom: 10px; flex: 1;
}
.article-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.article-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--muted);
}
.article-card-link {
  font-size: 12px; font-weight: 600; color: var(--blue);
  letter-spacing: 0.05em;
  display: inline-flex; align-items: center; gap: 4px;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  padding: 120px 5% 80px;
  background: linear-gradient(160deg, #EBF3FF 0%, #F7FBFF 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero-inner { max-width: 1280px; margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800; color: var(--text); letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.page-hero p { font-size: 17px; color: var(--muted); max-width: 560px; line-height: 1.7; }

/* ── Service tiers ── */
.service-tier {
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 24px;
  background: var(--bg-card);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.service-tier:hover { border-color: var(--blue); box-shadow: 0 4px 24px rgba(28,111,235,0.08); }
.tier-header {
  padding: 32px 40px; display: flex;
  align-items: center; justify-content: space-between;
  cursor: pointer;
}
.tier-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--blue); text-transform: uppercase; margin-bottom: 6px;
}
.tier-header h3 { font-size: 20px; font-weight: 700; color: var(--text); }
.tier-badge {
  padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--blue); color: var(--blue);
}
.tier-body { padding: 0 40px 40px; display: none; }
.tier-body.open { display: block; }
.tier-body p { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 24px; }
.tier-features { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tier-features li {
  font-size: 14px; color: var(--text);
  display: flex; align-items: flex-start; gap: 10px;
}
.tier-features li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); margin-top: 7px; flex-shrink: 0;
}

/* ── CTA section ── */
.cta-section {
  padding: 100px 5%;
  background: linear-gradient(135deg, #1A3B6E 0%, #1C6FEB 100%);
  text-align: center;
}
.cta-section .section-label { color: rgba(255,255,255,0.55); }
.cta-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800; color: #ffffff; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cta-section p { font-size: 16px; color: rgba(255,255,255,0.72); margin-bottom: 40px; }
.cta-section .btn-outline {
  color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.4);
}
.cta-section .btn-outline:hover { border-color: #fff; color: #fff; }

/* ── Contact form ── */
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 14px 18px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text);
  font-family: inherit; font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28,111,235,0.08); }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group select { appearance: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-success {
  display: none; padding: 16px 20px;
  background: rgba(28,111,235,0.06); border: 1px solid rgba(28,111,235,0.3);
  border-radius: 6px; color: var(--blue);
  font-size: 14px; font-weight: 500; margin-top: 16px;
}

/* ── Footer ── */
footer {
  padding: 60px 5% 40px;
  background: #E8F1FD;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand-logo {
  overflow: hidden; height: 44px; width: 185px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.footer-brand-logo img {
  width: 185px; height: 185px; flex-shrink: 0;
}
.footer-brand p {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.footer-legal { font-size: 11px; color: var(--muted); line-height: 1.7; max-width: 700px; }
.footer-copy { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── About page ── */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.team-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 32px; text-align: center;
}
.team-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
}
.team-card h4 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.team-card span { font-size: 12px; color: var(--blue); }

/* ── Loading spinner ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--blue);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 60px; color: var(--muted); font-size: 14px;
}

/* ── Animations ── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Floating Action Buttons ── */
.fab-wrap {
  position: fixed;
  bottom: 28px; right: 20px;
  z-index: 999;
  display: flex; flex-direction: column;
  gap: 8px; align-items: flex-end;
}
.fab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px 10px 13px;
  border-radius: 100px;
  background: var(--blue);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(28,111,235,0.35);
  transition: background 0.22s, transform 0.22s, box-shadow 0.22s;
}
.fab:hover {
  background: var(--blue-dark);
  transform: translateY(-2px) translateX(-2px);
  box-shadow: 0 8px 28px rgba(28,111,235,0.45);
}
.fab svg { flex-shrink: 0; }

/* ── Home intelligence panes & tabs ── */
.home-intel-pane { display: none; }
.home-intel-pane.active { display: block; }
.home-tab {
  padding: 14px 32px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border: none;
  background: transparent; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}
.home-tab:hover { color: var(--text); }
.home-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .fab span { display: none; }
  .fab { padding: 12px; border-radius: 50%; width: 44px; height: 44px; justify-content: center; }
  .fab svg { width: 18px; height: 18px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #FFFFFF; padding: 20px 5%;
    gap: 20px; border-bottom: 1px solid var(--border);
  }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .philosophy-wrap { padding: 36px 24px; }
  .pillars { grid-template-columns: 1fr; }
  .tier-features { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tier-header { padding: 24px; }
  .tier-body { padding: 0 24px 24px; }
}

/* ── Language Switcher ── */
.lang-switch {
  position: relative;
  margin-left: 14px;
  flex-shrink: 0;
}
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 7px 12px 7px 10px;
  line-height: 1;
  transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s;
  backdrop-filter: blur(6px);
}
.lang-toggle:hover {
  color: var(--text);
  border-color: var(--blue-light);
  background: #fff;
  box-shadow: 0 2px 8px rgba(28,111,235,0.10);
}
.lang-switch.open .lang-toggle {
  color: var(--blue);
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 2px 10px rgba(28,111,235,0.15);
}
.lang-toggle .lang-globe,
.lang-toggle .lang-chev {
  width: 13px; height: 13px;
  stroke: currentColor;
  flex-shrink: 0;
}
.lang-toggle .lang-chev { width: 10px; height: 10px; transition: transform .2s; }
.lang-switch.open .lang-toggle .lang-chev { transform: rotate(180deg); }
.lang-toggle .lang-current { line-height: 1; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 77, 184, 0.14), 0 2px 6px rgba(0,0,0,0.04);
  padding: 6px;
  margin: 0;
  list-style: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1000;
}
.lang-switch.open .lang-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: none; border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 6px;
  transition: background-color .15s, color .15s;
}
.lang-item:hover { background: var(--bg-card2); color: var(--blue-dark); }
.lang-item.active { color: var(--blue); font-weight: 600; }
.lang-item.active::after {
  content: '';
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M2.5 7.5l2.7 2.7 6.3-6.3' stroke='%231C6FEB' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center;
  flex-shrink: 0;
  margin-left: 10px;
}

@media (max-width: 768px) {
  .lang-switch { margin-left: 0; margin-right: 8px; }
  .lang-toggle { font-size: 11px; padding: 6px 10px 6px 9px; }
  .lang-toggle .lang-current { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lang-menu { min-width: 150px; right: 0; }
}
