/* ========== BLOG & ARTICLE STYLES ========== */

/* ---------- Blog Hero ---------- */
.blog-hero {
    padding: 140px 2rem 3rem;
    background: #faf6f0;
    text-align: center;
}

.blog-eyebrow {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    color: #8a7f6b;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.blog-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #9a7b3f;
    margin-bottom: 1rem;
}

.blog-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    color: #8a7f6b;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- Blog Grid ---------- */
.blog-grid-section {
    background: #f3ede4;
    padding: 3rem 2rem 5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.blog-card {
    background: #ffffff;
    border: 1px solid rgba(154,123,63,0.1);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.blog-card-featured {
    border-color: rgba(212,168,67,0.15);
    background: rgba(212,168,67,0.03);
}

.blog-card:hover {
    border-color: rgba(212,168,67,0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(212,168,67,0.08);
}

.blog-card-icon {
    color: #9a7b3f;
    opacity: 0.5;
    margin-bottom: 1.25rem;
}

.blog-card:hover .blog-card-icon {
    opacity: 0.8;
}

.blog-card-tag {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9a7b3f;
    background: rgba(212,168,67,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.blog-card h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    color: #2c2416;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.blog-card p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #8a7f6b;
    flex: 1;
}

.blog-card-cta {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    color: #9a7b3f;
    margin-top: 1.25rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-cta {
    opacity: 1;
}

/* ---------- Article Page ---------- */
.article-hero {
    padding: 140px 2rem 2rem;
    background: #faf6f0;
    text-align: center;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8a7f6b;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.article-back:hover {
    color: #9a7b3f;
}

.article-tag {
    display: inline-block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9a7b3f;
    background: rgba(212,168,67,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.article-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    color: #9a7b3f;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    color: #8a7f6b;
}

/* ---------- Article Body ---------- */
.article-body {
    background: #faf6f0;
    padding: 2rem 2rem 5rem;
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
}

.article-content h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.3rem;
    color: #9a7b3f;
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.05rem;
    color: #2c2416;
    margin: 2rem 0 0.75rem;
}

.article-content p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    line-height: 1.85;
    color: #5c4f3a;
    margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    line-height: 1.8;
    color: #8a7f6b;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: #3a3020;
}

.article-content a:not(.btn) {
    color: #9a7b3f;
    text-decoration: none;
    border-bottom: 1px dotted rgba(212,168,67,0.4);
    transition: opacity 0.3s ease;
}

.article-content a:hover {
    opacity: 0.8;
}

/* Key Takeaway Box */
.article-takeaway {
    background: rgba(212,168,67,0.05);
    border: 1px solid rgba(212,168,67,0.15);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.article-takeaway h4 {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.95rem;
    color: #9a7b3f;
    margin-bottom: 0.75rem;
}

.article-takeaway p, .article-takeaway ul {
    font-size: 0.85rem;
    color: #8a7f6b;
}

/* Sources Section */
.article-sources {
    border-top: 1px solid rgba(154,123,63,0.1);
    margin-top: 3rem;
    padding-top: 2rem;
}

.article-sources h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    color: #5c4f3a;
    margin-bottom: 1rem;
}

.article-sources ol {
    font-size: 0.78rem;
    color: #8a7f6b;
    line-height: 1.8;
}

.article-sources a {
    color: #9a7b3f;
    opacity: 0.6;
    font-size: 0.75rem;
}

/* Disclaimer */
.article-disclaimer {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.72rem;
    color: #8a7f6b;
    font-style: italic;
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(154,123,63,0.08);
}

/* ---------- Related Products (homepage card style) ---------- */
.related-heading {
    text-align: center !important;
}

.related-products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 1.5rem 0 2rem;
    /* Break out of article-content max-width */
    width: 100vw;
    max-width: 1100px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.related-products-grid .product-card {
    width: calc(25% - 18px);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    overflow: visible !important;
}

.related-products-grid .product-image {
    height: 240px;
}

.related-products-grid .product-info {
    padding: 20px 20px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-products-grid .product-info .btn-secondary {
    margin-top: auto;
    border-bottom: 2px solid var(--gold, #9a7b3f) !important;
    box-shadow: 0 1px 0 0 #9a7b3f;
}

@media (max-width: 768px) {
    .related-products-grid {
        gap: 12px;
        width: calc(100% + 2rem);
        margin-left: -1rem;
        transform: none;
        padding: 0 1rem;
    }
    .related-products-grid .product-card {
        width: calc(50% - 6px);
        min-width: unset;
    }
    .related-products-grid .product-image {
        height: 180px;
    }
    .related-products-grid .product-info {
        padding: 12px;
    }
    .related-products-grid .product-name {
        font-size: 0.85rem;
    }
    .related-products-grid .product-desc {
        font-size: 0.7rem;
    }
    .related-products-grid .product-price {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    .related-products-grid .btn-secondary {
        padding: 8px 16px;
        font-size: 0.65rem;
        white-space: nowrap;
    }
}

/* ---------- Mechanism Visual ---------- */
.mechanism-visual {
    background: rgba(212,168,67,0.04);
    border: 1px solid rgba(212,168,67,0.12);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.mechanism-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
    color: #9a7b3f;
    text-align: center;
    margin-bottom: 1.25rem;
}

.mechanism-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mechanism-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 140px;
}

.mechanism-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212,168,67,0.15);
    border: 1px solid rgba(212,168,67,0.3);
    color: #9a7b3f;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.mechanism-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.72rem;
    color: #8a7f6b;
    line-height: 1.4;
}

.mechanism-arrow {
    color: rgba(212,168,67,0.3);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* ---------- Research Applications ---------- */
.research-applications {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.application-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(154,123,63,0.1);
    border-radius: 8px;
}

.application-card svg {
    color: #9a7b3f;
    opacity: 0.6;
    flex-shrink: 0;
}

.application-card span {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    color: #8a7f6b;
}

/* ---------- Community Box ---------- */
.community-box {
    background: #f8f4ed;
    border-left: 3px solid rgba(212,168,67,0.3);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.community-box h4 {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
    color: #3a3020;
    margin-bottom: 0.5rem;
}

.community-box p {
    font-size: 0.85rem;
    color: #8a7f6b;
    margin-bottom: 0;
}

/* ---------- Comparison Table ---------- */
.comparison-table {
    border: 1px solid rgba(154,123,63,0.12);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0 2rem;
}

.comparison-header {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    background: rgba(212,168,67,0.08);
    padding: 0.75rem 1rem;
}

.comparison-header span {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.8rem;
    color: #9a7b3f;
    text-align: center;
}

.comparison-header span:first-child {
    text-align: left;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(154,123,63,0.08);
}

.comparison-row:nth-child(even) {
    background: #f8f4ed;
}

.comparison-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    color: #5c4f3a;
    font-weight: 500;
}

.comparison-row span {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    color: #8a7f6b;
    text-align: center;
}

.comparison-row span:first-child {
    text-align: left;
}

/* ---------- Mobile overrides for guide articles ---------- */
@media (max-width: 768px) {
    .mechanism-flow {
        flex-direction: column;
        gap: 0.25rem;
    }
    .mechanism-arrow {
        transform: rotate(90deg);
        margin-bottom: 0;
    }
    .mechanism-step {
        max-width: 200px;
    }
    .research-applications {
        grid-template-columns: 1fr;
    }
    .comparison-header,
    .comparison-row {
        grid-template-columns: 1.4fr repeat(3, 1fr);
        font-size: 0.7rem;
    }
    .comparison-header span,
    .comparison-row span {
        font-size: 0.68rem;
    }
}

/* ---------- Glossary Tooltips ---------- */
.glossary-term {
    color: #9a7b3f;
    border-bottom: 1px dotted rgba(212,168,67,0.4);
    cursor: help;
    position: relative;
    transition: border-color 0.3s ease;
}

.glossary-term:hover {
    border-color: #9a7b3f;
}

.glossary-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #f3ede4;
    border: 1px solid rgba(212,168,67,0.3);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    width: 280px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.glossary-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}

.glossary-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(212,168,67,0.3);
}

.glossary-tooltip-term {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.8rem;
    color: #9a7b3f;
    margin-bottom: 0.4rem;
    display: block;
}

.glossary-tooltip-def {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    line-height: 1.6;
    color: #5c4f3a;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .blog-hero {
        padding: 110px 1.25rem 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .blog-card {
        padding: 1.5rem 1.25rem;
    }

    .article-hero {
        padding: 110px 1.25rem 1.5rem;
    }

    .article-body {
        padding: 1.5rem 1.25rem 4rem;
    }

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

    .article-takeaway {
        padding: 1.25rem;
    }
}
