/**
 * Trends Publisher - Structure Elements Styles
 * 
 * Styles for TOC, FAQ, Key Takeaways, and Related Posts
 * 
 * @package Trends_Publisher
 * @since 3.0.0
 */

/* ========================================
   Table of Contents
   ======================================== */

.tp-table-of-contents {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.tp-toc-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #333;
    font-weight: 600;
}

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

.tp-toc-list li {
    margin: 8px 0;
}

.tp-toc-h2 {
    font-weight: 600;
}

.tp-toc-h3 {
    padding-left: 20px;
    font-weight: 400;
}

.tp-toc-list a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tp-toc-list a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tp-table-of-contents {
        background: #1a1a1a;
        border-left-color: #4a9eff;
    }
    
    .tp-toc-title {
        color: #e0e0e0;
    }
    
    .tp-toc-list a {
        color: #4a9eff;
    }
    
    .tp-toc-list a:hover {
        color: #7ab8ff;
    }
}

/* ========================================
   Key Takeaways
   ======================================== */

.tp-key-takeaways {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tp-takeaways-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
}

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

.tp-takeaways-list li {
    position: relative;
    padding-left: 30px;
    margin: 12px 0;
    line-height: 1.6;
}

.tp-takeaways-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    font-size: 1.2em;
    color: #ffd700;
}

/* ========================================
   FAQ Section
   ======================================== */

.tp-faq-section {
    margin: 40px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tp-faq-title {
    margin: 0 0 25px 0;
    font-size: 1.8em;
    color: #333;
    font-weight: 700;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
}

.tp-faq-item {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tp-faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tp-faq-question {
    margin: 0 0 12px 0;
    font-size: 1.2em;
    color: #007bff;
    font-weight: 600;
}

.tp-faq-answer {
    margin: 0;
    color: #555;
    line-height: 1.7;
}

.tp-faq-answer p {
    margin: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tp-faq-section {
        background: #1a1a1a;
    }
    
    .tp-faq-title {
        color: #e0e0e0;
        border-bottom-color: #4a9eff;
    }
    
    .tp-faq-item {
        background: #2a2a2a;
    }
    
    .tp-faq-question {
        color: #4a9eff;
    }
    
    .tp-faq-answer {
        color: #b0b0b0;
    }
}

/* ========================================
   Related Posts
   ======================================== */

.tp-related-posts {
    margin: 50px 0 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.tp-related-title {
    margin: 0 0 25px 0;
    font-size: 1.6em;
    color: #333;
    font-weight: 700;
}

.tp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tp-related-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tp-related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tp-related-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.tp-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tp-related-item:hover .tp-related-thumbnail img {
    transform: scale(1.1);
}

.tp-related-content {
    padding: 20px;
}

.tp-related-post-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.4;
}

.tp-related-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tp-related-post-title a:hover {
    color: #007bff;
}

.tp-related-excerpt {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tp-related-posts {
        background: #1a1a1a;
    }
    
    .tp-related-title {
        color: #e0e0e0;
    }
    
    .tp-related-item {
        background: #2a2a2a;
    }
    
    .tp-related-post-title a {
        color: #e0e0e0;
    }
    
    .tp-related-post-title a:hover {
        color: #4a9eff;
    }
    
    .tp-related-excerpt {
        color: #b0b0b0;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .tp-table-of-contents,
    .tp-key-takeaways,
    .tp-faq-section,
    .tp-related-posts {
        padding: 20px;
        margin: 20px 0;
    }
    
    .tp-related-grid {
        grid-template-columns: 1fr;
    }
    
    .tp-toc-h3 {
        padding-left: 15px;
    }
}

@media (max-width: 480px) {
    .tp-table-of-contents,
    .tp-key-takeaways,
    .tp-faq-section,
    .tp-related-posts {
        padding: 15px;
        margin: 15px 0;
    }
    
    .tp-toc-title,
    .tp-takeaways-title {
        font-size: 1.1em;
    }
    
    .tp-faq-title,
    .tp-related-title {
        font-size: 1.4em;
    }
}
