/* ── FIXRTECH SHARED STYLES ── */
/* styles.css — linked from all pages */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── THEME VARIABLES ── */
:root,
[data-theme="light"] {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f5f5f3;
  --text: #0f0f0f;
  --text-soft: #5a5a5a;
  --text-faint: #a8a8a8;
  --border: #e8e8e4;
  --border-2: #d0d0cc;
  --accent: #1a6bff;
  --accent-dim: #e8f0ff;
  --success: #16a34a;
  --radius: 12px;
}
[data-theme="dark"] {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #222222;
  --text: #f5f5f3;
  --text-soft: #a8a8a8;
  --text-faint: #5a5a5a;
  --border: #2a2a2a;
  --border-2: #3a3a3a;
  --accent: #4d8bff;
  --accent-dim: #1a2a4a;
  --success: #22c55e;
  --radius: 12px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 6vw;
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { list-style: none; }
.nav-links a, .nav-links li a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links li a:hover { color: var(--text); }
.nav-links li a.active { color: var(--accent); font-weight: 500; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px 8px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 6vw 1.5rem;
  flex-direction: column;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: block;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu-divider { height: 0.75rem; }
.mobile-menu-btn-outline {
  text-align: center;
  padding: 0.7rem !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  border-bottom: 1.5px solid var(--border) !important;
  margin-top: 0.5rem;
}
.mobile-menu-btn-primary {
  text-align: center;
  padding: 0.7rem !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  border-bottom: none !important;
  margin-top: 0.5rem;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 998;
}
.mobile-overlay.open { display: block; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1257d8; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-soft); }
.btn-white {
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s;
}
.btn-white:hover { background: #f0f0f0; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: #fff; }

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 0.6rem 6vw;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.breadcrumb a { color: var(--text-faint); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border-2); }
.breadcrumb-current { color: var(--text-soft); }

/* ── CTA SECTION ── */
.cta-section { padding: 5rem 6vw; text-align: center; }
.cta-inner {
  background: var(--accent);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}
[data-theme="dark"] .cta-inner { background: #1a1a1a; }
.cta-inner h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.cta-inner p { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.6; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.footer-logo span { color: var(--accent); }
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--text-soft);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-soft);
  text-align: center;
  flex-shrink: 0;
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  nav {
    display: flex !important;
    grid-template-columns: unset !important;
    justify-content: space-between !important;
  }
  .hamburger { display: flex !important; }
  #nav-auth, .nav-auth { display: none !important; }
  .nav-links { display: none !important; }
  #theme-btn { display: flex !important; }
  .nav-right { justify-content: flex-end; gap: 0.5rem; }
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem 6vw;
  }
  .footer-links { justify-content: center; gap: 0.5rem 1.25rem; }
  .footer-copy { text-align: center; }
  .cta-btns { flex-direction: column; align-items: center; }
}

/* ── THEME BUTTON (always visible) ── */
#theme-btn {
  background: none !important;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  color: var(--text-soft);
}
#theme-btn:hover { border-color: var(--text-soft); }
#nav-auth #theme-btn { display: flex !important; }

/* ── MOBILE FILTER BUTTON (browse page) ── */
.mobile-filter-btn {
  display: none !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-filter-btn:hover { border-color: var(--text-soft); }
.mobile-filter-drawer {
  display: none !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 1.5rem 6vw 2rem;
  z-index: 999;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
}
.mobile-filter-drawer.open { display: block !important; }
.mobile-filter-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
.mobile-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.mobile-filter-title { font-size: 1rem; font-weight: 500; }
.mobile-filter-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-soft);
  padding: 0.25rem;
}
.mobile-filter-overlay {
  display: none !important;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}
.mobile-filter-overlay.open { display: block !important; }

@media (max-width: 768px) {
  .mobile-filter-btn { display: flex; }
  .filter-sidebar { display: none; }
}
