/* ============================================================
   GUIDES.CSS — MIRA Division Guide Pages
   Clean, centralized, readable text styling.
   Works with MIRA's global cyberpunk dark theme.
   ============================================================ */

.guide-page {
    display: flex;
    justify-content: center;
    padding: 80px 20px 60px;
}

.guide-content {
    max-width: 800px;            /* keeps whole content centered */
    width: 100%;
    margin: 0 auto;              /* center the content block */
    text-align: left;            /* left-align text for readability */
    color: var(--white);
}

.guide-content > section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(41, 224, 255, 0.06);
    padding: 1.5rem 2rem;
    margin: 2rem auto;
    max-width: 750px;
    transition: border-color 0.3s;
}

.guide-content > section:hover {
    border-color: rgba(41, 224, 255, 0.15);
}

.guide-content h1,
.guide-content h2,
.guide-content h3,
.guide-content h4 {
    text-align: center;
}

.guide-content h1 {
    font-family: var(--font-display);
    color: var(--cyan);
    text-shadow: var(--cyan-glow);
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.guide-content h2 {
    font-family: var(--font-display);
    color: var(--orange);
    text-shadow: var(--orange-glow);
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin: 2.5rem 0 1rem;
    text-transform: uppercase;
}

/* ⬇️ THIS IS THE KEY PART ⬇️ */
.guide-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    text-align: left;

    /* Keep paragraphs readable width */
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Inline strong text */
.guide-content strong {
    color: var(--white);
    font-weight: 700;
}

/* Notes block (special styling) */
.notes {
    background: rgba(41, 224, 255, 0.03);
    border: 1px solid rgba(41, 224, 255, 0.15);
    clip-path: var(--notch-lg);
    padding: 1.5rem 2rem;
    margin: 2rem auto;
    max-width: 700px;            /* also restrict the notes box */
    text-align: left;
}

.notes p {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

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

.notes strong {
    color: var(--orange);
    text-shadow: var(--orange-glow);
}

/* ── Guide Images ── */
.guide-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem auto;
    max-width: 100%;
}

.guide-image-wrapper img {
    max-width: 100%;
    height: auto;
    clip-path: var(--notch-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    object-fit: contain;
}

/* Credit line */
.credit {
    font-size: 0.9rem;
    margin-top: 1rem;
    color: var(--orange);
    text-shadow: var(--orange-glow);
}

/* ── Guide Layout: TOC Sidebar + Content ── */
.guide-layout {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.guide-toc {
    position: fixed;
    left: max(16px, calc(max(0px, (100vw - 800px) / 2) - 220px - 3rem));
    top: 90px;
    width: 220px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(41, 224, 255, 0.1);
    clip-path: var(--notch-lg);
    padding: 1.25rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.guide-toc h3 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(41, 224, 255, 0.1);
}

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

.guide-toc li {
    margin-bottom: 0.4rem;
}

.guide-toc li a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.4;
    display: block;
    padding: 4px 8px;
    clip-path: var(--notch-sm);
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.guide-toc li a:hover {
    color: var(--white);
    background: rgba(41, 224, 255, 0.06);
    border-left-color: var(--cyan);
}

/* Responsive: stack TOC on small screens */
@media (max-width: 1100px) {
    .guide-toc {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 1.5rem;
    }
}

/* Ensure footer stays at bottom if page is short */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .guide-content {
        padding: 0 10px;
    }
    .guide-content h1 {
        font-size: 2rem;
    }
    .guide-content h2 {
        font-size: 1.3rem;
    }
    .guide-content p {
        max-width: 100%;          /* on very small screens, allow full width */
    }
    .notes {
        padding: 1.2rem 1.5rem;
        max-width: 100%;
    }
}

/* ══════════════════════════════════════
   SUBSECTIONS & LINKS (Guide pages)
══════════════════════════════════════ */
.guide-content h3.subsection-heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(41, 224, 255, 0.3);
    margin: 1.5rem 0 0.6rem;
    border-bottom: 1px solid rgba(41, 224, 255, 0.1);
    padding-bottom: 0.3rem;
    text-align: left;
}

.subsection-block {
    margin-left: 1rem;
    padding-left: 0.8rem;
    border-left: 2px solid rgba(41, 224, 255, 0.15);
    margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════
   PLAYLIST (published guides)
══════════════════════════════════════ */
.playlist-block {
    margin: 1rem 0;
    padding: 0.5rem 0;
}

.playlist-ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0;
}

.playlist-ol li {
    margin-bottom: 0.15rem;
    list-style: decimal;
}

.playlist-scenario-badge {
    display: inline-block;
    padding: 4px 14px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    clip-path: var(--notch-sm);
}

a.playlist-scenario-link {
    text-decoration: none !important;
    border-bottom: 1px solid currentColor;
}

a.playlist-scenario-link:hover {
    opacity: 0.85;
}

.playlist-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--gray-dim);
    margin-left: 8px;
}

.playlist-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray-dim);
    padding-left: 1.8rem;
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.guide-content a.guide-link,
.guide-content a[href^="http"]:not(.header-logo):not(.lang-btn):not(.footer a) {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.guide-content a.guide-link:hover,
.guide-content a[href^="http"]:not(.header-logo):not(.lang-btn):not(.footer a):hover {
    color: var(--orange);
}

/* ══════════════════════════════════════
   PLAYLIST VIEWER SWITCHER
══════════════════════════════════════ */
.playlist-viewer-switcher {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(41,224,255,0.12);
    clip-path: var(--notch-md);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pv-tab {
    flex: 1;
    padding: 8px 24px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    clip-path: var(--notch-sm);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pv-tab.active,
.pv-tab:hover {
    background: rgba(41,224,255,0.12);
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(41,224,255,0.15);
}

.pv-panel {
    display: none;
}

.pv-panel.active {
    display: block;
}

section.playlist-section {
    border: 1px solid rgba(41,224,255,0.12) !important;
}

.pv-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 3px;
}
