/* Guide Chapters Styles */
.guide-page {
    min-height: 100vh;
}

.guide-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Side Navigation */
.guide-nav {
    background: #f8fafc;
    color: #1e293b;
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #ebe6e7;
}

.guide-nav__header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #ebe6e7;
    margin-bottom: 1.5rem;
}

.guide-nav__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.guide-nav__toggle {
    display: none;
    background: none;
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.guide-nav__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin: 3px 0;
    transition: all 0.3s ease;
}

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

.guide-nav__item {
    margin: 0;
}

.guide-nav__link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.guide-nav__link:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-left-color: #3b82f6;
}

.guide-nav__link--active {
    background: #e2e8f0;
    color: #1e293b;
    border-left-color: #3b82f6;
    font-weight: 500;
}

/* Main Content */
.guide-content {
    background: #ffffff;
    padding: 2rem;
    overflow-y: auto;
}


.guide-content__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.guide-content__breadcrumb {
    color: #64748b;
    font-size: 0.875rem;
}

.guide-content__breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

.guide-content__breadcrumb a:hover {
    text-decoration: underline;
}

.guide-content__body {
    line-height: 1.7;
    color: #334155;
}

.guide-content__body h1,
.guide-content__body h2,
.guide-content__body h3,
.guide-content__body h4,
.guide-content__body h5,
.guide-content__body h6 {
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}


.guide-content__body h1 {
    font-size: 2.25rem;
    padding-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.guide-content__body h2 {
    font-size: 1.875rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
}

.guide-content__body h3 {
    font-size: 1.5rem;
}

.guide-content__body h4 {
    font-size: 1.25rem;
}

.guide-content__body p {
    margin-bottom: 1.5rem;
}

.guide-content__body ul,
.guide-content__body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.guide-content__body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.guide-content__body ul {
    list-style-type: disc;
}

.guide-content__body ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

.guide-content__body ol li {
    margin-bottom: 0.75rem;
}

.guide-content__body strong {
    font-weight: 600;
    color: #1e293b;
}

.guide-content__body em {
    font-style: italic;
}

.guide-content__body code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

.guide-content__body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.guide-content__body pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.guide-content__body a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.guide-content__body a:hover {
    text-decoration: underline;
}

/* Chapter Navigation */
.guide-chapter-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.guide-chapter-nav__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.guide-chapter-nav__link {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
    min-height: 60px;
}

.guide-chapter-nav__link:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.guide-chapter-nav__link--prev {
    text-align: left;
}

.guide-chapter-nav__link--next {
    text-align: right;
}

.guide-chapter-nav__arrow {
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
    margin: 0 1rem;
    flex-shrink: 0;
}

.guide-chapter-nav__text {
    flex: 1;
}

.guide-chapter-nav__label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.guide-chapter-nav__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

/* Mobile Chapter Navigation */
@media (max-width: 768px) {
    .guide-chapter-nav__content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .guide-chapter-nav__link {
        padding: 0.75rem;
        min-height: 50px;
    }

    .guide-chapter-nav__arrow {
        font-size: 1.25rem;
        margin: 0 0.75rem;
    }

    .guide-chapter-nav__title {
        font-size: 0.875rem;
    }
}

/* Loading and Error States */
.loading,
.error {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.error {
    color: #dc2626;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .guide-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .guide-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .guide-nav--open {
        left: 0;
    }

    .guide-nav__toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .guide-nav--open .guide-nav__toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .guide-nav--open .guide-nav__toggle span:nth-child(2) {
        opacity: 0;
    }

    .guide-nav--open .guide-nav__toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .guide-content {
        padding: 1rem;
    }

    .guide-content__title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .guide-content {
        padding: 0.75rem;
    }

    .guide-content__title {
        font-size: 1.75rem;
    }

    .guide-content__body h1 {
        font-size: 1.875rem;
    }

    .guide-content__body h2 {
        font-size: 1.5rem;
    }
}


/* Accessibility */
.guide-nav__link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.guide-content__body a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Copy Button for Code Blocks */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #374151;
    color: #f9fafb;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: #4b5563;
}

/* Enhanced Mobile Navigation */
@media (max-width: 768px) {
    .guide-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .guide-nav--open {
        left: 0;
    }

    .guide-nav__toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: auto;
    }

    .guide-nav--open .guide-nav__toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .guide-nav--open .guide-nav__toggle span:nth-child(2) {
        opacity: 0;
    }

    .guide-nav--open .guide-nav__toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Overlay for mobile nav */
    .guide-nav--open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .guide-content {
        padding: 1rem;
    }

    .guide-content__title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .guide-content {
        padding: 0.75rem;
    }

    .guide-content__title {
        font-size: 1.75rem;
    }

    .guide-content__body h1 {
        font-size: 1.875rem;
    }

    .guide-content__body h2 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .guide-nav {
        display: none;
    }

    .guide-container {
        grid-template-columns: 1fr;
    }

    .guide-content {
        padding: 0;
    }

    .copy-button {
        display: none;
    }
}