/* ============================================
   VisaScoring — Shared Styles
   Consistent header, theme toggle, mobile menu
   ============================================ */

/* --- Google Fonts (loaded in HTML) --- */
/* Inter for body, Syne for headings */

/* === THEME VARIABLES === */
:root,
[data-theme="light"] {
  --nav-bg: #0f2447;
  --nav-border: transparent;
  --brand-accent: #60a5fa;
  --nav-link: rgba(255,255,255,.7);
  --nav-link-hover-bg: rgba(255,255,255,.1);
  --nav-link-hover: #fff;
  --nav-active-bg: rgba(96,165,250,.2);
  --nav-active: #93c5fd;
  --cta-bg: #2563eb;
  --cta-color: #fff;

  --page-bg: #f4f7ff;
  --surface: #ffffff;
  --surface2: #f0f4ff;
  --border: #d1daf5;
  --ink: #0f172a;
  --ink2: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-lt: #3b82f6;
  --sky: #e8f0fe;
  --sky2: #dbeafe;
  --green: #16a34a;
  --green-lt: #dcfce7;
  --red: #dc2626;
  --red-lt: #fee2e2;
  --amber: #d97706;
  --amber-lt: #fef3c7;
  --gold: #2563eb;
  --gold-lt: #3b82f6;
  --gold-xlt: rgba(37,99,235,.08);
  --r: 10px;

  --heading-font: 'Syne', sans-serif;
  --body-font: 'Inter', 'DM Sans', sans-serif;

  --card-shadow: 0 2px 16px rgba(15,36,71,.06);
  --body-gradient: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(37,99,235,.08) 0%, transparent 60%);
}

[data-theme="dark"] {
  --nav-bg: rgba(6,13,31,.96);
  --nav-border: #1e3158;
  --brand-accent: #c9a84c;
  --nav-link: #7a8aaa;
  --nav-link-hover-bg: #152344;
  --nav-link-hover: #e8eef8;
  --nav-active-bg: rgba(201,168,76,.1);
  --nav-active: #c9a84c;
  --cta-bg: #c9a84c;
  --cta-color: #060d1f;

  --page-bg: #060d1f;
  --surface: #0d1b35;
  --surface2: #152344;
  --border: #1e3158;
  --ink: #e8eef8;
  --ink2: #b0bdd0;
  --muted: #7a8aaa;
  --primary: #c9a84c;
  --primary-lt: #e8c97a;
  --sky: rgba(201,168,76,.08);
  --sky2: rgba(201,168,76,.12);
  --green: #2ecc8a;
  --green-lt: rgba(46,204,138,.12);
  --red: #e05555;
  --red-lt: rgba(224,85,85,.12);
  --amber: #e8c97a;
  --amber-lt: rgba(232,201,122,.12);
  --gold: #c9a84c;
  --gold-lt: #e8c97a;
  --gold-xlt: rgba(201,168,76,.1);

  --card-shadow: 0 2px 16px rgba(0,0,0,.2);
  --body-gradient: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(201,168,76,.06) 0%, transparent 60%);
}

/* === GLOBAL RESETS === */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
  line-height: 1.6;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--body-gradient);
  pointer-events: none;
  z-index: 0;
}

/* === NAVIGATION === */
nav.vs-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: visible;
  transition: background .3s, border-color .3s;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  gap: 12px;
}
.nav-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}
.nav-brand {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.02em;
}
.nav-brand span {
  color: var(--brand-accent);
}
.nav-tag {
  font-size: 9px;
  color: rgba(255,255,255,.35);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-link);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover {
  background: var(--nav-link-hover-bg);
  color: var(--nav-link-hover);
}
.nav-links a.active {
  background: var(--nav-active-bg);
  color: var(--nav-active);
}
.nav-cta {
  background: var(--cta-bg) !important;
  color: var(--cta-color) !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
  border-radius: 8px !important;
  margin-left: 4px;
}
.nav-cta:hover {
  opacity: .9;
}

/* Theme toggle button */
.theme-toggle {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.25);
}

/* Hamburger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 301;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav right group */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === MOBILE STYLES === */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-tag {
    display: none;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 80px 20px 30px;
    gap: 4px;
    transition: right .3s ease;
    z-index: 300;
    box-shadow: -4px 0 24px rgba(0,0,0,.3);
    overflow-y: auto;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links a {
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 10px;
  }
  .nav-cta {
    margin-left: 0 !important;
    margin-top: 8px;
    text-align: center;
  }

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 299;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  .nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
}

/* === PAGE CONTAINER === */
.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* === HEADINGS === */
h1, h2, h3, h4 {
  font-family: var(--heading-font);
  color: var(--ink);
  transition: color .3s;
}

/* === FOOTER === */
footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
  transition: border-color .3s, color .3s;
}
footer a {
  color: var(--primary);
  text-decoration: none;
}

/* === UTILITY TRANSITIONS === */
.card, .side-card, .tool-card, .tool-link, .podium-card, .table-wrap,
.detail-box, .req-list, .cutoff-box, .tip-card, .info-box {
  transition: background .3s, border-color .3s, color .3s, box-shadow .3s;
}

/* === AD SLOTS === */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  transition: background .3s, border-color .3s;
}
.ad-leader { height: 90px; margin: 20px 0; }
.ad-inarticle { height: 250px; margin: 28px 0; }

/* === SMOOTH THEME TRANSITIONS === */
select, input, button, .btn-check, .btn-calc {
  transition: background .3s, border-color .3s, color .3s;
}

/* === SCROLLBAR (dark mode) === */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0d1b35;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #1e3158;
  border-radius: 4px;
}
