/* ============================================================
   CONSULTORA THEME DOCUMENTATION — Stylesheet
   Brand Color: #006367 (Teal)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #006367;
  --brand-dark:   #004f52;
  --brand-light:  #e6f4f4;
  --nav-width:    280px;
  --text:         #2d3748;
  --text-muted:   #718096;
  --border:       #e2e8f0;
  --bg:           #f7f9fc;
  --white:        #ffffff;
  --radius:       8px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --transition:   .2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  width: var(--nav-width);
  min-height: 100vh;
  background: #1a2336;
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 22px 24px 18px;
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.3px;
}

.sidebar-brand .version-badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.sidebar-brand p {
  font-size: .78rem;
  opacity: .8;
  margin-top: 4px;
}

.nav-section-label {
  padding: 16px 24px 4px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 24px;
  font-size: .84rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: #fff;
  background: rgba(255,255,255,.07);
  border-left-color: var(--brand);
}

.sidebar nav a i {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: .85rem;
  opacity: .9;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 24px;
  font-size: .72rem;
  color: rgba(255,255,255,.25);
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main {
  margin-left: var(--nav-width);
  flex: 1;
  max-width: 900px;
  padding: 48px 56px;
}

/* ── SECTION BLOCKS ───────────────────────────────────────── */
.doc-section {
  margin-bottom: 72px;
  scroll-margin-top: 24px;
}

.doc-section h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.doc-section h2::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 26px;
  background: var(--brand);
  border-radius: 3px;
  flex-shrink: 0;
}

.doc-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 28px 0 12px;
}

.doc-section h4 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
}

.doc-section p, .doc-section li {
  font-size: .93rem;
  line-height: 1.75;
  color: #4a5568;
}

.doc-section ul, .doc-section ol {
  padding-left: 24px;
  margin: 8px 0 16px;
}

.doc-section li { margin-bottom: 4px; }

.doc-section a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.doc-section a:hover { border-bottom-color: var(--brand); }

/* ── HERO / WELCOME CARD ──────────────────────────────────── */
.welcome-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 32px;
}

.welcome-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  border: none;
  padding: 0;
  color: #fff;
  margin-bottom: 8px;
  display: block;
}

.welcome-card h2::before { display: none; }

.welcome-card p { color: rgba(255,255,255,.9); font-size: .95rem; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.meta-item {
  background: rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 12px 16px;
}

.meta-item .label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  opacity: .8;
}

.meta-item .value {
  font-size: .92rem;
  font-weight: 600;
  margin-top: 2px;
}

/* ── IMAGES ───────────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 50px;
}

.screenshot-placeholder img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
}

/* ── SCREENSHOT PLACEHOLDER ───────────────────────────────── */
.screenshot-placeholder {
  width: 100%;
  background: linear-gradient(145deg, #f0f5fa 0%, #e2eaf3 100%);
  border: 2px dashed #b8cbdc;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  margin: 18px 0;
  padding: 32px;
  text-align: center;
  color: #7b94ad;
  gap: 10px;
}

.screenshot-placeholder .icon {
  font-size: 2rem;
  opacity: .4;
  color: var(--brand);
}

.screenshot-placeholder .label {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.screenshot-placeholder .desc {
  font-size: .78rem;
  opacity: .75;
  max-width: 360px;
}

.screenshot-placeholder.small { min-height: 160px; }
.screenshot-placeholder.tall  { min-height: 340px; }

/* ── INFO + WARNING BOXES ─────────────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  font-size: .88rem;
  line-height: 1.65;
}

.callout.info { background: #e8f4fd; border-left: 4px solid #3b82f6; color: #1e3a5f; }
.callout.tip  { background: #ecfdf5; border-left: 4px solid #10b981; color: #064e3b; }
.callout.warn { background: #fffbeb; border-left: 4px solid #f59e0b; color: #78350f; }
.callout.brand{ background: var(--brand-light); border-left: 4px solid var(--brand); color: var(--brand-dark); }

.callout-icon {
  font-size: 1rem;
  flex-shrink: 0;
  padding-top: 2px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,.06);
}

/* ── CODE ─────────────────────────────────────────────────── */
code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .82em;
  background: #edf2f7;
  color: #c53030;
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: #1a202c;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 12px 0;
  font-size: .82rem;
  line-height: 1.7;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* ── STEPS LIST ───────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ── FEATURE GRID ─────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--transition), border-color var(--transition), border-top-color var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--brand);
  border-top-color: var(--brand);
}

.feature-card .fc-icon {
  width: 40px; height: 40px;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  margin-bottom: 12px;
}

.feature-card h4 { font-size: .88rem; margin-bottom: 4px; color: var(--text); }
.feature-card p  { font-size: .78rem; color: var(--text-muted); line-height: 1.55; }

/* ── PLUGIN TABLE ─────────────────────────────────────────── */
.plugin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .85rem;
}

.plugin-table th {
  text-align: left;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.plugin-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.plugin-table tr:nth-child(even) td { background: #fafbfc; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .4px;
}

.badge.required { background: #fed7d7; color: #9b2c2c; }
.badge.recommended { background: #c6f6d5; color: #276749; }
.badge.bundled { background: #bee3f8; color: #2c5282; }

/* ── CUSTOMIZER SETTINGS TABLE ────────────────────────────── */
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
  margin: 12px 0 24px;
}

.settings-table th {
  background: #f7f9fc;
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  text-align: left;
}

.settings-table td {
  border: 1px solid var(--border);
  padding: 8px 14px;
  vertical-align: top;
}

.settings-table td:first-child { font-weight: 500; white-space: nowrap; }
.settings-table td code { font-size: .78em; }

/* ── SIDEBAR AREAS GRID ───────────────────────────────────── */
.sidebar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.sidebar-card h4 { font-size: .85rem; color: var(--brand-dark); margin-bottom: 4px; }
.sidebar-card p  { font-size: .76rem; color: var(--text-muted); line-height: 1.5; }
.sidebar-card code { font-size: .72em; }

/* ── TOP PROGRESS BAR ─────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--brand), #00a3a9);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── MOBILE TOGGLE ────────────────────────────────────────── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 40px; height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .main { padding: 32px 24px; }
  .screenshot-placeholder img { height: 220px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    padding: 24px 18px;
    padding-top: 60px;
  }

  .mobile-toggle { display: flex; }

  .meta-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-placeholder img { height: 180px; }
}

@media (max-width: 480px) {
  .feature-grid, .meta-grid, .sidebar-grid { grid-template-columns: 1fr; }
  .screenshot-placeholder img { height: 140px; }
}

/* ── SMOOTH ANCHOR OFFSET FIX ─────────────────────────────── */
[id] { scroll-margin-top: 16px; }
