/* ═══════════════════════════════════════════════════════════════
   ListingGems shared stylesheet
   Used by all pages. Page-specific styles live inline in each page.
═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg-deep: #ffffff;
  --bg-main: #f8fafb;
  --bg-card: #ffffff;
  --bg-elevated: #f1f3f5;
  --border: #e2e5e9;
  --border-light: #d1d5db;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --emerald: #059669;
  --emerald-deep: #047857;
  --emerald-glow: rgba(5, 150, 105, 0.08);
  --red-soft: #dc2626;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ NAVIGATION ═══ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); }
.nav-logo-img { height: 36px; width: auto; }
.nav-logo-text { font-weight: 700; font-size: 17px; letter-spacing: -0.3px; color: var(--text-primary); }
.nav-logo-accent { color: var(--emerald-deep); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-deep);
  color: white;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: #065f46; transform: translateY(-1px); }
.nav-cta .price-old { text-decoration: line-through; opacity: 0.6; font-weight: 400; font-size: 12px; }

/* ═══ NAV RIGHT (CTA + hamburger group) ═══ */
.nav-right { display: flex; align-items: center; gap: 12px; }

/* ═══ HAMBURGER BUTTON ═══ */
.nav-toggle {
  display: none;          /* hidden by default; shown at ≤768px */
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
  border-radius: 2px;
}
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══ MOBILE OVERLAY PANEL ═══ */
.nav-mobile-panel {
  display: none;          /* shown at ≤768px when .nav-open */
  position: fixed;
  top: 60px;              /* below the 60px nav bar */
  left: 0;
  right: 0;
  bottom: 0;
  /* Explicit height is required: flex-direction: column collapses a fixed-positioned
     element to content height even with top/bottom set. */
  height: calc(100vh - 60px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  padding: 16px 0;
  overflow-y: auto;
}
.nav-mobile-panel a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-panel a:last-child { border-bottom: none; }
.nav-mobile-panel a .small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}
.nav-mobile-panel a:hover,
.nav-mobile-panel a:focus { background: var(--bg-elevated); }

/* ═══ ACTIVE LINK ═══ */
.nav-links a.active,
.nav-mobile-panel a.active {
  color: var(--emerald-deep);
}

/* ═══ NAV DROPDOWN ═══ */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.nav-dropdown-toggle:hover { color: var(--text-primary); }
.nav-dropdown-toggle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-toggle::after { transform: rotate(225deg); margin-top: 3px; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  min-width: 240px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover {
  background: var(--emerald-glow);
  color: var(--emerald-deep);
}
.nav-dropdown-menu a .small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}
.nav-dropdown-menu a:hover .small { color: var(--emerald); }
/* invisible bridge so menu doesn't close in the gap */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

/* ═══ FOOTER ═══ */
.footer-cta {
  background: var(--bg-deep);
  text-align: center;
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.footer-cta::before {
  content: '';
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(5, 150, 105, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.footer-cta h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.footer-cta .sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.footer-links {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-secondary); }

/* ═══ SHARED CTA BUTTON + HERO CTA GROUP ═══ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald-deep);
  color: white;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.2);
}
.btn-primary:hover {
  background: #065f46;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(5, 150, 105, 0.3);
}
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.price-old-hero {
  font-size: 20px;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ═══ SCROLL ANIMATION ═══ */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ═══ FAQ ACCORDION ═══ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question:hover { color: var(--emerald); }
.faq-toggle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.3s, background 0.3s;
}
.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  background: var(--emerald-glow);
  color: var(--emerald);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, padding 0.35s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 20px;
}
.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.faq-answer p + p { margin-top: 10px; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta .price-old { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav-mobile-panel { display: flex; }
  body.nav-open { overflow: hidden; }                 /* lock background scroll */
}

/* Below 480px the logo wordmark + CTA + hamburger no longer fit in a 60px nav
   bar without wrapping. Hide the wordmark — the icon alone still identifies
   the brand and links to "/". */
@media (max-width: 480px) {
  .nav-logo-text { display: none; }
}
