/* =========================================
   BLOG ARTICLE LAYOUT (Right Sidebar)
========================================= */

#mmpc-resource-article {
    background-color: #fcfdfd; 
}

/* --- HERO SECTION --- */
.mmpc-article-hero {
    height: 500px; 
    background-color: #ecf4f7; 
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    padding-bottom: 6rem; 
    box-sizing: border-box;
}

.mmpc-article-hero .l-content-container {
    width: 100%;
}

/* --- BREADCRUMBS (Ported from Pest Library) --- */
.pest-breadcrumbs-wrap { 
    width: 100%; 
    margin-bottom: 20px; 
    text-align: center;
}

.breadcrumb_last {
    display: none;
}

.pest-breadcrumbs { 
    display: inline-flex; 
    align-items: center; 
    flex-wrap: wrap; 
    background-color: #ffffff; 
    padding: 10px 14px 11px; 
    border-radius: 50px; 
    margin: 0 auto; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    font-weight: 600; 
}

.pest-breadcrumbs a { 
    color: rgba(24, 67, 67, 0.6); 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    transition: color 0.2s ease-in-out; 
}

.pest-breadcrumbs a:hover { 
    color: #184343; 
}

.pest-breadcrumbs a::after { 
    content: ""; 
    display: inline-block; 
    width: 4px; 
    height: 4px; 
    border-right: 1.5px solid rgba(24, 67, 67, 0.4); 
    border-top: 1.5px solid rgba(24, 67, 67, 0.4); 
    transform: rotate(45deg); 
    margin: 0 10px 0 8px; 
}

.pest-breadcrumbs span { 
    color: #184343; 
    font-weight: 700; 
}

.mmpc-hero-text-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.mmpc-article-hero .pest-hero-headline {
    margin-bottom: 1.5rem;
}

.mmpc-article-meta {
    font-size: 1rem;
    color: #184343;
    font-weight: 500;
    text-align: center;
    margin-bottom: 0; 
}

.mmpc-article-meta a {
    color: #184343;
    transition: color 0.2s ease;
}

.mmpc-article-meta .meta-divider {
    margin: 0 10px;
    color: #6899ae;
}

/* --- FEATURED IMAGE --- */
.mmpc-article-featured-image {
    width: 100%;
    margin-bottom: 2.5rem; 
}

.mmpc-article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 0; 
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* --- GRID LAYOUT (Main Content + Sidebar) --- */
.mmpc-article-layout-section {
    padding-top: 0;
    margin-top: -6rem; 
    position: relative;
    z-index: 2; 
}

.mmpc-article-grid {
    display: flex;
    align-items: stretch; 
    gap: 80px; 
    position: relative;
    max-width: 1200px; 
    margin: 0 auto; 
}

.mmpc-article-body {
    flex: 1;
    min-width: 0; 
    max-width: 800px; 
}

.mmpc-article-body > h2 {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf4f7;
}

.mmpc-article-body > h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* --- THE STICKY TOC SIDEBAR --- */
.mmpc-article-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.mmpc-sticky-sidebar-inner {
    position: sticky;
    top: 120px; 
    margin-bottom: 2rem;
}

.mmpc-toc-widget {
    background-color: #6899ae; 
    display: flex;
    flex-direction: column;
}

.mmpc-toc-header {
    padding: 30px 0 10px;
    border-bottom: none;
    margin: 0 30px; 
}

.mmpc-toc-header h3 {
    color: #ffffff;
    font-size: 1.875rem;
    font-weight: 300;
    margin: 0;
    text-align: left !important; 
    width: 100%; 
    display: block; 
}

.mmpc-toc-arrow {
    display: none; 
}

.mmpc-toc-list {
    list-style: none;
    padding: 0 30px 30px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.mmpc-toc-list li a {
    color: #ffffff; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px;
    letter-spacing: 1px;
	line-height: normal;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0; 
    transition: color 0.2s ease; 
}

.mmpc-toc-list li a:hover {
    color: #53dc31; 
}

.mmpc-toc-list li a::before {
    content: "→"; 
    color: inherit;
}

.mmpc-toc-ctas {
    background-color: #116580;
    padding: 20px 30px; 
    display: flex;
    flex-direction: column;
    position: relative;
}

.mmpc-toc-cta-link {
    color: #ffffff; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 1px;
	line-height: normal;
    text-transform: uppercase;
    text-decoration: none;
    display: block;
    padding: 8px 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.mmpc-toc-cta-link:hover {
    color: #53dc31;
}

.mmpc-toc-icon {
    position: absolute;
    top: 50%; /* Pushes the top of the icon to the exact middle of the box */
    transform: translateY(-50%); /* Pulls it up by half its own height to perfectly center it */
    right: 30px; 
    width: 80px;  
    height: 80px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.mmpc-toc-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mmpc-toc-icon svg {
    width: 20px;
    height: 20px;
}

/* --- RELATED ARTICLES SILO --- */
.mmpc-related-articles-section {
    background-color: #ecf4f7;
    margin-top: 4rem;
}

.mmpc-related-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

.mmpc-related-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mmpc-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.mmpc-related-img-wrapper img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.mmpc-related-title {
    color: #184343;
    font-size: 1.125rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.mmpc-related-date {
    font-size: 0.85rem;
    color: #6899ae;
    font-weight: 600;
}

/* =========================================
   MOBILE RESPONSIVE FOLDS
========================================= */
@media (max-width: 992px) {
    .mmpc-article-grid {
        flex-direction: column; 
        gap: 40px;
    }

    .mmpc-article-body {
        max-width: 100%;
        order: 2; 
    }

    .mmpc-article-sidebar {
        width: 100%;
        order: 1; 
    }

    .mmpc-sticky-sidebar-inner {
        position: relative;
        top: 0;
        margin-bottom: 0;
    }

    /* FIX: Deleted the duplicate/incorrect .mmpc-toc-header blocks from here */

    .mmpc-toc-arrow {
        display: block;
        transform: rotate(45deg);
        transition: transform 0.3s ease;
    }

    .mmpc-toc-header.is-open .mmpc-toc-arrow {
        transform: rotate(-135deg);
        margin-top: 10px;
    }

    .mmpc-toc-list {
        display: none; 
        padding: 0 20px 20px;
    }

    .mmpc-toc-list.is-open {
        display: flex;
    }

    .mmpc-toc-ctas {
        display: none; 
    }
}

@media (max-width: 768px) {
    .mmpc-article-meta {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .mmpc-article-meta .meta-divider {
        display: none;
    }

    .mmpc-related-grid {
        grid-template-columns: 1fr !important;
    }
}