/* ===== Guides Page Specific Styles ===== */

/* Guide Hero Section */
.guide-hero {
    padding: 8rem 1.5rem 4rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.guide-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.guide-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.guide-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .guide-hero h1 {
        font-size: 4rem;
    }
}

.guide-hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Guide Filters */
.guide-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Guide Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.guide-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.guide-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.guide-card-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
}

.guide-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.guide-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.guide-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.guide-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.guide-card-body {
    padding: 2rem;
}

.guide-card-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.guide-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.topic-tag {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 500;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.guide-link:hover {
    color: var(--primary-color);
    gap: 0.75rem;
}

/* Guide Content Page - Header + Two Column Layout */
.guide-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 1.5rem 4rem;
}

/* Guide Layout - Left/Right Structure */
.guide-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .guide-layout {
        grid-template-columns: minmax(0, 2.5fr) minmax(280px, 1fr);
        gap: 4rem;
    }
}

.guide-main {
    min-width: 0;
}

.guide-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .guide-sidebar {
        display: block;
    }
}

.guide-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.guide-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.guide-breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.guide-breadcrumb a:hover {
    color: var(--primary-color);
}

.guide-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .guide-title {
        font-size: 3.5rem;
    }
}

.guide-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.guide-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.guide-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.guide-info-item svg {
    opacity: 0.7;
}

/* Guide Body Content */
.guide-body {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.guide-body h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.guide-body h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.guide-body h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

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

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

.guide-body li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.guide-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.guide-body code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--primary-light);
    border: 1px solid var(--border-color);
}

.guide-body pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.guide-body pre code {
    background: none;
    padding: 0;
    border: none;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.info-box.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
    border-left-color: #f59e0b;
}

.info-box.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-left-color: #10b981;
}

.info-box-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-box p {
    margin: 0;
    color: var(--text-secondary);
}

/* Example Boxes */
.example-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.example-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table of Contents */
.toc {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 1024px) {
    .toc {
        display: none;
    }
}

.toc h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.toc a:hover {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.toc a.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    font-weight: 600;
}

/* Related Guides - Mobile Version */
.related-guides {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

@media (min-width: 1024px) {
    .related-guides {
        display: none;
    }
}

.related-guides h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.related-card h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.related-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ===== Sidebar Styles ===== */
.sidebar-sticky {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding-bottom: 2rem;
}

/* Sidebar Navigation */
.sidebar-nav {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-nav h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar-nav a:hover {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-nav a.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    font-weight: 600;
}

.sidebar-nav a svg {
    width: 4px;
    height: 4px;
    fill: currentColor;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Sidebar Related Guides */
.sidebar-related {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-related h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-related h3 svg {
    width: 16px;
    height: 16px;
}

.sidebar-guide-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-guide-item:last-child {
    margin-bottom: 0;
}

.sidebar-guide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-guide-item:hover::before {
    opacity: 1;
}

.sidebar-guide-item:hover {
    transform: translateX(3px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.sidebar-guide-item h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    line-height: 1.4;
}

.sidebar-guide-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.sidebar-guide-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.sidebar-guide-badge.beginner {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.sidebar-guide-badge.intermediate {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.sidebar-guide-badge.advanced {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

/* Footer CTA - Centered above footer */
.guide-footer-cta {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.guide-footer-cta h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.guide-footer-cta p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.guide-footer-cta .btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.guide-footer-cta .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Scrollbar Styling for Sidebar */
.sidebar-sticky::-webkit-scrollbar {
    width: 6px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .guide-hero {
        padding: 6rem 1.5rem 3rem;
    }
    
    .guide-hero h1 {
        font-size: 2.5rem;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .guide-content {
        padding: 6rem 1.5rem 3rem;
    }
    
    .guide-title {
        font-size: 2rem;
    }
    
    .guide-body {
        font-size: 1rem;
    }
    
    .guide-body h2 {
        font-size: 1.75rem;
    }
    
    .guide-body h3 {
        font-size: 1.25rem;
    }
}
