/**
 * Article content styles
 * Applied to .article-content container
 * Provides beautiful typography for health articles
 */

/* Base typography */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1f2937;
}

/* Headings */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.article-content p {
    margin-bottom: 1.25rem;
}

/* Links */
.article-content a {
    color: #059669;
    text-decoration: underline;
    text-decoration-color: #d1fae5;
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.article-content a:hover {
    color: #047857;
    text-decoration-color: #059669;
}

/* Affiliate links */
.article-content a.affiliate-link {
    color: #059669;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(to bottom, transparent 50%, #d1fae5 50%);
    padding: 0 2px;
    transition: all 0.2s;
}

.article-content a.affiliate-link:hover {
    background: linear-gradient(to bottom, transparent 0%, #a7f3d0 0%);
}

/* Lists */
.article-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.article-content ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
}

.article-content ul li::before {
    content: "✅";
    position: absolute;
    left: 0;
    top: 0;
}

.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    counter-reset: item;
}

.article-content ol li {
    counter-increment: item;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-content table thead {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.article-content table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.article-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9375rem;
}

.article-content table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.article-content table tbody tr:hover {
    background-color: #ecfdf5;
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid #059669;
    background: #f0fdf4;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: #065f46;
}

/* TL;DR box */
.tldr-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    border-radius: 0 1rem 1rem 0;
    margin: 1.5rem 0;
}

.tldr-box p:first-child {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Code blocks */
.article-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #991b1b;
}

/* Strong/bold */
.article-content strong {
    color: #111827;
    font-weight: 700;
}

/* Horizontal rule */
.article-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

/* Product boxes */
.product-box {
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* FAQ section */
.faq-section details {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-section details summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    background: #f9fafb;
    transition: background 0.2s;
}

.faq-section details summary:hover {
    background: #f3f4f6;
}

.faq-section details[open] summary {
    border-bottom: 1px solid #e5e7eb;
    background: #ecfdf5;
    color: #065f46;
}

.faq-section details div {
    padding: 1rem 1.25rem;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
    }

    .article-content table {
        font-size: 0.875rem;
    }

    .article-content table th,
    .article-content table td {
        padding: 0.5rem 0.75rem;
    }
}
