/**
 * Frontend styles for SEO Content Generator
 * Add this to your theme or via Customizer > Additional CSS
 */

/* Table of Contents */
.scg-toc {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #2271b1;
}

.scg-toc h2 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #1e3a5f;
}

.scg-toc-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.scg-toc-list li {
    margin-bottom: 8px;
    position: relative;
}

.scg-toc-list li::before {
    content: "→";
    position: absolute;
    left: -20px;
    color: #2271b1;
}

.scg-toc-list li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.scg-toc-list li a:hover {
    color: #2271b1;
}

.scg-toc-list .toc-level-3 {
    margin-left: 20px;
}

/* Main Content */
.scg-content {
    line-height: 1.8;
    color: #333;
}

.scg-content h2 {
    color: #1e3a5f;
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.scg-content h3 {
    color: #2271b1;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.scg-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.scg-content ul,
.scg-content ol {
    margin: 15px 0 15px 25px;
}

.scg-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Tables */
.scg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 14px;
}

.scg-content table th,
.scg-content table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.scg-content table th {
    background: #2271b1;
    color: #fff;
    font-weight: 600;
}

.scg-content table tr:nth-child(even) {
    background: #f8f9fa;
}

.scg-content table tr:hover {
    background: #e9ecef;
}

/* Highlight boxes */
.scg-content .highlight-box,
.scg-content .info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #2196f3;
}

.scg-content .highlight-box strong,
.scg-content .info-box strong {
    color: #1565c0;
}

.scg-content .warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #ff9800;
}

.scg-content .tip-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #4caf50;
}

/* FAQ Section */
.scg-content .faq-section h3 {
    color: #1e3a5f;
    font-size: 18px;
    margin-top: 20px;
    padding: 10px 0;
    border-bottom: 1px dashed #ccc;
}

/* Featured Image */
.scg-featured-image {
    margin-bottom: 25px;
    text-align: center;
}

.scg-featured-image img {
    max-width: 90%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

/* Content Images */
.scg-content-image {
    margin: 25px 0;
    text-align: center;
}

.scg-content-image img {
    max-width: 90%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

/* General content images */
.scg-content img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 8px;
}

/* Sources */
.scg-sources {
    margin-top: 40px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .scg-toc {
        padding: 15px;
    }
    
    .scg-content h2 {
        font-size: 20px;
    }
    
    .scg-content h3 {
        font-size: 18px;
    }
    
    .scg-content table {
        font-size: 12px;
    }
    
    .scg-content table th,
    .scg-content table td {
        padding: 8px 10px;
    }
}

/* Print styles */
@media print {
    .scg-toc {
        page-break-after: avoid;
    }
    
    .scg-content h2,
    .scg-content h3 {
        page-break-after: avoid;
    }
    
    .scg-sources {
        page-break-before: always;
    }
}

/* Related Posts - Bài viết liên quan */
.scg-related-post {
    background: #f0f7ff;
    border-left: 4px solid #2271b1;
    padding: 10px 16px;
    margin: 18px 0;
    border-radius: 0 6px 6px 0;
    font-size: 15px;
    line-height: 1.6;
}

.scg-related-post .scg-related-label {
    font-weight: 700;
    color: #1a5a96;
}

.scg-related-post a {
    color: #1a5a96;
    text-decoration: underline;
    font-weight: 600;
}

.scg-related-post a:hover {
    color: #0d3d66;
    text-decoration: none;
}

@media (max-width: 600px) {
    .scg-related-post {
        font-size: 14px;
        padding: 8px 12px;
    }
}
