/* =========================================================
   STUDYUP CONSULTING — BASE STYLESHEET
   Design tokens, typography, layout primitives, navbar, footer,
   buttons, forms, and utility classes shared across every page.
   Section-specific styles live in their own /css/<page>.css file.
   ========================================================= */

/* ---------- Fonts (SF Pro Display, self-hosted) ---------- */
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Light.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Thin.otf") format("opentype");
  font-weight: 200;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Ultralight.otf") format("opentype");
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Heavy.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/SF-Pro-Display-Black.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand colors, sampled directly from the StudyUp logo */
  --color-navy: #251196;
  --color-navy-dark: #1a0d6e;
  --color-orange: #F18A01;
  --color-orange-dark: #d97a00;
  --color-gray-bg: #ECECEC;
  --color-white: #FFFFFF;
  --color-ink: #16151F;
  --color-ink-soft: #55566B;
  --color-line: #DDDEE3;

  /* Semantic aliases */
  --color-bg: var(--color-white);
  --color-bg-alt: var(--color-gray-bg);
  --color-primary: var(--color-navy);
  --color-accent: var(--color-orange);
  --color-text: var(--color-ink);
  --color-text-muted: var(--color-ink-soft);

  /* Typography */
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale: clamp(min, preferred, max) keeps text readable
     from small phones up to wide desktop screens without breakpoints */
  --fs-h1: clamp(2.25rem, 4vw + 1rem, 4.25rem);
  --fs-h2: clamp(1.75rem, 2.6vw + 1rem, 2.75rem);
  --fs-h3: clamp(1.35rem, 1.4vw + 1rem, 1.75rem);
  --fs-lead: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Layout */
  --container-width: 1180px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --header-height: 76px;
  --transition: 0.25s ease;
  --shadow-soft: 0 10px 30px rgba(22, 21, 31, 0.06);
  --shadow-card: 0 4px 18px rgba(22, 21, 31, 0.08);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
img, picture, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

html {
  -webkit-text-size-adjust: 100%;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden; /* prevents accidental horizontal scroll on mobile */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem; /* mobile default */
}
@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

.section { padding-block: var(--space-xl); }
.section-alt { background: var(--color-bg-alt); }
.section-navy { background: var(--color-navy); color: var(--color-white); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: var(--color-white); }

.section-head { max-width: 640px; margin-bottom: var(--space-lg); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: var(--space-xs);
}
.lead { font-size: var(--fs-lead); color: var(--color-text-muted); }

/* Responsive grid: single column on mobile, expands as space allows */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.btn-primary { background: var(--color-orange); color: var(--color-white); }
.btn-primary:hover { background: var(--color-orange-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(241, 138, 1, 0.35); }
.btn-secondary { background: var(--color-navy); color: var(--color-white); }
.btn-secondary:hover { background: var(--color-navy-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-navy); border: 1.5px solid var(--color-line); }
.btn-outline:hover { border-color: var(--color-navy); }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.875rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Icons ---------- */
.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon-inline { width: 16px; height: 16px; margin-right: 0.35rem; vertical-align: -2px; }
.icon-social { width: 20px; height: 20px; }

/* ---------- Header / Navbar (mobile-first) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-sm);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  min-width: 0; /* allows brand name to truncate gracefully on tiny screens */
}
.brand-mark { height: 34px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-navy);
  white-space: nowrap;
}
.brand-accent { color: var(--color-orange); }

/* Desktop nav hidden on mobile; mobile nav hidden on desktop */
.main-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--color-orange); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--color-orange);
  transition: width var(--transition);
}
.nav-link:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-actions .btn-primary { display: none; } /* shown at desktop breakpoint */

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  color: var(--color-navy);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 0;
  overflow: hidden;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  transition: max-height var(--transition);
}
.mobile-nav.is-open { max-height: 640px; }
.mobile-nav-link {
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-line);
}
.mobile-nav-cta { margin: 1rem 1.25rem 1.25rem; }

/* Desktop breakpoint: swap mobile nav for full horizontal nav + CTA */
@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .header-actions .btn-primary { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Footer (mobile-first, stacks then grids) ---------- */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
  padding-top: var(--space-xl);
}
.footer-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr; /* single column on mobile */
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}
.footer-tagline { margin-top: 0.75rem; max-width: 260px; color: rgba(255, 255, 255, 0.65); }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background var(--transition), transform var(--transition);
}
.footer-social a:hover { background: var(--color-orange); transform: translateY(-2px); }
.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange);
  margin-bottom: 1rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: rgba(255, 255, 255, 0.75); transition: color var(--transition); }
.footer-col a:hover { color: var(--color-white); }
.footer-contact a, .footer-address { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-block: var(--space-md);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--space-sm); }
.form-label { font-weight: 600; font-size: 0.9rem; }
.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(37, 17, 150, 0.12);
}
.form-textarea { resize: vertical; min-height: 140px; }

/* ---------- Alerts ---------- */
.alerts { padding-top: var(--space-md); }
.alert { padding: 0.9rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 0.75rem; font-weight: 500; }
.alert-success { background: rgba(241, 138, 1, 0.12); color: var(--color-orange-dark); }
.alert-error { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Respect users who prefer less motion (accessibility) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}


/* =========================================================
   STUDYUP — DARK THEME
   Append this block to the END of static/css/base.css.
   Theme is activated through: <html data-theme="dark">.
   ========================================================= */

/* Prevent a bright flash before JavaScript restores the saved theme. */
html[data-theme="dark"] { color-scheme: dark; }

/* ---------- Theme switch button ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--color-navy);
  background: rgba(37, 17, 150, 0.08);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.theme-toggle:hover {
  color: var(--color-orange-dark);
  background: rgba(241, 138, 1, 0.15);
  transform: rotate(12deg);
}
.theme-icon { width: 20px; height: 20px; }
.theme-icon-moon { display: none; }

/* ---------- Brand tokens: dark mode ---------- */
html[data-theme="dark"] {
  --color-bg: #11121a;
  --color-bg-alt: #191a25;
  --color-white: #20212e;
  --color-ink: #f5f5f8;
  --color-ink-soft: #b8bac8;
  --color-line: #343647;
  --color-text: #f5f5f8;
  --color-text-muted: #b8bac8;
  --shadow-card: 0 5px 22px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] body { background: var(--color-bg); }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 { color: var(--color-text); }

/* ---------- Header / navigation ---------- */
html[data-theme="dark"] .site-header {
  background: rgba(17, 18, 26, 0.9);
  border-bottom-color: var(--color-line);
}
html[data-theme="dark"] .brand-name { color: #f5f5f8; }
html[data-theme="dark"] .nav-link { color: var(--color-text); }
html[data-theme="dark"] .nav-toggle { color: var(--color-text); }
html[data-theme="dark"] .theme-toggle {
  color: #ffd18a;
  background: rgba(241, 138, 1, 0.14);
}
html[data-theme="dark"] .theme-toggle:hover {
  color: var(--color-white);
  background: var(--color-orange);
}
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: block; }
html[data-theme="dark"] .mobile-nav {
  background: var(--color-bg);
  border-bottom-color: var(--color-line);
}
html[data-theme="dark"] .mobile-nav-link { border-bottom-color: var(--color-line); }

/* ---------- Global layouts and cards ---------- */
html[data-theme="dark"] .section-alt { background: var(--color-bg-alt); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .university-profile-card,
html[data-theme="dark"] .links-item {
  background: var(--color-white);
  border-color: var(--color-line);
}
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .university-profile-card:hover {
  border-color: rgba(241, 138, 1, 0.5);
}
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .lead { color: var(--color-text-muted); }

/* ---------- Buttons and inputs ---------- */
html[data-theme="dark"] .btn-outline {
  color: var(--color-text);
  border-color: #4a4d61;
}
html[data-theme="dark"] .btn-outline:hover {
  color: var(--color-white);
  border-color: var(--color-orange);
  background: rgba(241, 138, 1, 0.1);
}
html[data-theme="dark"] .form-input {
  background: #171823;
  border-color: #414354;
  color: var(--color-text);
}
html[data-theme="dark"] .form-input::placeholder { color: #888b9d; }
html[data-theme="dark"] .form-input:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(241, 138, 1, 0.16);
}

/* ---------- Hero / page-heading gradients ---------- */
html[data-theme="dark"] .hero,
html[data-theme="dark"] .about-hero,
html[data-theme="dark"] .programs-hero,
html[data-theme="dark"] .destinations-hero,
html[data-theme="dark"] .team-hero,
html[data-theme="dark"] .contact-hero,
html[data-theme="dark"] .news-hero,
html[data-theme="dark"] .stories-hero,
html[data-theme="dark"] .destination-detail-hero,
html[data-theme="dark"] .news-detail-hero {
  background: linear-gradient(180deg, #191a25 0%, var(--color-bg) 100%);
}

/* ---------- Destination and university components ---------- */
html[data-theme="dark"] .destination-tile,
html[data-theme="dark"] .story-card { border-color: transparent; }
html[data-theme="dark"] .university-profile-mark {
  background: linear-gradient(135deg, rgba(95, 78, 230, 0.25), rgba(241, 138, 1, 0.18));
  color: #c4bbff;
}
html[data-theme="dark"] .university-profile-title h3 { color: var(--color-text); }
html[data-theme="dark"] .university-profile-scholarships {
  background: rgba(241, 138, 1, 0.1);
  border-left-color: var(--color-orange);
}
html[data-theme="dark"] .university-profile-scholarships p { color: var(--color-text); }
html[data-theme="dark"] .university-profile-link {
  color: #d9d6ff;
  background: rgba(95, 78, 230, 0.16);
}
html[data-theme="dark"] .university-profile-link:hover {
  background: rgba(95, 78, 230, 0.34);
}
html[data-theme="dark"] .university-profile-link-accent {
  color: #ffd18a;
  background: rgba(241, 138, 1, 0.14);
}
html[data-theme="dark"] .university-profile-link-accent:hover {
  background: var(--color-orange);
  color: #fff;
}

/* ---------- Page-specific light panels ---------- */
html[data-theme="dark"] .partner-pill,
html[data-theme="dark"] .program-icon,
html[data-theme="dark"] .mission-icon,
html[data-theme="dark"] .contact-info-icon,
html[data-theme="dark"] .team-join-icon,
html[data-theme="dark"] .destinations-why-icon,
html[data-theme="dark"] .links-item-icon,
html[data-theme="dark"] .news-card-image,
html[data-theme="dark"] .university-profile-link {
  background-color: rgba(95, 78, 230, 0.13);
}
html[data-theme="dark"] .partner-pill { color: var(--color-text-muted); }
html[data-theme="dark"] .about-stats-card,
html[data-theme="dark"] .team-card-join { background: #1d1e2a; }

/* ---------- Links standalone page ---------- */
html[data-theme="dark"] .links-page {
  background: radial-gradient(circle at 20% 0%, rgba(241, 138, 1, 0.12), transparent 55%),
              radial-gradient(circle at 80% 100%, rgba(95, 78, 230, 0.18), transparent 55%),
              var(--color-bg);
}
html[data-theme="dark"] .links-brand h1 { color: var(--color-text); }
html[data-theme="dark"] .links-social a {
  background: var(--color-white);
  border-color: var(--color-line);
  color: #d9d6ff;
}

/* ---------- Contact and map ---------- */
html[data-theme="dark"] .contact-social-link {
  background: #252635;
  color: #d9d6ff;
}
html[data-theme="dark"] .contact-map-frame { border-color: var(--color-line); }

/* ---------- Footer ---------- */
html[data-theme="dark"] .site-footer {
  background: #0c0d14;
  border-top: 1px solid #2d2f40;
}

/* ---------- Theme transition ---------- */
body,
.site-header,
.site-footer,
.card,
.section-alt,
.form-input,
.mobile-nav,
.links-page,
.links-item,
.theme-toggle {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header,
  .site-footer,
  .card,
  .section-alt,
  .form-input,
  .mobile-nav,
  .links-page,
  .links-item,
  .theme-toggle { transition: none; }
}

/* Navbar logo: light version by default, dark version in dark theme */

.brand-logo {
  display: block;
  width: auto;
  height: 40px;
  object-fit: contain;
}

.brand-logo-dark {
  display: none;
}

html[data-theme="dark"] .brand-logo-light {
  display: none;
}

html[data-theme="dark"] .brand-logo-dark {
  display: block;
}

/* Language switcher */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid rgba(37, 17, 150, 0.16);
  border-radius: 999px;
  background: rgba(37, 17, 150, 0.05);
}

.language-switcher-button {
  min-width: 30px;
  padding: 4px 6px;
  border: 0;
  border-radius: 999px;
  color: var(--color-ink-soft);
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.language-switcher-button:hover {
  color: var(--color-navy);
}

.language-switcher-button[aria-pressed="true"] {
  color: #fff;
  background: var(--color-navy);
}

.language-switcher-divider {
  color: var(--color-ink-soft);
  font-size: 11px;
  font-weight: 700;
}

/* Dark theme compatibility */
html[data-theme="dark"] .language-switcher {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .language-switcher-button {
  color: #cbc8d9;
}

html[data-theme="dark"] .language-switcher-button:hover {
  color: #ffd18a;
}

html[data-theme="dark"] .language-switcher-button[aria-pressed="true"] {
  color: #1a1427;
  background: #ffd18a;
}

html[data-theme="dark"] .language-switcher-divider {
  color: #9a95aa;
}

@media (max-width: 767px) {
  .language-switcher {
    padding: 3px 5px;
  }

  .language-switcher-button {
    min-width: 28px;
  }
}

/* =========================================================
   LANGUAGE SWITCHER — compact segmented control
   ========================================================= */

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  margin: 0;
  padding: 3px;
  border: 1px solid rgba(37, 17, 150, 0.14);
  border-radius: 11px;
  background: rgba(37, 17, 150, 0.055);
}

.language-switcher-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 30px;
  color: var(--color-navy);
}

.language-switcher-globe {
  width: 16px;
  height: 16px;
}

.language-switcher-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  color: var(--color-ink-soft);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.language-switcher-button:hover {
  color: var(--color-navy);
  background: rgba(37, 17, 150, 0.09);
}

.language-switcher-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(95, 78, 230, 0.2);
}

.language-switcher-button.is-active,
.language-switcher-button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--color-navy);
  box-shadow: 0 2px 7px rgba(37, 17, 150, 0.22);
}

.language-switcher-button.is-active:hover,
.language-switcher-button[aria-pressed="true"]:hover {
  color: #ffffff;
  background: var(--color-indigo);
  transform: translateY(-1px);
}


/* Dark mode */
html[data-theme="dark"] .language-switcher {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .language-switcher-label {
  color: #d9d6ff;
}

html[data-theme="dark"] .language-switcher-button {
  color: #c7c3d1;
}

html[data-theme="dark"] .language-switcher-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .language-switcher-button.is-active,
html[data-theme="dark"] .language-switcher-button[aria-pressed="true"] {
  color: #1a1427;
  background: #ffd18a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .language-switcher-button.is-active:hover,
html[data-theme="dark"] .language-switcher-button[aria-pressed="true"]:hover {
  color: #1a1427;
  background: #f18a01;
}


/* Small mobile adjustment */
@media (max-width: 560px) {
  .language-switcher {
    min-height: 38px;
  }

  .language-switcher-label {
    display: none;
  }

  .language-switcher-button {
    min-width: 36px;
    min-height: 30px;
    padding: 0 9px;
  }
}