/* style/blog.css */

/* --- General Styles for .page-blog Scope --- */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: #F2FFF6; /* Text Main */
    background-color: #08160F; /* Background */
    line-height: 1.6;
    padding-bottom: 60px; /* Add some padding at the bottom for overall page */
}

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

.page-blog__section {
    padding: 60px 0;
}

.page-blog__section-title {
    font-size: 2.5em;
    color: #F2C14E; /* Gold */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.page-blog__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #A7D9B8; /* Text Secondary */
}

/* --- Hero Section --- */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image first, then content */
    align-items: center;
    padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
    overflow: hidden; /* Ensure content doesn't bleed */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px; /* Space between image and text */
}

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

.page-blog__hero-content {
    max-width: 900px;
    text-align: center;
    padding: 0 20px;
}

.page-blog__main-title {
    font-weight: 900;
    line-height: 1.2;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    font-size: clamp(2em, 4vw, 3.5em); /* Example clamp usage for H1 */
}

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

.page-blog__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
    box-sizing: border-box;
    max-width: 100%;
    text-align: center;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
    color: #F2FFF6; /* Text Main */
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #2AD16F; /* Lighter green from button gradient start */
    border: 2px solid #2AD16F; /* Lighter green from button gradient start */
}

.page-blog__btn-secondary:hover {
    background-color: #2AD16F;
    color: #F2FFF6;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(42, 209, 111, 0.2);
}

/* --- Latest Posts Grid --- */
.page-blog__posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-blog__post-card {
    background-color: #11271B; /* Card BG */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #2E7A4E; /* Border */
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__post-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

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

.page-blog__post-content {
    padding: 20px;
}

.page-blog__post-title {
    font-size: 1.4em;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
}

.page-blog__read-more {
    color: #2AD16F; /* Lighter green */
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.page-blog__read-more::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #2AD16F;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.page-blog__post-link:hover .page-blog__read-more::after {
    transform: scaleX(1);
}

.page-blog__view-all-posts {
    text-align: center;
    margin-top: 20px;
}

/* --- CTA Banner --- */
.page-blog__cta-banner {
    position: relative;
    padding: 80px 20px;
    text-align: center;
    background-color: #0A4B2C; /* Deep Green */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.page-blog__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
    z-index: 0;
    display: block; /* Ensure it's not an icon */
}

.page-blog__cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-blog__cta-title {
    font-size: 2.5em;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__cta-description {
    font-size: 1.2em;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 40px;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
    background-color: #08160F; /* Background */
}

.page-blog__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__faq-item {
    background-color: #11271B; /* Card BG */
    border: 1px solid #2E7A4E; /* Border */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-item summary {
    list-style: none; /* Remove default marker */
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #F2FFF6; /* Text Main */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.page-blog__faq-item summary::-webkit-details-marker {
    display: none; /* Remove default marker for webkit */
}

.page-blog__faq-item summary:hover {
    background-color: #1E3A2A; /* Divider color for hover */
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #2AD16F; /* Lighter green */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    color: #F2C14E; /* Gold when open */
    content: '−'; /* Update content for open state */
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1.05em;
    color: #A7D9B8; /* Text Secondary */
}

/* --- About Section --- */
.page-blog__about-section {
    background-color: #08160F; /* Background */
    text-align: center;
}

.page-blog__about-section .page-blog__text-block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left; /* Align text within the block */
    margin-bottom: 25px;
}

.page-blog__read-more-about {
    margin-top: 30px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }
    .page-blog__cta-title {
        font-size: 2em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* General mobile padding */
    .page-blog__container {
        padding: 0 15px !important;
    }

    .page-blog__section {
        padding: 40px 0 !important;
    }

    .page-blog__hero-section {
        padding: 10px 15px 40px 15px !important; /* Small top padding, larger bottom padding */
    }
    
    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em) !important; /* Force smaller H1 on mobile */
    }

    .page-blog__subtitle {
        font-size: 1em !important;
    }

    /* Buttons */
    .page-blog__cta-group,
    .page-blog__cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 15px !important; /* Add padding to button group */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog a[class*="button"],
    .page-blog a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px !important;
        padding-right: 15px !important; /* Ensure button text has space */
    }

    /* Images */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__cta-banner,
    .page-blog__faq-section,
    .page-blog__about-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Content area specific padding for mobile */
    .page-blog__hero-content,
    .page-blog__cta-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-blog__posts-grid {
        gap: 20px !important;
        padding: 0 15px !important; /* Adjust padding for grid on mobile */
    }

    .page-blog__post-card {
        margin-bottom: 0 !important; /* Remove margin-bottom if gap is used */
    }
    .page-blog__post-image {
        height: 180px !important; /* Adjust height for mobile cards */
    }

    .page-blog__cta-banner {
        padding: 60px 15px !important;
    }
    .page-blog__cta-title {
        font-size: 1.8em !important;
    }
    .page-blog__cta-description {
        font-size: 1em !important;
    }

    .page-blog__faq-item summary {
        font-size: 1.1em !important;
        padding: 15px 20px !important;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px 20px !important;
    }
}

@media (max-width: 480px) {
    .page-blog__section-title {
        font-size: 1.8em !important;
    }
    .page-blog__post-title {
        font-size: 1.2em !important;
    }
    .page-blog__faq-item summary {
        font-size: 1em !important;
    }
}

/* Ensure no filter on images */
.page-blog img {
    filter: none !important;
}

/* Content area images CSS dimensions lower bound */
.page-blog__posts-grid img,
.page-blog__post-card img {
    min-width: 200px;
    min-height: 200px;
}

/* Override min-width/height for mobile to allow responsiveness */
@media (max-width: 768px) {
    .page-blog__posts-grid img,
    .page-blog__post-card img {
        min-width: unset !important;
        min-height: unset !important;
    }
}