/* =========================================================
   Varela Digital — Project Discussion page (standalone CSS)
   File: /assets/css/project_discussion.css
   Notes:
   - Do NOT include data_model.css on this page.
   - Assumes global navbar/fonts/colors come from styles.css
   ========================================================= */

/* ---- Tokens ---- */
:root{
  --vd-bg: #F8F5EF;
  --vd-ink: #2f2f2f;
  --vd-accent: #5E121A;
  --vd-border: #C4B3B2;
  --vd-card: #ffffff;

  --vd-maxw: 1100px;
  --vd-nav-offset: 110px; /* must match your inline padding-top */
}

/* ---- Page baseline ---- */
body{
  background: var(--vd-bg);
  color: var(--vd-ink);
  font-size: 15px;
  line-height: 1.65;
}

/* ---- Main container ---- */
.vd-page.vd-discussion-page{
  max-width: var(--vd-maxw);
  margin: 0 auto;
  padding: 2.2rem 1.2rem 3rem;
}

/* ---- Header ---- */
.vd-header{
  margin-bottom: 1.4rem;
}

.vd-discussion-page h1{
  font-size: 2.35rem;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.8rem;
  color: var(--vd-ink);
}

.vd-discussion-page h2{
  font-size: 1.55rem;
  font-weight: 650;
  margin: 1.6rem 0 0.65rem;
  color: var(--vd-ink);
}

.vd-discussion-page h3{
  font-size: 1.1rem;
  font-weight: 650;
  margin: 1.1rem 0 0.5rem;
  color: var(--vd-ink);
}

.vd-lead{
  max-width: 82ch;
  margin: 0 0 0.25rem 0;
  opacity: 0.95;
}

/* ---- Smooth anchor jumps + prevent navbar overlap ---- */
html{
  scroll-behavior: smooth;
}

/* Apply offset for all anchor targets */
.vd-section,
.vd-section[id]{
  scroll-margin-top: calc(var(--vd-nav-offset) + 10px);
}

/* ---- Layout: sidebar + content ---- */
.vd-layout{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.vd-content{
  min-width: 0; /* prevents overflow */
}

/* ---- Text flow ---- */
.vd-content p{
  margin: 0.65rem 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Inline code (if needed) */
.vd-discussion-page code{
  color: var(--vd-accent);
  font-weight: 600;
  background: rgba(122, 31, 41, 0.08);
  padding: 0.08rem 0.35rem;
  border-radius: 6px;
}

/* ---- Sidebar (TOC) ---- */
.vd-toc{
  position: sticky;
  top: var(--vd-nav-offset);
  background: rgba(94, 18, 26, 0.08);
  border: 1px solid rgba(196,179,178,0.9);
  border-left: 6px solid var(--vd-accent);
  border-radius: 12px;
  padding: 1rem 1rem;
}

.vd-toc-title{
  font-weight: 750;
  color: var(--vd-ink);
  margin-bottom: 0.65rem;
}

.vd-toc-list{
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.vd-toc-list li{
  margin: 0.42rem 0;
  line-height: 1.35;
}

.vd-toc-list a{
  color: var(--vd-accent);
  text-decoration: none;
  font-weight: 650;
}

.vd-toc-list a:hover{
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ---- Sections ---- */
.vd-section{
  padding-top: 0.2rem;
}

.vd-section + .vd-section{
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(196,179,178,0.55);
}

/* ---- Bullets (clean + readable) ---- */
.vd-bullets{
  margin: 0.75rem 0 0.9rem 1.1rem;
}

.vd-bullets li{
  margin: 0.35rem 0;
  line-height: 1.45;
}

/* ---- Cards (pipeline + columns) ---- */
.vd-card{
  margin: 1rem 0 1.15rem 0;
  padding: 0.95rem 1.05rem;
  background: var(--vd-card);
  border: 1px solid rgba(196,179,178,0.95);
  border-radius: 14px;
}

.vd-card-title{
  margin: 0 0 0.6rem 0;
  font-size: 1.05rem;
  color: var(--vd-accent);
  font-weight: 750;
}

.vd-steps{
  margin: 0;
  padding-left: 1.2rem;
}

.vd-steps li{
  margin: 0.4rem 0;
}

/* Two columns for “Implemented / Planned” */
.vd-two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.8rem;
}

/* ---- Details dropdown ---- */
.vd-details{
  margin-top: 1.1rem;
  background: var(--vd-card);
  border: 1px solid rgba(196,179,178,0.95);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.vd-details > summary{
  cursor: pointer;
  font-weight: 750;
  color: var(--vd-accent);
  list-style: none;
}

.vd-details > summary::-webkit-details-marker{
  display: none;
}

.vd-details > summary::after{
  content: "▾";
  float: right;
  color: var(--vd-accent);
}

.vd-details[open] > summary::after{
  content: "▴";
}

.vd-details-body{
  margin-top: 0.75rem;
}

/* ---- Buttons (match documentation vibe) ---- */
.vd-discussion-page .btn-outline-primary{
  color: var(--vd-accent);
  border-color: var(--vd-border);
  background-color: transparent;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
}

.vd-discussion-page .btn-outline-primary:hover,
.vd-discussion-page .btn-outline-primary:focus{
  color: #ffffff;
  background-color: var(--vd-accent);
  border-color: var(--vd-accent);
  box-shadow: none;
}

.vd-discussion-page .btn-outline-primary:active{
  background-color: #4a0e14;
  border-color: #4a0e14;
  color: #ffffff;
}

.vd-discussion-page .btn-outline-primary:focus-visible{
  outline: none;
  box-shadow: 0 0 0 0.15rem rgba(94, 18, 26, 0.25);
}

/* ---- Footer (consistent with other pages) ---- */
.vd-footer{
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(196,179,178,0.75);
  text-align: center;
  color: var(--vd-ink);
}

.vd-footer a{
  color: var(--vd-accent);
  text-decoration: none;
  font-weight: 650;
}

.vd-footer a:hover{
  text-decoration: underline;
}

.vd-footer .footer-links{
  margin-bottom: 0.55rem;
}

.vd-footer .footer-small{
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ---- Responsive ---- */
@media (max-width: 992px){
  .vd-layout{
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .vd-toc{
    position: static;
    top: auto;
  }

  .vd-two-col{
    grid-template-columns: 1fr;
  }

  .vd-lead{
    max-width: none;
  }
}

@media (max-width: 576px){
  body{
    font-size: 14.5px;
  }

  .vd-page.vd-discussion-page{
    padding: 1.6rem 1rem 2.4rem;
  }

  .vd-discussion-page h1{
    font-size: 2.05rem;
  }

  .vd-discussion-page h2{
    font-size: 1.35rem;
  }
}

/* ---- Figure captions (workflow diagrams, code snapshots) ---- */
.vd-discussion-page figure figcaption{
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(47, 47, 47, 0.75);
  margin-top: 0.45rem;
  line-height: 1.4;
}