/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    background-color: #08160F; /* Background */
    color: #F2FFF6; /* Text Main */
    line-height: 1.6;
    padding-bottom: 40px; /* Ensure space above footer */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px 60px; /* Small top padding, larger bottom */
    background-color: #0A4B2C; /* Deep Green for hero background */
    overflow: hidden;
}

.page-blog__hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin-bottom: 30px; /* Space between image and content */
    border-radius: 8px;
}

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
    position: relative;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 4vw, 3rem); /* H1 font size constraint: using clamp */
    font-weight: 700;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-blog__description {
    font-size: 1.15rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* General Section Styling */
.page-blog__section {
    padding: 60px 20px;
    background-color: #08160F; /* Background */
}

.page-blog__dark-section {
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main */
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-blog__section-title {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: #F2FFF6; /* Text Main */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.page-blog__sub-title {
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: #22C768; /* Auxiliary Color */
    margin-top: 30px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.page-blog__text-main {
    font-size: 1.1rem;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
}

.page-blog__text-secondary {
    font-size: 1rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
}

.page-blog__highlight {
    color: #57E38D; /* Glow */
    font-weight: 600;
}

.page-blog__content-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    object-fit: cover;
}

.page-blog__list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.page-blog__list-item {
    font-size: 1rem;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.page-blog__list-item::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: #57E38D; /* Glow */
    font-size: 1.1rem;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__cta-button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
    max-width: 100%; /* Important for responsiveness */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button Gradient */
    color: #F2FFF6; /* Text Main */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #2AD16F; /* Button color for secondary */
    border: 2px solid #2AD16F; /* Deep Green */
}

.page-blog__btn-secondary:hover {
    background-color: #2AD16F;
    color: #08160F; /* Background */
}

.page-blog__cta-button {
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    display: block; /* Make CTA buttons block level by default for better stacking */
    max-width: 300px; /* Limit width for block level CTA */
}

/* Featured Articles Grid */
.page-blog__featured-articles {
    background-color: #08160F; /* Background */
}

.page-blog__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-blog__article-card {
    background-color: #11271B; /* Card BG */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-blog__article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-blog__article-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-blog__article-title a {
    color: #F2FFF6; /* Text Main */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #57E38D; /* Glow */
}

.page-blog__article-meta {
    font-size: 0.9rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 1rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: #2AD16F; /* Button color for secondary */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #57E38D; /* Glow */
    text-decoration: underline;
}

.page-blog__view-all-wrapper {
    text-align: center;
    margin-top: 50px;
}

/* Links within text */
.page-blog a {
    color: #57E38D; /* Glow */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog a:hover {
    color: #2AD16F; /* Button color for secondary */
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-image {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 10px 15px 40px;
    }

    .page-blog__hero-image {
        height: 350px;
        margin-bottom: 20px;
    }

    .page-blog__main-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .page-blog__section {
        padding: 40px 15px;
    }

    .page-blog__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .page-blog__sub-title {
        font-size: 1.4rem;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .page-blog__text-main,
    .page-blog__text-secondary,
    .page-blog__list-item,
    .page-blog__article-excerpt {
        font-size: 0.95rem;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog__cta-button {
        padding: 12px 20px;
        font-size: 0.95rem;
        max-width: 100% !important; /* Force full width on mobile */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-blog__cta-button {
        max-width: 100%; /* Allow block level CTA to take full width */
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-blog__article-image {
        height: 200px;
    }

    .page-blog__article-title {
        font-size: 1.2rem;
    }

    /* Mobile image and video responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog video,
    .page-blog__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper,
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
    
    .page-blog__video-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
    
    /* If buttons are in a flex container for horizontal layout, make them stack vertically on mobile */
    .page-blog__cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.6rem;
    }
    .page-blog__hero-image {
        height: 250px;
    }
    .page-blog__section-title {
        font-size: 1.5rem;
    }
    .page-blog__sub-title {
        font-size: 1.2rem;
    }
    .page-blog__article-title {
        font-size: 1.1rem;
    }
}

/* Ensure images in content area are at least 200px */
.page-blog__content-area img,
.page-blog__section img:not(.page-blog__hero-image),
.page-blog__article-card img {
    min-width: 200px;
    min-height: 200px;
}
/* Override specific small image sizes if they are not meant to be small icons */
/* This is a general rule, specific elements might need more targeted overrides if their design demands it */
.page-blog img {
    /* Ensure no filter is applied to images */
    filter: none !important;
}

/* Color contrast enforcement for specific elements */
.page-blog__dark-section {
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main - ensures contrast */
}

.page-blog__article-card {
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main - ensures contrast */
}
.page-blog__article-card a {
    color: #F2FFF6; /* Text Main */
}
.page-blog__article-card a:hover {
    color: #57E38D; /* Glow */
}