/* ================================================================
   RAVIA.VN — nav.css
   Navigation + shared page-level styles
   ================================================================ */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Cinzel:wght@400;700&display=swap');

/* ================================================================
   PAGE LOADER
   ================================================================ */

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0D0808;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-yy {
  animation: yy-spin 0.85s linear infinite;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.35));
}

.loader-brand {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #D4AF37;
  letter-spacing: 8px;
  opacity: 0.75;
}

/* ================================================================
   SITE HEADER
   ================================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background: rgba(13, 8, 8, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(212,175,55,0.12);
}

/* ================================================================
   SITE NAV
   ================================================================ */

.site-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ================================================================
   NAV LOGO
   ================================================================ */

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

/* Yin-Yang spin — brand element */
@keyframes yy-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.nav-logo-yin {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.4));
  transition: filter 0.3s ease;
}

.nav-yy {
  display: block;
  animation: yy-spin 9s linear infinite;
}

.nav-logo:hover .nav-logo-yin {
  filter: drop-shadow(0 0 12px rgba(212,175,55,0.75));
}

.nav-logo-texts {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo-name {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 4px;
}

.nav-logo-sub {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ================================================================
   NAV LINKS
   ================================================================ */

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.nav-links li a {
  display: block;
  padding: 6px 13px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.25s ease, background 0.25s ease;
  position: relative;
  white-space: nowrap;
}

.nav-links li a:hover {
  color: var(--gold);
  background: rgba(212,175,55,0.06);
}

.nav-links li a.active {
  color: var(--gold);
  background: rgba(212,175,55,0.08);
}

.nav-links li a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

/* CTA link */
.nav-links li a.nav-cta-link {
  background: linear-gradient(135deg, rgba(139,26,26,0.8), rgba(165,32,32,0.9));
  color: #F5E6C8;
  border: 1px solid rgba(212,175,55,0.25);
  padding: 7px 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.nav-links li a.nav-cta-link:hover {
  background: linear-gradient(135deg, rgba(165,32,32,0.9), rgba(139,26,26,1));
  color: var(--gold);
  box-shadow: 0 4px 16px rgba(139,26,26,0.4);
}

.nav-links li a.nav-cta-link.active {
  color: var(--gold);
}

.nav-links li a.nav-cta-link::after {
  display: none;
}

/* ================================================================
   HAMBURGER TOGGLE
   ================================================================ */

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--gold);
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, background 0.25s;
  flex-shrink: 0;
  line-height: 1;
}

.nav-toggle:hover {
  background: rgba(212,175,55,0.08);
  border-color: rgba(212,175,55,0.6);
}

/* ================================================================
   MOBILE NAV
   ================================================================ */

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(13,8,8,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212,175,55,0.15);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li a {
    padding: 12px 8px;
    font-size: 0.9rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(212,175,55,0.07);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links li a.active::after {
    display: none;
  }

  .nav-links li a.nav-cta-link {
    margin-top: 10px;
    border-radius: 8px;
    text-align: center;
  }
}

/* ================================================================
   PAGE BODY OFFSET (for fixed nav)
   ================================================================ */

.page-body {
  padding-top: 68px;
}

/* ================================================================
   BG CANVAS
   ================================================================ */

#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page-content {
  position: relative;
  z-index: 1;
}

/* ================================================================
   PAGE HERO (smaller than landing, for inner pages)
   ================================================================ */

.method-page-hero {
  padding: 80px 0 50px;
  text-align: center;
  position: relative;
}

.method-page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.page-hero-eyebrow {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}

.page-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}

.page-hero-title .text-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero-sub {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.page-hero-hook {
  max-width: 540px;
  margin: 20px auto 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  line-height: 1.8;
  font-style: italic;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.page-hero-hook strong {
  color: rgba(212,175,55,0.85);
  font-style: normal;
}

/* ================================================================
   INTRO SECTION
   ================================================================ */

.intro-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px;
  margin-bottom: 40px;
}

.intro-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 2px;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.intro-section h2:first-child {
  margin-top: 0;
}

.intro-section p {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 0.93rem;
  margin-bottom: 12px;
}

.intro-section ul {
  margin: 8px 0 16px 20px;
}

.intro-section li {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.93rem;
  margin-bottom: 6px;
}

.intro-section li::marker {
  color: var(--gold);
}

.intro-section ol {
  margin: 8px 0 16px 20px;
  counter-reset: step;
  list-style: none;
}

.intro-section ol li {
  counter-increment: step;
  padding-left: 8px;
}

.intro-section ol li::before {
  content: counter(step) ".";
  color: var(--gold);
  font-weight: 700;
  margin-right: 8px;
  font-family: 'Playfair Display', serif;
}

.intro-callout {
  background: rgba(212,175,55,0.05);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 16px 0;
}

.intro-callout p {
  margin: 0 !important;
  color: var(--text) !important;
  font-style: italic;
}

/* ================================================================
   HEX DISPLAY WRAP (result area central hexagram)
   ================================================================ */

.hex-display-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#hex-svg-main {
  width: 160px;
  height: 220px;
  flex-shrink: 0;
}

#hex-svg-main svg {
  width: 100%;
  height: 100%;
}

/* ================================================================
   QUE MINI WRAP (for ho/bien)
   ================================================================ */

.que-mini-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hex-mini-svg {
  width: 64px;
  height: 90px;
  flex-shrink: 0;
  opacity: 0.85;
}

.hex-mini-svg svg {
  width: 100%;
  height: 100%;
}

/* ================================================================
   METHOD TABS (sub-tabs within a page)
   ================================================================ */

.mai-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.mai-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: -1px;
  border-radius: 6px 6px 0 0;
}

.mai-tab:hover {
  color: var(--gold);
  background: rgba(212,175,55,0.04);
}

.mai-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(212,175,55,0.06);
}

/* ================================================================
   WIZARD TIMELINE
   ================================================================ */

.wizard-timeline {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
  margin-bottom: 32px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0;
}

.wt-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.wt-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(212,175,55,0.25);
  color: var(--text-muted);
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: var(--bg-card);
}

.wt-label {
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
}

.wt-line {
  flex: 1;
  min-width: 30px;
  height: 2px;
  background: rgba(212,175,55,0.15);
  transition: background 0.4s ease;
}

.wt-line.wt-filled { background: var(--gold); }

#wt-1.wt-active .wt-circle,
#wt-2.wt-active .wt-circle,
#wt-3.wt-active .wt-circle,
#wt-4.wt-active .wt-circle {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,175,55,0.08);
  box-shadow: 0 0 10px rgba(212,175,55,0.2);
}

#wt-1.wt-done .wt-circle,
#wt-2.wt-done .wt-circle,
#wt-3.wt-done .wt-circle,
#wt-4.wt-done .wt-circle {
  border-color: var(--gold);
  background: rgba(212,175,55,0.15);
  color: var(--gold);
}

/* ================================================================
   LUAN ACTIONS
   ================================================================ */

#luan-actions {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0;
}

/* ================================================================
   SECTION LAYOUT
   ================================================================ */

.section-page {
  padding: 60px 0;
}

.section-page + .section-page {
  padding-top: 0;
}

/* ================================================================
   LANDING PAGE HERO
   ================================================================ */

.landing-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: center;
  gap: 60px;
  padding: 100px 0 60px;
  position: relative;
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 90px 0 40px;
  }
  .landing-hero .hero-hex-col {
    display: flex;
    justify-content: center;
  }
}

.hero-eyebrow {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 18px;
}

.hero-main-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.hero-main-title .text-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: 36px;
}

@media (max-width: 900px) {
  .hero-desc { margin-left: auto; margin-right: auto; }
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .hero-btns { justify-content: center; }
}

.hero-quote {
  margin-top: 50px;
  padding: 20px 28px;
  border-left: 3px solid var(--gold);
  background: rgba(212,175,55,0.04);
  border-radius: 0 8px 8px 0;
}

.hero-quote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.7;
}

.hero-quote cite {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 1.5px;
  font-style: normal;
  text-transform: uppercase;
}

/* Hex SVG hero container */
#hero-hex-svg {
  width: 280px;
  height: 380px;
}

#hero-hex-svg svg {
  width: 100%;
  height: 100%;
}

/* ================================================================
   METHODS GRID (landing)
   ================================================================ */

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.method-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.method-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(212,175,55,0.08);
}

.method-card:hover::before {
  transform: scaleX(1);
}

.method-card-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 14px;
}

.method-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.method-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.method-card-arrow {
  display: block;
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s;
  letter-spacing: 1px;
}

.method-card:hover .method-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ================================================================
   ABOUT SECTION (landing)
   ================================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .landing-hero { gap: 30px; }
  .intro-section { padding: 28px 20px; }
  .hexagram-display { grid-template-columns: 1fr; }
  .hex-main { border-right: none; border-bottom: 1px solid var(--border); }
  .knowledge-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

.about-text p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

.about-books {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-book-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.25s;
}

.about-book-item:hover {
  border-color: var(--border-hover);
}

.about-book-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.about-book-info { flex: 1; }

.about-book-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.about-book-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ================================================================
   FOOTER STYLES
   ================================================================ */

.site-footer {
  background: #080505;
  position: relative;
  z-index: 1;
  padding: 0 0 0;
}

.footer-glow-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212,175,55,0.15) 20%,
    rgba(212,175,55,0.5) 50%,
    rgba(212,175,55,0.15) 80%,
    transparent 100%);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Main row: brand + nav */
.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  padding: 48px 0 40px;
}

/* Brand block */
.footer-brand {
  flex-shrink: 0;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-yy {
  animation: yy-spin 9s linear infinite;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.3));
  flex-shrink: 0;
}

.footer-logo-name {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 5px;
}

.footer-tagline {
  font-family: 'Playfair Display', serif;
  font-size: 0.82rem;
  color: rgba(212,175,55,0.45);
  line-height: 1.9;
  letter-spacing: 0.5px;
}

/* Nav links */
.footer-nav {
  display: flex;
  gap: 52px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 4px;
}

.footer-nav-col a {
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  opacity: 0.75;
}

.footer-nav-col a:hover {
  color: var(--gold);
  opacity: 1;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(212,175,55,0.08);
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-copy {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.45;
  letter-spacing: 2px;
  white-space: nowrap;
}

.footer-mid-dots {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.35;
  white-space: nowrap;
}

.footer-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.35;
  margin-left: auto;
}

@media (max-width: 700px) {
  .footer-main {
    flex-direction: column;
    gap: 28px;
    padding: 36px 0 28px;
  }
  .footer-nav { gap: 32px; }
  .footer-bottom { justify-content: center; }
  .footer-disclaimer { margin-left: 0; text-align: center; width: 100%; }
  .footer-mid-dots { display: none; }
}

/* ================================================================
   KNOWLEDGE PAGE - TRIGRAMS TABLE
   ================================================================ */

.trigrams-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 20px;
}

.trigrams-table th {
  background: rgba(212,175,55,0.08);
  color: var(--gold);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.trigrams-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(212,175,55,0.07);
  color: var(--text-muted);
  vertical-align: middle;
  line-height: 1.5;
}

.trigrams-table tr:hover td {
  background: rgba(212,175,55,0.02);
}

.tri-symbol {
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

.tri-name {
  color: var(--text);
  font-family: 'Playfair Display', serif;
}

/* ================================================================
   64 QUE GRID (knowledge page)
   ================================================================ */

.que64-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .que64-grid { grid-template-columns: repeat(4, 1fr); }
}

.que64-cell {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 6px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: default;
}

.que64-cell:hover {
  border-color: var(--border-hover);
  background: rgba(212,175,55,0.06);
}

.que64-num {
  font-size: 0.6rem;
  color: var(--gold);
  display: block;
  margin-bottom: 2px;
}

.que64-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ================================================================
   NGU HANH DIAGRAM
   ================================================================ */

.nguhanh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .nguhanh-grid { grid-template-columns: 1fr; }
}

.nguhanh-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.nguhanh-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.nguhanh-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
}

.nguhanh-item {
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8rem;
}

.nh-moc  { background: rgba(34,139,34,0.15); color: #4CAF50; border: 1px solid rgba(76,175,80,0.3); }
.nh-hoa  { background: rgba(220,80,60,0.15);  color: #EF5350; border: 1px solid rgba(239,83,80,0.3); }
.nh-tho  { background: rgba(139,100,20,0.15); color: #D4AF37; border: 1px solid rgba(212,175,55,0.3); }
.nh-kim  { background: rgba(192,192,192,0.15); color: #B0BEC5; border: 1px solid rgba(176,190,197,0.3); }
.nh-thuy { background: rgba(30,80,180,0.15); color: #64B5F6; border: 1px solid rgba(100,181,246,0.3); }

.nguhanh-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ================================================================
   THE DUNG TABLE
   ================================================================ */

.thedung-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 16px;
}

.thedung-table th {
  background: rgba(212,175,55,0.08);
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.thedung-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(212,175,55,0.07);
  color: var(--text-muted);
  vertical-align: middle;
}

.thedung-table tr:hover td {
  background: rgba(212,175,55,0.02);
}

/* ================================================================
   HOI DAP PAGE - ACCORDION
   ================================================================ */

.hoidap-form {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  max-width: 720px;
  margin: 0 auto;
}

.hoidap-form h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.hoidap-form p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  line-height: 1.7;
}

.hoidap-result {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.8;
  display: none;
}

.hoidap-result.visible { display: block; }

/* ================================================================
   TOAST
   ================================================================ */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,20,20,0.95);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.85rem;
  z-index: 9999;
  white-space: nowrap;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ================================================================
   METHOD INFO ACCORDION
   ================================================================ */

.method-info-section { padding-top: 8px !important; }

.method-info-label {
  font-size: 0.7rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  opacity: 0.65;
}

.method-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.012);
}

.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }

.acc-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 500;
  text-align: left;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.3px;
}

.acc-trigger:hover { background: rgba(212,175,55,0.06); color: var(--gold); }
.acc-trigger[aria-expanded="true"] { color: var(--gold); background: rgba(212,175,55,0.05); }

.acc-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.32s ease, color 0.2s;
}
.acc-trigger[aria-expanded="true"] .acc-chevron { transform: rotate(180deg); color: var(--gold); }

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.acc-panel.open { grid-template-rows: 1fr; }
.acc-panel-inner { overflow: hidden; }

.acc-body {
  padding: 4px 20px 20px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.8;
}
.acc-body p { margin-bottom: 10px; }
.acc-body ul, .acc-body ol { margin: 6px 0 10px 20px; }
.acc-body li { margin-bottom: 6px; }
.acc-body strong { color: var(--text); }
.acc-body em { color: rgba(212,175,55,0.85); font-style: italic; }
.acc-body .intro-callout { margin: 10px 0; }
.acc-body table { width: 100%; }

/* ================================================================
   LANDING PAGE - HOOK SECTION
   ================================================================ */

.hook-section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
  background: var(--bg-dark);
  overflow: hidden;
}

.hook-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(212,175,55,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hook-section-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hook-ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  justify-content: center;
}

.hook-ornament-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.4));
}

.hook-ornament-line:last-child {
  background: linear-gradient(90deg, rgba(212,175,55,0.4), transparent);
}

.hook-ornament-symbol {
  font-size: 1.4rem;
  color: rgba(212,175,55,0.6);
}

.hook-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.35;
}

.hook-section h2 em {
  font-style: italic;
  color: var(--gold);
}

.hook-lead {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: rgba(255,255,255,0.78);
  line-height: 2;
  margin-bottom: 20px;
  font-style: italic;
}

.hook-lead strong {
  color: var(--gold);
  font-style: normal;
}

.hook-body {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.95;
  margin-bottom: 14px;
  text-align: left;
}

.hook-body strong { color: var(--text); }

.hook-cta-line {
  display: inline-block;
  margin-top: 22px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

/* ================================================================
   LANDING PAGE - STORIES SECTION
   ================================================================ */

.stories-section {
  position: relative;
  z-index: 1;
  padding: 70px 0 80px;
  background: var(--bg-card);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .stories-grid { grid-template-columns: 1fr; }
}

.story-card {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px 24px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.story-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.story-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.story-card:hover::after { transform: scaleX(1); }

.story-era {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.63rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 10px;
}

.story-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.story-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.35;
}

.story-card h3 em { color: var(--gold); font-style: italic; }

.story-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.88;
}

.story-body strong { color: rgba(212,175,55,0.85); }

.story-source {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(212,175,55,0.1);
  font-size: 0.67rem;
  letter-spacing: 1.2px;
  color: var(--gold);
  opacity: 0.5;
  text-transform: uppercase;
}

/* ================================================================
   LANDING PAGE - QUOTES WALL
   ================================================================ */

.quotes-section {
  position: relative;
  z-index: 1;
  padding: 70px 0 80px;
  background: var(--bg-dark);
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .quotes-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .quotes-grid { grid-template-columns: 1fr; }
}

.quote-tile {
  background: rgba(212,175,55,0.025);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 12px;
  padding: 24px 22px;
  position: relative;
  transition: border-color 0.25s, background 0.25s;
}

.quote-tile:hover {
  border-color: rgba(212,175,55,0.28);
  background: rgba(212,175,55,0.045);
}

.quote-tile::before {
  content: '❝';
  position: absolute;
  top: 10px; right: 14px;
  font-size: 2.8rem;
  color: rgba(212,175,55,0.07);
  line-height: 1;
  font-family: Georgia, serif;
}

.qt-han {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 3px;
}

.qt-viet {
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 8px;
}

.qt-explain {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.qt-source {
  font-size: 0.63rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.48;
}

/* ================================================================
   QUE CONTEXT BAR (result area — shows question + time used)
   ================================================================ */

.que-context-bar {
  background: rgba(212,175,55,0.06);
  border: 1px solid rgba(212,175,55,0.16);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.que-context-bar .qcb-question {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 5px;
}

.que-context-bar .qcb-time {
  font-size: 0.75rem;
  color: var(--gold);
  opacity: 0.8;
  letter-spacing: 0.5px;
}

/* ================================================================
   AUTH NAV LINKS
   ================================================================ */

.nav-auth-link {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--text) !important;
  transition: all 0.2s;
}
.nav-auth-link:hover { border-color: var(--gold); color: var(--gold) !important; }
.nav-register-link { background: rgba(212,175,55,0.1); }
.nav-admin-link { border-color: rgba(231,76,60,0.4); color: #e74c3c !important; }
.nav-logout-link { opacity: 0.7; }

/* ================================================================
   VERDICT BADGE
   ================================================================ */

.verdict-badge {
  display: none;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 10px 28px;
  border-radius: 6px;
  margin: 0 auto 20px;
  width: fit-content;
}
.verdict-cuc-tot  { background: linear-gradient(135deg,#B8860B,#FFD700); color: #1a0800; border: 2px solid #FFD700; }
.verdict-tot      { background: rgba(39,174,96,0.12); border: 2px solid #27AE60; color: #2ecc71; }
.verdict-trung    { background: rgba(243,156,18,0.12); border: 2px solid #F39C12; color: #f39c12; }
.verdict-xau      { background: rgba(231,76,60,0.12); border: 2px solid #e74c3c; color: #e74c3c; }
.verdict-xau-nang { background: rgba(192,57,43,0.18); border: 2px solid #c0392b; color: #e74c3c; }
.verdict-cuc-xau  { background: rgba(109,0,0,0.25); border: 2px solid #922B21; color: #ff6b6b; }

/* ================================================================
   PREVIEW BLUR OVERLAY
   ================================================================ */

#r-preview-overlay {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.preview-teaser {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
  padding: 16px;
  background: rgba(212,175,55,0.04);
  border-left: 3px solid rgba(212,175,55,0.3);
  border-radius: 0 6px 6px 0;
}
.preview-blur-wrap {
  position: relative;
  border-radius: 8px;
  min-height: 120px;
}
.preview-blur-text {
  position: absolute;
  inset: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text);
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  padding: 16px;
  overflow: hidden;
}
.preview-cta-box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(13,4,1,0.55) 0%, rgba(13,4,1,0.93) 25%);
  gap: 12px;
  padding: 20px 16px;
  border-radius: 8px;
}
.preview-cta-text {
  color: var(--text);
  font-size: 1rem;
  text-align: center;
  margin: 0;
}
.preview-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-gold-sm {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg,#B8860B,#D4AF37);
  color: #0d0401;
  font-family: 'Cinzel',serif;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: filter 0.2s;
}
.btn-gold-sm:hover { filter: brightness(1.1); }
.btn-outline-sm {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold);
  font-size: 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s;
}
.btn-outline-sm:hover { border-color: var(--gold); }

/* ================================================================
   RESPONSIVE HELPERS
   ================================================================ */

@media (max-width: 600px) {
  .methods-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { padding: 0 16px; }
  .method-page-hero { padding: 60px 0 36px; }
  .section-page { padding: 40px 0; }
  .intro-section { padding: 24px 16px; }
  .que64-grid { gap: 4px; }
}
