/**
 * SEO Components Styles
 * Table of Contents, Social Share, Related Posts
 */

/* ===== Table of Contents ===== */
.table-of-contents {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    border-radius: 0 12px 12px 0;
    padding: 20px 25px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table-of-contents h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ccc;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
}

.table-of-contents li:last-child {
    border-bottom: none;
}

.table-of-contents a {
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
}

.table-of-contents a:hover {
    color: #667eea;
    padding-left: 10px;
}

.table-of-contents .ms-3 {
    margin-left: 20px;
    font-size: 0.95rem;
}

/* ===== Social Share Buttons ===== */
.social-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px 0;
    margin: 30px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.share-label {
    color: #666;
    font-weight: 500;
    margin-right: 5px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-line { background: #00b900; }
.share-email { background: #ea4335; }
.share-copy { background: #6c757d; }

/* ===== Related Posts ===== */
.related-posts {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.related-posts h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.related-post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #f0f0f0;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: inherit;
    border-color: #667eea;
}

.related-post-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-post-card .no-image {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-post-card .content {
    padding: 0;
    flex: 1;
    min-width: 0;
}

.related-post-card .title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-size: 0.9rem;
}

.related-post-card .meta {
    font-size: 0.75rem;
    color: #888;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-post-card img,
    .related-post-card .no-image {
        width: 60px;
        height: 60px;
    }
}

/* ===== FAQ Section ===== */
.faq-section {
    margin: 40px 0;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    transition: all 0.3s;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .social-share-buttons {
        justify-content: center;
    }
    
    .share-label {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .table-of-contents {
        padding: 15px 20px;
    }
}
