/* ═══════════════════════════════════════════════════════════
   HAMBOORG.CITY — BASE STYLES (shared across all pages)
   Extracted from landing.html inline <style> — 2026-02-23
   Focus: Clarity, Action, Trust
   ═══════════════════════════════════════════════════════════ */

/* ═══ DESIGN TOKENS ═══ */

:root {
  --bg: #faf8f5;
  --bg-warm: #f5f0e8;
  --bg-card: #ffffff;
  --bg-dark: #1a1612;
  --accent: #c85a28;
  --accent-hover: #a84820;
  --accent-soft: rgba(200, 90, 40, 0.08);
  --green: #2d8a5e;
  --green-soft: rgba(45, 138, 94, 0.08);
  --red: #c84040;
  --red-soft: rgba(200, 64, 64, 0.08);
  --text: #1a1612;
  --text-mid: #5c544a;
  --text-soft: #9a9088;
  --text-inv: #faf8f5;
  --border: rgba(26, 22, 18, 0.08);
  --border-strong: rgba(26, 22, 18, 0.15);
  --shadow-sm: 0 2px 8px rgba(26, 22, 18, 0.06);
  --shadow-md: 0 8px 32px rgba(26, 22, 18, 0.1);
  --shadow-lg: 0 20px 60px rgba(26, 22, 18, 0.15);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-full: 999px;
}

/* ═══ RESET & BASE ═══ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'Tenor Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ═══ RTL SUPPORT ═══ */

html[dir="rtl"] { direction: rtl; text-align: right; }
html[dir="rtl"] .topbar-inner { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
html[dir="rtl"] .lang-option { text-align: right; flex-direction: row-reverse; }
html[dir="rtl"] .hero-content { text-align: right; }
html[dir="rtl"] .situations-grid { direction: rtl; }
html[dir="rtl"] .situation-card { text-align: right; }
html[dir="rtl"] .helpbox-header { flex-direction: row-reverse; }
html[dir="rtl"] .helpbox-actions { flex-direction: row-reverse; }
html[dir="rtl"] .answer-actions { flex-direction: row-reverse; }
html[dir="rtl"] .step { text-align: right; }
html[dir="rtl"] .step-number { margin-left: 16px; margin-right: 0; }
html[dir="rtl"] .pillar { text-align: right; }
html[dir="rtl"] .footer-grid { direction: rtl; }
html[dir="rtl"] .footer-links { text-align: right; }
html[dir="rtl"] .modal-close { left: 20px; right: auto; }
html[dir="rtl"] .login-tabs { flex-direction: row-reverse; }
html[dir="rtl"] .phone-input-group { flex-direction: row-reverse; }
html[dir="rtl"] .social-login { flex-direction: row-reverse; }
html[dir="rtl"] .follow-up-suggestions { flex-direction: row-reverse; flex-wrap: wrap; }

/* ═══ TOPBAR ═══ */

.topbar {
  background: var(--bg-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: 'Tenor Sans', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-inv);
  letter-spacing: 0;
}
.logo b { color: var(--accent); font-weight: 400; }

/* Language selector - dropdown instead of 16 flags */
.lang-selector {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-full);
  color: var(--text-inv);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.lang-btn:hover { background: rgba(255,255,255,0.15); }
.lang-btn .flag { font-size: 18px; }
.lang-btn svg { width: 14px; height: 14px; opacity: 0.6; }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 8px;
  min-width: 200px;
  display: none;
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}
.lang-dropdown.open { display: block; animation: dropIn 0.2s ease-out; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s;
  width: 100%;
  text-align: left;
}
.lang-option:hover { background: var(--bg-warm); }
.lang-option.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lang-option .flag { font-size: 20px; }

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

/* Nav links (legacy CMS items, kept for compatibility) */
.nav-link {
  padding: 8px 16px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-full);
  transition: all 0.2s;
}
.nav-link:hover { color: var(--text-inv); background: rgba(255,255,255,0.08); }

/* Login button */
.login-btn {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-full);
  margin-left: 8px;
  transition: all 0.2s;
}
.login-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* User panel button (when logged in) */
.user-panel-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  margin-left: 8px;
  transition: all 0.2s;
  color: var(--text-inv);
}
.user-panel-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.user-name {
  font-size: 14px;
  font-weight: 500;
}

/* ═══ LOGIN MODAL (first definition, lines 212-278) ═══ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 18, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  max-width: 400px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.25s ease-out;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-mid);
  transition: all 0.2s;
}
.modal-close:hover { background: var(--red-soft); color: var(--red); }
.modal h2 {
  font-family: 'Tenor Sans', serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 24px;
  text-align: center;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--bg-card);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.social-btn:hover { border-color: var(--text-mid); background: var(--bg-warm); }
.social-btn svg { width: 20px; height: 20px; }

/* ═══ TOPBAR — Mobile ═══ */

@media (max-width: 640px) {
  .topbar-inner { padding: 0 12px; height: 56px; gap: 6px; }
  .logo { font-size: 16px; }
  .lang-btn { padding: 6px 8px; font-size: 12px; gap: 4px; }
  .lang-btn #currentLangName, .lang-btn #menuBtnLabel { display: none; }
  .lang-dropdown { min-width: 200px; }
  .login-btn { padding: 6px 12px; font-size: 12px; margin-left: 4px; }
  .user-panel-btn { padding: 4px 8px 4px 4px; margin-left: 4px; }
  .user-name { display: none; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
}

/* ═══ GENERAL BUTTONS ═══ */

.btn {
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--accent);
  color: white;
  flex: 1;
  justify-content: center;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--text-soft); cursor: not-allowed; transform: none; }
.btn-ghost {
  color: var(--text-mid);
  padding: 14px 20px;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-warm); }

/* ═══ FOOTER ═══ */

.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.6);
  padding: 60px 24px 40px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: 'Tenor Sans', serif;
  font-size: 24px;
  color: var(--text-inv);
  margin-bottom: 12px;
}
.footer-brand b { color: var(--accent); font-weight: 400; }
.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}
.footer h4 {
  color: var(--text-inv);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer li a {
  font-size: 14px;
  transition: color 0.2s;
}
.footer li a:hover { color: var(--text-inv); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

/* ═══ FOOTER — Mobile ═══ */

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ═══ LOGIN MODAL (extended definition, lines 1021-1132) ═══ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,22,18,0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal-overlay:target { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  max-width: 420px;
  width: 100%;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1001;
  pointer-events: auto;
  animation: modalIn 0.3s ease-out;
}
.modal * {
  pointer-events: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-mid);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--red-soft); color: var(--red); }
.modal h2 {
  font-family: 'Tenor Sans', serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 28px;
  text-align: center;
}

/* ═══ LOGIN FORM ═══ */

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-row { display: flex; gap: 12px; }
.form-row .form-input { flex: 1; }
.form-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 8px;
  display: none;
}
.form-error.show { display: block; }
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-soft);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  transition: all 0.2s;
}
.social-btn:hover { border-color: var(--text-mid); background: var(--bg-warm); }
.social-btn svg { width: 20px; height: 20px; }

/* ═══ SHARED ANIMATIONS ═══ */

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
