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

:root {
  --bg-primary: #fafafa;
  --bg-secondary: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f2;
  --border-subtle: #e5e5e8;
  --border-active: #d0d0d5;
  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-muted: #737373;
  --accent: #000000;
  --accent-dim: #262626;
  --accent-light: #f5f5f5;
  --warm: #dc2626;
  --warm-light: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.15);
  --shadow-2xl: 0 32px 80px rgba(0,0,0,0.16);
}

html {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .container { padding: 0 48px; }
}

/* Shared navigation */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav-wrapper.scrolled {
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.nav-logo,
.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-link { text-decoration: none; }

.nav-logo-img {
  height: 50px;
  width: auto;
  display: block;
  object-fit: contain;
  max-width: 200px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .nav-links { gap: 32px; }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  display: none;
}

@media (min-width: 768px) {
  .nav-link { display: block; }
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active { font-weight: 600; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: 'Space Grotesk', sans-serif;
}

.lang-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Shared language dropdown */
.language-menu {
  position: relative;
  z-index: 110;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font: 500 15px 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.language-trigger:hover,
.language-menu:focus-within .language-trigger {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: var(--border-subtle);
}

.language-chevron { transition: transform 0.2s ease; }

.language-menu:hover .language-chevron,
.language-menu:focus-within .language-chevron {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 88px;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.language-menu:hover .language-options,
.language-menu:focus-within .language-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-secondary);
  font: 500 14px 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.language-option:hover,
.language-option.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

/* Shared footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  background: var(--bg-secondary);
}

.footer .language-options {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(4px);
}
.footer .language-menu:hover .language-options,
.footer .language-menu:focus-within .language-options {
  transform: translateY(0);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

@media (max-width: 767px) {
  .footer-content {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 20px;
  }
}

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

.footer-brand-img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-brand-text {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 767px) {
  .footer-links { justify-content: center; }
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--text-primary); }

.footer-lang {
  display: flex;
  align-items: center;
  margin-left: 32px;
}

@media (max-width: 767px) {
  .footer-lang {
    margin-left: 0;
    justify-content: center;
  }
}

/* Shared account menu in the website header */
.web-auth-slot {
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
}
.web-auth-slot.is-authenticated { width: 28px; min-width: 28px; }

.web-login-nav { visibility: hidden; font: inherit; white-space: nowrap; }
.web-auth-ready .web-login-nav { visibility: visible; }
.web-login-nav[hidden] { display: none !important; }
.web-account { position: relative; display: none; height: 40px; align-self: center; }
.web-account.active { display: flex; align-items: center; }
.web-account-trigger {
  display: flex;
  width: 28px;
  max-width: 28px;
  height: 40px;
  margin: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.web-account-trigger:hover { background: var(--bg-secondary); }
.web-account-avatar { display: block; width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.web-account-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; line-height: 20px; }
.web-account-chevron { display: block; width: 14px; height: 14px; object-fit: contain; }
.web-account-menu { position: absolute; right: 0; top: 100%; z-index: 120; display: none; width: min(280px, calc(100vw - 32px)); padding: 12px; border: 1px solid #ececf0; border-radius: 12px; background: #fff; box-shadow: 0 12px 36px rgba(0,0,0,.14); }
.web-account:hover .web-account-menu, .web-account.hover-open .web-account-menu, .web-account:focus-within .web-account-menu { display: block; }
.web-account-summary { padding: 8px 12px; border-radius: 12px; background: #f7f7f9; }
.web-account-plan-row, .web-account-points-row { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.web-account-plan-row a { padding: 6px 14px; border-radius: 8px; background: #111; color: #fff !important; text-decoration: none; font-size: 12px; font-weight: 600; }
.web-account-divider { height: 1px; margin: 4px 0; background: rgba(0,0,0,.1); }
.web-account-points-row strong { font-size: 14px; font-weight: 600; }
.web-account-links { margin-top: 10px; }
.web-account-links a, .web-account-links button { display: flex; width: 100%; height: 42px; align-items: center; gap: 9px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #222; text-decoration: none; font: inherit; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.web-account-links a:hover, .web-account-links button:hover { background: #f5f5f6; }
.web-account-item-icon { display: block; width: 20px; height: 20px; object-fit: contain; }
.web-account-contact { position: relative; }
.web-account-contact:before { content: ""; position: absolute; right: 100%; top: 0; width: 16px; height: 100%; }
.web-contact-qr { position: absolute; right: calc(100% + 16px); top: 50%; display: none; width: 204px; transform: translateY(-50%); flex-direction: column; align-items: center; padding: 12px; border: 1px solid #ececf0; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.web-contact-qr:before { content: ""; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 9px solid #ececf0; }
.web-contact-qr:after { content: ""; position: absolute; right: -7px; top: 50%; transform: translateY(-50%); border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 8px solid #fff; }
.web-account-contact:hover .web-contact-qr, .web-account-contact:focus-within .web-contact-qr { display: flex; }
.web-contact-qr img { display: block; width: 180px; height: 180px; object-fit: contain; }
.web-contact-qr p { margin: 8px 0 0; color: #757575; text-align: center; font-size: 14px; line-height: 20px; }
@media (max-width: 560px) {
  .web-contact-qr { right: 0; top: 46px; z-index: 2; transform: none; }
  .web-contact-qr:before, .web-contact-qr:after { display: none; }
}
