/**
 * Final Wonder Lists - Frontend Styles
 * Designed to complement Hueman theme
 * Similar to Listverse but enhanced for UX
 */

/* List Container */
.fw-list-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

/* Introduction */
.fw-list-intro {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Table of Contents */
.fw-toc {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 35px;
}

.fw-toc h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.fw-toc ol {
    margin: 0;
    padding-left: 25px;
    columns: 2;
    column-gap: 30px;
}

.fw-toc li {
    margin-bottom: 8px;
    break-inside: avoid;
}

.fw-toc a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fw-toc a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Single column for mobile */
@media (max-width: 600px) {
    .fw-toc ol {
        columns: 1;
    }
}

/* List Item */
.fw-list-item {
    margin-bottom: 45px;
    padding-bottom: 35px;
    border-bottom: 1px solid #eee;
}

.fw-list-item:last-child {
    border-bottom: none;
}

.fw-list-item h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

/* Item Image */
.fw-item-image {
    margin-bottom: 20px;
}

.fw-item-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fw-image-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Item Content */
.fw-item-content {
    margin-bottom: 20px;
}

.fw-item-content p {
    margin-bottom: 15px;
}

/* Key Facts Box */
.fw-key-facts {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-left: 4px solid #2563eb;
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
    margin-top: 20px;
}

.fw-key-facts strong {
    display: block;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fw-key-facts ul {
    margin: 0;
    padding-left: 20px;
}

.fw-key-facts li {
    margin-bottom: 6px;
    color: #444;
    font-size: 15px;
}

/* Sources Section */
.fw-sources {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    margin-top: 40px;
}

.fw-sources h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.fw-sources ul {
    margin: 0;
    padding-left: 20px;
}

.fw-sources li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.fw-sources a {
    color: #2563eb;
    text-decoration: none;
}

.fw-sources a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .fw-list-content {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .fw-list-item h2 {
        font-size: 22px;
    }
    
    .fw-list-intro {
        font-size: 16px;
    }
    
    .fw-key-facts {
        padding: 12px 15px;
    }
}

/* Print Styles */
@media print {
    .fw-toc {
        display: none;
    }
    
    .fw-list-item {
        break-inside: avoid;
    }
    
    .fw-sources {
        break-before: page;
    }
}

/* Smooth scroll for TOC links */
html {
    scroll-behavior: smooth;
}

/* Highlight target item */
.fw-list-item:target {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% { background-color: #fffbeb; }
    100% { background-color: transparent; }
}
