/**
 * ==================== GUIDE PAGE STYLES ====================
 */

.guide-content {
    background: var(--bg-section);
    padding: var(--space-3xl) 0;
}

.guide-container {
    max-width: 60rem;
    display: grid;
    grid-template-columns: 18.75rem 1fr;
    gap: var(--space-2xl);
    position: relative;
    align-items: start;
}

/* Large screens: increase max-width for better content breathing */
@media (min-width: 1024px) {
    .guide-container {
        max-width: 75rem;
    }
}

@media (min-width: 1440px) {
    .guide-container {
        max-width: 85rem;
    }
}

@media (min-width: 1920px) {
    .guide-container {
        max-width: 100rem;
    }
}

/* Table of Contents */
.guide-toc {
    position: sticky;
    top: 6.25rem;
    align-self: start;
    background: var(--bg-card);
    border: 0.0625rem solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    max-height: calc(100vh - 8.75rem);
    overflow-y: auto;
    margin-bottom: var(--space-2xl);
}

.guide-toc-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: var(--space-sm);
}

.toc-list a {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.375rem 0;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.toc-list a:hover {
    color: var(--primary);
}

/* Article Content */
.guide-article {
    background: var(--bg-card);
    border: 0.0625rem solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
}

.guide-section {
    margin-bottom: var(--space-3xl);
    scroll-margin-top: 6.25rem;
}

.guide-section:last-of-type {
    margin-bottom: 0;
}

.guide-section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    border-left: 0.25rem solid var(--primary);
    padding-left: var(--space-md);
}

.guide-subtitle {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-md);
}

.guide-article p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.guide-list {
    list-style: none;
    padding-left: 0;
    margin: var(--space-md) 0;
}

.guide-list li {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
    position: relative;
}

.guide-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.guide-article code {
    background: var(--bg-section-alt);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Highlight Box */
.guide-highlight {
    background: rgba(var(--primary-rgb), 0.08);
    border-left: 0.25rem solid var(--primary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    margin: var(--space-lg) 0;
}

.guide-highlight p {
    margin: 0;
    color: var(--text-primary);
}

/* Warning Box */
.guide-warning {
    background: rgba(255, 71, 87, 0.08);
    border-left: 0.25rem solid #ff4757;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    margin: var(--space-lg) 0;
}

.guide-warning h4 {
    color: #ff4757;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

/* Steps Box */
.guide-steps {
    background: var(--bg-section-alt);
    border: 0.0625rem solid var(--border-light);
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    margin: var(--space-lg) 0;
}

.steps-title {
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.steps-list {
    margin: 0;
    padding-left: var(--space-lg);
}

.steps-list li {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

/* Bottom CTA — sfondo alt per contrasto con la sezione bianca sopra */
.guide-cta {
    background: var(--bg-section-alt);
    border: 0.0625rem solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    margin-top: var(--space-2xl);
    text-align: center;
    max-width: 60rem;
}

.guide-cta h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.guide-cta p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .guide-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .guide-toc {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .guide-article {
        padding: var(--space-lg);
    }
    
    .guide-section-title {
        font-size: 1.5rem;
    }
    
    .guide-subtitle {
        font-size: 1.25rem;
    }
    
    .guide-article p,
    .guide-list li {
        font-size: 1rem;
    }
}
