/* ─── Landing Page Styles ─────────────────────────────────────── */
/* Landing page styles for FundFinder */

:root {
  --bg: #0f1117;
  --bg2: #161b22;
  --bg3: #1c2230;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-subtle: #484f58;
  --green: #238636;
  --green-light: #3fb950;
  --yellow: #d29922;
  --yellow-light: #e3b341;
  --red: #da3633;
  --red-light: #f85149;
  --blue: #1f6feb;
  --blue-light: #58a6ff;
  --purple: #8957e5;
  --pink: #ec4899;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg2: #f6f8fa;
  --bg3: #eaeef2;
  --border: #d0d7de;
  --text: #1f2328;
  --text-muted: #656d76;
  --text-subtle: #8b949e;
}

.landing {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

/* ─── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(88, 166, 255, 0.3); }
  50%      { box-shadow: 0 0 40px rgba(88, 166, 255, 0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Sections common ─────────────────────────────────────────── */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ─── Landing Nav ─────────────────────────────────────────────── */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 200;
}

[data-theme="light"] .landing-nav {
  background: rgba(246, 248, 250, 0.95);
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}
.nav-logo-img { width: 24px; height: 24px; }

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.15s;
  white-space: nowrap;
}

.landing-nav-link:hover {
  color: var(--blue-light);
}

.landing-nav-user {
  font-size: 0.85rem;
  color: var(--blue-light);
  font-weight: 600;
}

.landing-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.landing-nav-btn:hover {
  border-color: var(--blue-light);
  background: rgba(31, 111, 235, 0.1);
}

.landing-nav-btn-primary {
  background: linear-gradient(135deg, #1f6feb, #8957e5);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.2);
}

.landing-nav-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(31, 111, 235, 0.4);
  background: linear-gradient(135deg, #1f6feb, #8957e5);
  border-color: transparent;
}

/* ─── Urgent notification banner ───────────────────────────────── */
.urgent-banner {
  background: rgba(218, 54, 51, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.35);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  color: #f85149;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.landing-urgent { margin: 0; border-radius: 0; display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1.5rem; }
.urgent-banner-link { color: #fff; font-weight: 600; text-decoration: underline; margin-left: 1rem; }

/* ─── Language toggle ──────────────────────────────────────────── */
.lang-toggle {
  position: relative;
  display: inline-flex;
  margin-left: 0.25rem;
}

/* ─── Theme toggle ─────────────────────────────────────────── */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  margin-left: 0.25rem;
  line-height: 1;
}
.theme-toggle-btn:hover {
  border-color: var(--blue-light);
  background: rgba(31, 111, 235, 0.08);
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.lang-toggle-btn:hover { border-color: var(--blue-light); color: var(--text); background: rgba(31, 111, 235, 0.08); }
.lang-toggle-btn .arrow { font-size: 0.5rem; opacity: 0.6; transition: transform 0.2s; }
.lang-toggle.open .lang-toggle-btn { border-color: var(--blue-light); color: var(--text); background: rgba(31, 111, 235, 0.12); }
.lang-toggle.open .arrow { transform: rotate(180deg); }
.lang-toggle-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
  min-width: 160px;
  z-index: 999;
  display: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}
.lang-toggle.open .lang-toggle-dropdown { display: block; }
.lang-toggle-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
}
.lang-toggle-option:hover { color: var(--text); background: var(--bg3); }
.lang-toggle-option.active { color: var(--blue-light); font-weight: 700; background: rgba(31, 111, 235, 0.08); }

/* RTL support */
html[dir="rtl"] .landing-nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .lang-toggle-dropdown { right: auto; left: 0; }
html[dir="rtl"] .ffw-acct-dropdown { right: auto; left: 0; }
html[dir="rtl"] .lang-toggle-option { text-align: right; }

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .section { padding: 4rem 1.5rem; }
  .landing-nav { padding: 0.75rem 1.5rem; }
}

@media (max-width: 768px) {
  .section { padding: 3rem 1.25rem; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header p { font-size: 0.95rem; }

  .landing-nav { padding: 0.65rem 1rem; flex-wrap: wrap; gap: 0.5rem; max-width: 100vw; }
  .landing-nav-links { flex-wrap: wrap; gap: 0.4rem; }
  .landing-nav-link { font-size: 0.8rem; }
  .landing-nav-btn { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
  .lang-toggle-btn { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
  .lang-toggle-btn .lang-code { display: none; }
  .lang-toggle-dropdown { min-width: 150px; right: auto; left: 0; max-width: calc(100vw - 2rem); }

  .ffw-acct-dropdown { right: 0; left: auto; min-width: 180px; max-width: calc(100vw - 1rem); }
}

@media (max-width: 480px) {
  .section { padding: 2.5rem 1rem; }
  .section-header { margin-bottom: 2rem; }
  .section-header h2 { font-size: 1.35rem; }

  .landing-nav { padding: 0.5rem 0.75rem; max-width: 100vw; }
  .landing-nav-logo { font-size: 0.9rem; }
  .landing-nav-links { gap: 0.3rem; align-items: center; }
  .landing-nav-link { font-size: 0.75rem; }
  .landing-nav-btn { padding: 0.3rem 0.65rem; font-size: 0.75rem; }
  .landing-nav-btn-primary { padding: 0.35rem 0.75rem; }
  .landing-nav-link, .landing-nav-btn { max-width: calc(100vw - 2rem); overflow: hidden; text-overflow: ellipsis; }
  .ffw-acct-dropdown { min-width: 150px; font-size: 0.75rem; }
}

/* ─── Account Switcher ─────────────────────────────────────────── */
#ffw-account-switcher { position: relative; display: inline-flex; align-items: center; }
.ffw-acct-btn { cursor: pointer; font-size: 1.1rem; padding: 0.2rem 0.45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); color: var(--text); }
.ffw-acct-btn:hover { background: var(--bg3); }
.ffw-acct-dropdown { display: none; position: absolute; top: 100%; right: 0; margin-top: 0.35rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; min-width: 180px; z-index: 1000; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.ffw-acct-dropdown.open { display: block; }
.ffw-acct-item { padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.82rem; display: flex; align-items: center; justify-content: space-between; color: var(--text); }
.ffw-acct-item:hover { background: var(--bg3); }
.ffw-acct-item:first-child { border-radius: 8px 8px 0 0; }
.ffw-acct-item:last-child { border-radius: 0 0 8px 8px; }
.ffw-acct-logout { border-top: 1px solid var(--border); color: #f87171; font-weight: 600; }
.ffw-acct-rm { border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.75rem; padding: 0.1rem 0.3rem; }
.ffw-acct-rm:hover { color: #f87171; }

