/* Blog Detail Page Styles */

/* Progress Indicator */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 100%);
    z-index: 9999;
    transition: width 0.2s ease;
}

/* Article Layout with Sidebar */
.article-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Article Outline Sidebar */
.article-outline {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.outline-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafaf9 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.outline-title {
    font-size: 18px;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.outline-title i {
    color: #10b981;
}

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

.outline-item {
    margin-bottom: 12px;
}

.outline-link {
    display: block;
    padding: 8px 16px;
    color: #57534e;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.outline-link:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
    border-left-color: #10b981;
    transform: translateX(4px);
}

.outline-link.active {
    color: #10b981;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.08);
    border-left-color: #10b981;
}

.outline-link.level-3 {
    padding-left: 32px;
    font-size: 13px;
}

/* Reading Time Card */
.reading-info-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.reading-info-title {
    font-size: 14px;
    color: #78716c;
    margin-bottom: 8px;
}

.reading-time {
    font-size: 20px;
    font-weight: 700;
    color: #f59e0b;
}

.reading-percent {
    font-size: 14px;
    color: #57534e;
    margin-top: 8px;
}

/* Recommended Articles Section */
.recommended-section {
    margin-top: 80px;
    padding: 60px 0;
    background: linear-gradient(135deg, #fafaf9 0%, #ffffff 100%);
    border-radius: 24px;
}

.recommended-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.recommended-header {
    text-align: center;
    margin-bottom: 48px;
}

.recommended-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.recommended-subtitle {
    font-size: 18px;
    color: #78716c;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.recommended-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.recommended-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.recommended-card-image {
    height: 200px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover !important;
    background-position: center !important;
}

.recommended-card-image::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.recommended-card-image i {
    font-size: 48px;
    color: white;
    z-index: 1;
}

.recommended-card-content {
    padding: 24px;
}

.recommended-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

.recommended-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 12px;
    line-height: 1.4;
}

.recommended-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recommended-card-title a:hover {
    color: #10b981;
}

.recommended-card-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #78716c;
}

.recommended-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }
    
    .article-outline {
        display: none;
    }
    
    /* Mobile Outline Toggle */
    .mobile-outline-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, #10b981, #f59e0b);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
        z-index: 1000;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-outline-toggle:hover {
        transform: scale(1.1);
    }
    
    .mobile-outline-toggle i {
        color: white;
        font-size: 24px;
    }
    
    /* Mobile Outline Drawer */
    .mobile-outline-drawer {
        position: fixed;
        right: -100%;
        top: 0;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: white;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        padding: 24px;
    }
    
    .mobile-outline-drawer.active {
        right: 0;
    }
    
    .mobile-outline-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 50%;
        cursor: pointer;
    }
}

@media (min-width: 1025px) {
    .mobile-outline-toggle,
    .mobile-outline-drawer {
        display: none;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.5) rotate(180deg);
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Scroll Margin for Headers */
h2[id], h3[id] {
    scroll-margin-top: 100px;
}