/* PetNerdHQ Content Engine — Frontend Styles */

/* Table of Contents */
.pnhq-toc {
    background: #F5F0E8;
    border: 1px solid #E8E4DA;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0 32px;
}
.pnhq-toc-title {
    font-size: 18px;
    margin: 0 0 12px;
    color: #1A2E35;
}
.pnhq-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
}
.pnhq-toc li {
    counter-increment: toc-counter;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.pnhq-toc li:last-child { border-bottom: none; }
.pnhq-toc li::before {
    content: counter(toc-counter) ".";
    font-weight: 600;
    color: #0A7B6E;
    margin-right: 8px;
}
.pnhq-toc a {
    color: #1A2E35;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.pnhq-toc a:hover {
    color: #E85D3A;
}

/* Article Images */
.pnhq-article-image {
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
}
.pnhq-article-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}
.pnhq-article-image figcaption {
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 10px 0 0;
    font-style: italic;
}

/* Affiliate Links */
.pnhq-affiliate-link {
    color: #E85D3A;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgba(232, 93, 58, 0.3);
    transition: border-color 0.2s, color 0.2s;
}
.pnhq-affiliate-link:hover {
    color: #0A7B6E;
    border-bottom-color: #0A7B6E;
}
.pnhq-aff-icon {
    font-size: 14px;
}

/* Disclaimer Box */
.pnhq-disclaimer,
p:has(> strong:first-child):has([class*="disclaimer"]) {
    background: #FFF3CD;
    border: 1px solid #FFEEBA;
    border-left: 4px solid #FFD166;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 14px;
    color: #856404;
}

/* Related Articles */
.pnhq-related-articles {
    background: #E1F5EE;
    border: 1px solid #9FE1CB;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 32px 0;
}
.pnhq-related-articles h2 {
    font-size: 18px;
    margin: 0 0 12px;
    color: #0A7B6E;
}
.pnhq-related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pnhq-related-articles li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(10, 123, 110, 0.15);
}
.pnhq-related-articles li:last-child { border-bottom: none; }
.pnhq-related-articles li::before {
    content: "📖 ";
}
.pnhq-related-articles a {
    color: #1A2E35;
    font-weight: 500;
    text-decoration: none;
}
.pnhq-related-articles a:hover { color: #E85D3A; }

/* FAQ Section Styling */
h2:has(+ h3),
h2[id*="faq"] {
    margin-top: 48px;
}

/* Comparison Tables */
table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0;
    font-size: 14px;
}
table th {
    background: #0A7B6E;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}
table td {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}
table tr:nth-child(even) {
    background: #F5F0E8;
}
table tr:hover {
    background: #E1F5EE;
}

/* Quick Facts Box (for breed guides — small 2-column spec tables only) */
table:not(:first-of-type) {
    max-width: 100%;
}
.entry-content table:first-of-type {
    width: 100%;
}
/* Small spec tables (2 columns, used in individual product reviews) */
.entry-content h3 + table,
.entry-content h3 ~ table {
    max-width: 400px;
    border: 2px solid #0A7B6E;
    border-radius: 12px;
    margin: 16px 0 24px;
    font-size: 14px;
}
/* All tables get clean styling */
table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0;
    font-size: 14px;
}

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

/* Internal links */
.pnhq-internal-link {
    color: #0A7B6E;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(10, 123, 110, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}
.pnhq-internal-link:hover {
    text-decoration-color: #0A7B6E;
}

/* Responsive */
@media (max-width: 768px) {
    table:first-of-type {
        float: none;
        width: 100%;
        margin: 16px 0;
    }
    .pnhq-toc { padding: 16px 20px; }
}
