/* ===========================
   Guide Page Styles
   =========================== */
:root {
    --bg: #FAF8F5;
    --bg-alt: #F3EFE9;
    --text: #2D2A26;
    --text-secondary: #5A5650;
    --accent: #8B7355;
    --accent-light: #C4A97D;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --transition: all 0.3s ease;
    --sidebar-width: 260px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 1.05rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===========================
   Back Home Link
   =========================== */
.back-home {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 200;
    background: var(--bg);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.back-home:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ===========================
   Sidebar
   =========================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    padding: 4.5rem 1.25rem 2rem;
    background: var(--bg-alt);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.sidebar-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar ul {
    list-style: none;
}

.sidebar>ul>li {
    margin-bottom: 0.25rem;
}

.sidebar ul ul {
    padding-left: 1rem;
}

.sidebar ul ul li {
    margin-bottom: 0;
}

.toc-link {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: var(--transition);
}

.toc-link:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.toc-link.active {
    color: var(--accent);
    font-weight: 600;
    background: rgba(139, 115, 85, 0.08);
}

/* ===========================
   Mobile TOC Toggle
   =========================== */
.toc-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    z-index: 300;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ===========================
   Main Content
   =========================== */
.guide-content {
    margin-left: var(--sidebar-width);
    max-width: 720px;
    padding: 3rem 2.5rem 4rem;
}

/* ===========================
   Hero
   =========================== */
.guide-hero {
    text-align: center;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.guide-hero h1 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.pali-chant {
    background: var(--bg-alt);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    max-width: 520px;
    margin: 0 auto;
}

.pali-chant p {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   Sections
   =========================== */
section {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

section:last-of-type {
    border-bottom: none;
}

section>h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.subsection {
    margin-bottom: 2rem;
}

h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.75rem;
}

h4 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    margin: 1.75rem 0 0.5rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

ul li {
    margin-bottom: 0.4rem;
}

.note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===========================
   Callouts
   =========================== */
.callout {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.08), rgba(196, 169, 125, 0.06));
    border-left: 3px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.callout p {
    margin-bottom: 0;
    font-weight: 500;
}

/* ===========================
   Steps
   =========================== */
.step-sequence {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-alt);
    border-radius: 8px;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.step p {
    margin-bottom: 0;
}

.requirements {
    list-style: none;
    padding-left: 0;
}

.requirements li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.requirements li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ===========================
   Closing & Footer
   =========================== */
.closing {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
    text-align: center;
    padding: 1.5rem 0;
    color: var(--accent);
}

.guide-footer {
    text-align: center;
    padding: 3rem 0 2rem;
}

.cta-button {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--text);
    color: var(--bg);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.cta-button:hover {
    background: var(--accent);
    text-decoration: none;
}

.guide-footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .toc-toggle {
        display: block;
    }

    .guide-content {
        margin-left: 0;
        padding: 2rem 1.25rem 4rem;
    }

    .guide-hero h1 {
        font-size: 2rem;
    }

    .back-home {
        position: static;
        display: block;
        margin-bottom: 1rem;
    }
}