/* ==========================================================================
   Speakeasy Vaporium - Knowledge Base / Glossary Styles
   Shared across index + all /glossary/{term}/ pages
   ========================================================================== */

:root {
  --gold: #C9A96E;
  --gold-light: #DFC397;
  --gold-dark: #A88B4A;
  --charcoal: #1A1A1A;
  --charcoal-light: #2A2A2A;
  --charcoal-mid: #222222;
  --cream: #F5F0E8;
  --cream-dark: #E8DFD0;
  --smoke: #8A8A8A;
  --deep-brown: #2C1810;
  --burgundy: #6B1D2A;
  --emerald: #1B4332;
}

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

a, button, input, textarea, select {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  font-family: 'Lora', Georgia, serif;
  background: var(--charcoal);
  color: var(--cream);
  overflow-x: hidden;
  width: 100%;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

/* ============ NAVIGATION (matches main site) ============ */
#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  width: 100%; padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  transition: all 0.4s;
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}
.nav-logo { height: 50px; }
.nav-links {
  list-style: none; display: flex; gap: 32px; align-items: center;
}
.nav-links a {
  color: var(--cream); text-decoration: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem; letter-spacing: 2.5px; text-transform: uppercase;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  border: 1px solid var(--gold); padding: 10px 20px; color: var(--gold) !important;
}
.nav-cta:hover { background: var(--gold); color: var(--charcoal) !important; }
.mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.mobile-toggle span {
  width: 26px; height: 2px; background: var(--cream); transition: all 0.3s;
}

/* ============ HERO ============ */
.glossary-hero {
  min-height: 45vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 140px 40px 60px;
  background: linear-gradient(180deg, var(--charcoal) 0%, var(--charcoal-light) 100%);
  border-bottom: 1px solid rgba(201, 169, 110, 0.15);
}
.glossary-hero-content { max-width: 860px; }
.glossary-label {
  font-family: 'Bebas Neue', sans-serif; color: var(--gold);
  letter-spacing: 5px; font-size: 0.85rem; display: block; margin-bottom: 20px;
}
.glossary-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem); color: var(--cream);
  margin-bottom: 20px; line-height: 1.2;
}
.glossary-hero h1 span { color: var(--gold); font-style: italic; }
.hero-divider {
  width: 80px; height: 2px; background: var(--gold); margin: 20px auto;
}
.glossary-hero p {
  font-size: 1.05rem; color: var(--cream-dark); max-width: 680px;
  margin: 0 auto; text-align: justify;
}

/* ============ GLOSSARY INDEX GRID ============ */
.glossary-container { max-width: 1100px; margin: 60px auto 100px; padding: 0 40px; }
.term-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.term-card {
  background: var(--charcoal-light);
  border: 1px solid rgba(201, 169, 110, 0.15);
  padding: 32px 28px; text-decoration: none; color: var(--cream);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1); position: relative;
}
.term-card:hover {
  border-color: var(--gold); transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.term-category {
  font-family: 'Bebas Neue', sans-serif; color: var(--gold);
  letter-spacing: 2.5px; font-size: 0.7rem; text-transform: uppercase;
}
.term-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem; margin: 12px 0 14px; color: var(--cream);
}
.term-card p { color: var(--smoke); font-size: 0.92rem; text-align: justify; }
.term-card-link {
  display: inline-block; margin-top: 16px; color: var(--gold);
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px;
  font-size: 0.8rem; text-decoration: none;
}

/* ============ TERM DETAIL PAGE ============ */
.term-article {
  max-width: 780px; margin: 40px auto 100px; padding: 0 40px;
}
.term-breadcrumb {
  font-family: 'Bebas Neue', sans-serif; font-size: 0.75rem;
  letter-spacing: 2.5px; color: var(--smoke); margin-bottom: 24px;
}
.term-breadcrumb a { color: var(--gold); text-decoration: none; }
.term-breadcrumb a:hover { color: var(--gold-light); }
.term-article h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--cream);
  margin-bottom: 16px; line-height: 1.25;
}
.term-article .term-short {
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic;
  font-size: 1.2rem; color: var(--gold-light); margin-bottom: 30px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(201,169,110,0.2);
}
.term-article h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem; color: var(--gold); margin: 36px 0 16px;
}
.term-article p {
  font-size: 1rem; color: var(--cream-dark); margin-bottom: 18px;
  text-align: justify;
}
.term-article a { color: var(--gold); }
.term-article a:hover { color: var(--gold-light); }
.term-article ul { margin: 0 0 20px 24px; color: var(--cream-dark); }
.term-article li { margin-bottom: 8px; text-align: justify; }

.related-terms {
  margin-top: 60px; padding: 32px;
  background: var(--charcoal-light);
  border: 1px solid rgba(201, 169, 110, 0.15);
}
.related-terms h3 {
  font-family: 'Bebas Neue', sans-serif; color: var(--gold);
  letter-spacing: 3px; font-size: 0.95rem; margin-bottom: 18px;
}
.related-terms ul { list-style: none; margin: 0; }
.related-terms li { margin-bottom: 10px; text-align: left; }
.related-terms a { color: var(--cream); text-decoration: none; }
.related-terms a:hover { color: var(--gold); }

/* ============ AUTO-LINK STYLE (site-wide glossary links) ============ */
.glossary-link {
  color: var(--gold);
  border-bottom: 1px dotted rgba(201, 169, 110, 0.5);
  text-decoration: none;
  cursor: help;
}
.glossary-link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

/* ============ FOOTER (matches main site) ============ */
footer {
  background: var(--charcoal-light); padding: 60px 40px 30px;
  border-top: 1px solid rgba(201, 169, 110, 0.15);
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px;
}
.footer-brand p { color: var(--smoke); font-size: 0.9rem; text-align: justify; }
.footer-col h4 {
  font-family: 'Bebas Neue', sans-serif; color: var(--gold);
  letter-spacing: 2.5px; font-size: 0.9rem; margin-bottom: 16px;
}
.footer-col a {
  display: block; color: var(--cream-dark); text-decoration: none;
  font-size: 0.88rem; margin-bottom: 10px;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(201,169,110,0.1);
  display: flex; justify-content: space-between;
  color: var(--smoke); font-size: 0.82rem;
}
.footer-bottom a { color: var(--smoke); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  #mainNav { padding: 12px 16px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: rgba(26, 26, 26, 0.98);
    gap: 0; max-height: 0; overflow: hidden;
    transition: max-height 0.3s; align-items: flex-start; padding: 0;
  }
  .nav-links.open { max-height: 500px; padding: 20px; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 12px 0; font-size: 0.9rem; display: block; }
  .nav-cta { width: 100% !important; text-align: center; }
  .mobile-toggle { display: flex; }
  .nav-logo { height: 40px; }
  .glossary-hero { padding: 100px 20px 40px; min-height: auto; }
  .glossary-container { margin: 40px auto 60px; padding: 0 20px; }
  .term-article { padding: 0 20px; margin: 30px auto 60px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
}
