/* style/blog.css */
.page-blog {
    background-color: #08160F; /* Custom Background */
    color: #F2FFF6; /* Custom Text Main */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 50px; /* Add some padding at the bottom */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    box-sizing: border-box;
}

.page-blog__hero-image-container {
    width: 100%;
    max-width: 1920px; /* Max width for hero image container */
    margin-bottom: 20px; /* Space between image and content */
}

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

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
    color: #F2FFF6; /* Custom Text Main */
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #F2FFF6; /* Custom Text Main */
}

.page-blog__hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #A7D9B8; /* Custom Text Secondary */
}

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

/* Section Titles */
.page-blog__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #F2FFF6; /* Custom Text Main */
}

.page-blog__subsection-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #F2FFF6; /* Custom Text Main */
}

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

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

/* Buttons */
.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

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

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: #2AD16F; /* Match gradient start color for contrast */
    border: 2px solid #2AD16F; /* Custom Border */
}

.page-blog__btn-secondary:hover {
    background: rgba(42, 209, 111, 0.1);
    transform: translateY(-2px);
}

/* Blog Post Cards */
.page-blog__introduction-section,
.page-blog__latest-posts-section,
.page-blog__categories-section {
    padding: 60px 0;
}

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

.page-blog__post-card,
.page-blog__category-card {
    background-color: #11271B; /* Custom 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;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #F2FFF6; /* Custom Text Main */
    text-decoration: none;
}

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

.page-blog__post-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

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

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

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

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

.page-blog__post-excerpt {
    font-size: 1rem;
    color: #A7D9B8; /* Custom Text Secondary */
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__read-more {
    color: #57E38D; /* Custom Glow */
    font-weight: bold;
    align-self: flex-start;
}

.page-blog__category-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
}

.page-blog__category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #F2FFF6; /* Custom Text Main */
}

.page-blog__category-description {
    font-size: 1rem;
    color: #A7D9B8; /* Custom Text Secondary */
}

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

/* Why 8s Section (Replaced Featured Article) */
.page-blog__why-8s-section {
    padding: 60px 0;
    background-color: #0A4B2C; /* Deep Green for contrast */
}

.page-blog__why-8s-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
}

.page-blog__why-8s-image {
    width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    max-width: 600px; /* Limit image width */
}

.page-blog__why-8s-text {
    flex-grow: 1;
    color: #F2FFF6; /* Custom Text Main */
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
}

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

.page-blog__faq-item {
    background-color: #11271B; /* Custom Card BG */
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #F2FFF6; /* Custom Text Main */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    background-color: #1E3A2A; /* Custom Divider for question background */
    color: #F2FFF6; /* Custom Text Main */
    border-bottom: 1px solid #2E7A4E; /* Custom Border */
}

.page-blog__faq-question:hover {
    background-color: #2E7A4E; /* Custom Border on hover */
}

.page-blog__faq-item[open] .page-blog__faq-question {
    border-bottom: 1px solid transparent; /* No border when open */
}

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

.page-blog__faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 15px;
    color: #57E38D; /* Custom Glow */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #A7D9B8; /* Custom Text Secondary */
    line-height: 1.6;
}

.page-blog__faq-answer p {
    margin-bottom: 10px;
}

.page-blog__faq-answer a {
    color: #57E38D; /* Custom Glow */
    text-decoration: underline;
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
    padding: 80px 0;
    text-align: center;
    background-color: #0A4B2C; /* Deep Green for contrast */
}

.page-blog__cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #F2FFF6; /* Custom Text Main */
}

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

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__why-8s-content {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__why-8s-image {
        width: 100%;
        max-width: 800px;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-blog__main-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .page-blog__hero-description {
        font-size: 1rem;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .page-blog__container {
        padding: 0 15px;
    }

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

    .page-blog__subsection-title {
        font-size: 1.5rem;
    }

    .page-blog__posts-grid,
    .page-blog__categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__post-image {
        height: 180px;
    }

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

    .page-blog__category-title {
        font-size: 1.3rem;
    }
}
}