
/*BLOGS*/

/*---------------------------------------*/

/*Blog Index Page*/

#cards {grid-template-columns: repeat(auto-fit, 350px); grid-auto-rows: auto; grid-gap: 40px 30px; gap: 40px 30px; margin: 40px auto 80px auto; justify-content: center;}
#cards img {object-fit: cover; width: 700px; height: 280px; width: 100%; display: block; border-radius: 4px 4px 0 0; transition: .2s;}
#cards article {position: relative; display: inline-block; border-radius: 6px; box-sizing: border-box; transition: .2s; border: 2px solid transparent; background-color: #EAEAEA;}
#cards a {color: #333; text-decoration: none;} .cardtext {padding: 25px 30px 25px 30px;}
.cardtext h3 {font-size: 24px; line-height: 1.3; font-weight: 600; color: #0063B1;}

#cards article:hover {border: 2px solid #0063B1; background-color: #F2F2F2;}
#cards a:hover img {-webkit-filter: brightness(105%) saturate(110%);}
#cards a:hover h3 {color: #C12F15}

.cardtext div:nth-child(2) {text-align: left; margin-top: 20px; font-size: 16px; line-height: 1.6;} /*details*/

@media (max-width: 1370px) {
#cards {grid-template-columns: repeat(auto-fit, 280px); grid-gap: 35px 25px; gap: 35px 25px; margin: 40px auto 30px auto;}
.cardtext {padding: 25px;} #cards img {height: 230px;}
}
@media (max-width: 1125px) {
#cards {grid-template-columns: repeat(auto-fit, 240px); grid-gap: 30px 20px; gap: 30px 20px;} .cardtext h3 {font-size: 22px;}
.cardtext {padding: 20px;} #cards img {height: 200px;}
}
@media (max-width: 980px) {#cards {grid-template-columns: repeat(auto-fit, 300px); grid-gap: 30px 20px; gap: 30px 20px;}}
@media (max-width: 810px) {#cards {grid-template-columns: repeat(auto-fit, 240px); grid-gap: 25px 20px; gap: 25px 20px;}}
@media (min-width: 661px) {#cards {display: grid;}}
@media (max-width: 660px) {
#cards {display: table; width: 98%; max-width: 450px;}
#cards article {width: 100%; transition: .1s;} #cards article:not(article:last-child) {margin-bottom: 30px;}
#cards a {margin: 0; width: 100%;} .cardtext {padding: 15px;} #cards img {height: 45vw; max-height: 200px;}
}
@media (max-width: 500px) {
.cardtext div:nth-child(2) {visibility: hidden; line-height: 0; height: 0; margin: 0; padding: 0;} .cardtext h3 {padding: 5px 10px;}
}

/* ========================================
   BLOG POST STYLES - ISOLATED & SCOPED
   ========================================
   All styles scoped to .blog-post to prevent conflicts
   with existing site CSS files
   ======================================== */

/* Reset box-sizing only for blog posts */
.blog-post * { 
    box-sizing: border-box; 
}

/* Blog-specific body styling (scoped to blog container) */
.blog-post {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background: #f5f5f5;
}

/* Container Layout */
.blog-post .container { 
    display: flex; 
    max-width: 1400px; 
    margin: 0 auto; 
    gap: 40px; 
    padding: 40px 40px 0; 
    background: #fff; 
}

.blog-post .main-content { 
    flex: 1; 
    max-width: 900px; 
}

.blog-post .sidebar { 
    width: 320px; 
    flex-shrink: 0; 
}

/* Hero Section */
.blog-post .hero { 
    background-size: cover; 
    background-position: center;
    color: white; 
    padding: 60px 40px; 
    margin: 0 0 40px; 
    border-radius: 8px; 
}

.blog-post .water-systems-tag { 
    background: #e51317; 
    color: white; 
    padding: 4px 12px; 
    font-size: 0.75rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    border-radius: 4px; 
    display: inline-block; 
    margin-bottom: 15px; 
}

.blog-post h1 { 
    font-size: 2.8rem; 
    line-height: 1.1; 
    margin: 0 0 20px !important; 
    padding: 0 !important;
    text-transform: uppercase; 
    font-weight: 800; 
}

.blog-post .meta { 
    font-size: 1.1rem; 
    opacity: 0.9; 
    display: flex; 
    gap: 20px; 
}

/* Content Area */
.blog-post .intro, 
.blog-post .content-wrap { 
    padding: 0 0 40px; 
}

.blog-post h2 { 
    color: #0b1d33; 
    font-size: 1.8rem; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px !important; 
    margin: 40px 0 20px !important; 
    text-transform: uppercase; 
}

.blog-post h2:first-of-type { 
    margin-top: 0 !important; 
}

.blog-post h3 { 
    color: #0b1d33; 
    font-size: 1.3rem; 
    margin: 25px 0 15px !important; 
    padding: 0 !important;
    font-weight: 700; 
}

.blog-post p { 
    line-height: 1.7; 
    margin-bottom: 15px; 
    color: #333; 
}

.blog-post ul, 
.blog-post ol { 
    margin: 15px 0; 
    padding-left: 25px; 
    line-height: 1.8; 
}

.blog-post li { 
    margin-bottom: 10px; 
}

.blog-post strong { 
    color: #e51317; 
}

/* Special Boxes */
.blog-post .highlight-box { 
    background: #f0f7ff; 
    padding: 20px; 
    border-radius: 6px; 
    margin: 20px 0; 
    border-left: 4px solid #e51317; 
}

.blog-post .warning-box { 
    background: #fff3cd; 
    padding: 20px; 
    border-radius: 6px; 
    margin: 20px 0; 
    border-left: 4px solid #ff9800; 
}

/* Question Numbers */
.blog-post .question-number { 
    display: inline-block; 
    background: #e51317; 
    color: white; 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    text-align: center; 
    line-height: 35px; 
    font-weight: bold; 
    margin-right: 10px; 
    font-size: 1.1rem;
}

/* Media/Images */
.blog-post .media-container { 
    margin: 30px 0; 
    text-align: center; 
}

.blog-post .media-container img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}

.blog-post .media-container p { 
    font-size: 0.85em; 
    color: #888; 
    margin-top: 10px; 
    font-style: italic; 
}

/* CTA Container */
.blog-post .cta-container { 
    background: #ebf5ff; 
    border-radius: 12px; 
    padding: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-top: 40px; 
    gap: 30px; 
}

.blog-post .cta-text h3 { 
    margin-top: 0 !important; 
    color: #0b1d33; 
}

.blog-post .cta-text p:last-of-type {
    font-size: 0.9em;
    margin-top: 15px;
}

.blog-post .cta-button { 
    background: #bd0000; 
    color: white !important; 
    padding: 15px 30px; 
    text-decoration: none !important; 
    font-weight: bold; 
    border-radius: 6px; 
    white-space: nowrap; 
}

.blog-post .cta-button:hover { 
    background: #e51317; 
}

/* About Box */
.blog-post .about-box {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-left: 4px solid #e51317;
    border-radius: 6px;
}

.blog-post .about-box h3 {
    margin-top: 0 !important;
    color: #0b1d33;
}

.blog-post .about-box p {
    margin-bottom: 0;
}

/* Table of Contents */
.blog-post .table-of-contents {
    background: #f5f5f5;
    padding: 25px;
    border-left: 4px solid #e51317;
    margin: 30px 0;
    border-radius: 6px;
}

.blog-post .table-of-contents h2 {
    margin-top: 0 !important;
    font-size: 1.4rem;
}

.blog-post .table-of-contents ol {
    margin: 15px 0 0;
    padding-left: 20px;
}

.blog-post .table-of-contents li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.blog-post .table-of-contents a {
    color: #0b1d33;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-post .table-of-contents a:hover {
    color: #e51317;
    text-decoration: underline;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px; /* Offset for sticky headers */
}

/* Scroll offset for anchor links */
.blog-post h2,
.blog-post h3 {
    scroll-margin-top: 150px; /* Centers content when clicked from TOC */
}

/* Sidebar */
.blog-post .sidebar-section { 
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    padding: 25px; 
    margin-bottom: 30px; 
}

.blog-post .sidebar-section h3 { 
    margin-top: 0 !important; 
    color: #0b1d33; 
    font-size: 1.2rem; 
    border-bottom: 2px solid #e51317; 
    padding-bottom: 10px !important; 
    margin-bottom: 20px !important; 
}

.blog-post .related-article { 
    margin-bottom: 20px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid #eee; 
}

.blog-post .related-article:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0; 
}

.blog-post .related-article h4 { 
    margin: 0 0 8px !important; 
    padding: 0 !important;
    font-size: 1rem; 
    color: #0b1d33; 
}

.blog-post .related-article a { 
    color: #0b1d33; 
    text-decoration: none; 
    font-weight: 600; 
}

.blog-post .related-article a:hover { 
    color: #e51317; 
}

.blog-post .related-article p { 
    margin: 5px 0 0; 
    font-size: 0.85rem; 
    color: #666; 
    line-height: 1.5; 
}

/* Ask Box (Red Gradient Sidebar) */
.blog-post .ask-box { 
    background: linear-gradient(135deg, #e51317 0%, #bd0000 100%); 
    color: white !important; 
    text-align: center; 
}

.blog-post .ask-box h3 { 
    color: white !important; 
    border-bottom: 2px solid rgba(255,255,255,0.3); 
}

.blog-post .ask-box p { 
    font-size: 0.95rem; 
    line-height: 1.6; 
    margin-bottom: 20px; 
    color: white !important; 
}

.blog-post .ask-box strong { 
    color: white !important; 
}

.blog-post .ask-button { 
    background: white; 
    color: #e51317; 
    padding: 12px 24px; 
    text-decoration: none; 
    font-weight: bold; 
    border-radius: 6px; 
    display: inline-block; 
    transition: transform 0.2s; 
}

.blog-post .ask-button:hover { 
    transform: translateY(-2px); 
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .blog-post .container { 
        flex-direction: column; 
        padding: 20px; 
    }
    
    .blog-post .sidebar { 
        width: 100%; 
    }
    
    .blog-post h1 { 
        font-size: 2rem; 
    }
    
    .blog-post h2 { 
        font-size: 1.5rem; 
    }
    
    .blog-post .cta-container { 
        flex-direction: column; 
        text-align: center; 
    }
}