/* =========================================
   Buddhist Practice Guide — Dark Theme
   Consistent with July Life Coach hub ecosystem
   ========================================= */

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

:root {
    --bg: #0a0c10;
    --bg-surface: #0E1117;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text: #E8E4DD;
    --text-secondary: rgba(255,255,255,0.55);
    --text-muted: rgba(255,255,255,0.3);
    --accent: #C27C5A;
    --accent-light: rgba(194,124,90,0.12);
    --accent-hover: #d4906e;
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAIN CONTENT LAYOUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.guide-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: 4rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.guide-hero {
    text-align: center;
    padding: 5rem 0 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.guide-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.guide-hero .subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.pali-chant {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    display: inline-block;
    max-width: 100%;
}

.pali-chant p {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: var(--accent);
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

section h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.subsection {
    margin-bottom: 2rem;
}

.subsection h3 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}

h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.8;
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LISTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.8;
    margin-bottom: 0.4rem;
}

li strong {
    color: var(--text);
}

.requirements {
    list-style: none;
    padding-left: 0;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.requirements li {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.requirements li strong {
    color: var(--accent);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CALLOUT BOX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.callout {
    background: var(--accent-light);
    border: 1px solid rgba(194,124,90,0.2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    text-align: center;
}

.callout p {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 0;
}

.callout strong {
    color: var(--accent);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STEP SEQUENCE (Bowing / Meditation Steps)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.step-sequence {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    transition: border-color 0.2s, background 0.2s;
}

.step:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

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

.step p {
    margin-bottom: 0.75rem;
}

.step-image {
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.step-image img {
    width: 100%;
    display: block;
    opacity: 0.88;
    transition: opacity 0.3s;
}

.step:hover .step-image img {
    opacity: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FIGURES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.guide-figure {
    margin: 2rem 0;
    text-align: center;
}

.guide-figure img {
    border-radius: 10px;
    border: 1px solid var(--border);
    margin: 0 auto;
    max-width: 480px;
    opacity: 0.88;
}

.guide-figure figcaption {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NOTE TEXT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.note {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-style: italic;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
    margin: 1rem 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CLOSING & GUIDE FOOTER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.closing {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--text);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
    line-height: 1.8;
}

.guide-footer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    text-align: center;
}

.guide-footer p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.cta-button:hover {
    background: var(--accent-hover);
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(194, 124, 90, 0.3);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLE OF CONTENTS SIDEBAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.toc-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 220px;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    padding: 1rem 1.2rem;
    font-size: 0.78rem;
    z-index: 50;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.toc-sidebar h2 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    border-bottom: none;
    padding: 0;
}

.toc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-sidebar li {
    margin-bottom: 0.1rem;
}

.toc-link {
    display: block;
    padding: 0.35rem 0.6rem;
    border-radius: 5px;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.78rem;
    line-height: 1.4;
    transition: all 0.15s;
}

.toc-link:hover {
    color: var(--text-secondary) !important;
    background: rgba(255,255,255,0.04);
}

.toc-link.active {
    color: var(--accent) !important;
    background: var(--accent-light);
}

.toc-sub {
    padding-left: 0.8rem;
}

.toc-sub .toc-link {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.22) !important;
}

.toc-sub .toc-link:hover {
    color: var(--text-muted) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE TOC TOGGLE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.toc-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s;
}

.toc-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (min-width: 1100px) {
    .guide-content {
        margin-left: 260px;
    }
}

@media (max-width: 1099px) {
    .guide-content {
        max-width: 800px;
        margin: 0 auto;
    }

    .toc-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        max-height: 100vh;
        background: var(--bg-surface);
        border-right: 1px solid var(--border);
        padding: 5rem 1.5rem 2rem;
        z-index: 200;
        transition: left 0.3s ease;
    }

    .toc-sidebar.open {
        left: 0;
    }

    .toc-toggle {
        display: block;
    }
}

@media (max-width: 600px) {
    .guide-hero {
        padding: 3.5rem 0 2rem;
    }

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

    .guide-hero .subtitle {
        font-size: 0.95rem;
    }

    .step {
        flex-direction: column;
        gap: 0.5rem;
    }

    .step-num {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
    }

    .callout {
        padding: 1.2rem 1rem;
    }

    .requirements {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .guide-footer {
        padding: 2rem 1.2rem;
    }
}
