/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: #F2FFF6; /* Main text color for dark background */
    background-color: #08160F; /* Overall page background */
    line-height: 1.6;
}

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

/* Section titles */
.page-blog__section-title {
    font-size: 2.5rem;
    color: #F2FFF6; /* Main text color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.2;
}

.page-blog__section-title--light {
    color: #F2FFF6;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    overflow: hidden; /* Ensure no overflow from image */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1920px; /* Max width for the image */
    margin-bottom: 40px;
}

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

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

.page-blog__main-title {
    font-size: clamp(2rem, 4vw, 3rem); /* Responsive H1 font size */
    color: #F2FFF6;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

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

/* Buttons - Primary */
.page-blog__btn-primary {
    display: inline-block;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    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);
    transform: translateY(-2px);
}

/* Buttons - Secondary */
.page-blog__btn-secondary {
    display: inline-block;
    background: transparent;
    color: #2AD16F;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid #2AD16F;
    cursor: pointer;
    margin-left: 15px; /* Spacing between primary and secondary */
}

.page-blog__btn-secondary:hover {
    background: #2AD16F;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 80px 0;
    background-color: #0A4B2C; /* Deep Green for this section */
}

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

.page-blog__post-card {
    background-color: #11271B; /* Card BG */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Ensure cards have a consistent minimum height */
}

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

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

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

.page-blog__post-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

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

.page-blog__post-title a:hover {
    color: #2AD16F; /* Highlight color on hover */
}

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

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

.page-blog__read-more {
    display: inline-block;
    color: #57E38D; /* Glow color for links */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
    color: #2AD16F;
    text-decoration: underline;
}

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

/* CTA Section */
.page-blog__cta-section {
    background-color: #08160F; /* Background color for CTA */
    padding: 80px 0;
    text-align: center;
}

.page-blog__cta-description {
    font-size: 1.1rem;
    color: #A7D9B8;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #0A4B2C; /* Deep Green for this section */
}

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

.page-blog__faq-item {
    background-color: #11271B; /* Card BG */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

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

.page-blog__faq-item summary:hover {
    background-color: rgba(46, 122, 78, 0.2); /* Border color with opacity */
}

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: '−'; /* Change to minus when open */
}

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

/* Ensure images within content area are not too small */
.page-blog img:not(.page-blog__hero-image) {
    min-width: 200px;
    min-height: 200px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 2.2rem;
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }
}

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

    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__latest-posts,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Specific image sizing for cards on mobile */
    .page-blog__post-image {
        height: auto !important; /* Allow height to adjust for smaller screens */
        max-height: 200px !important; /* Cap max height to prevent overly tall images */
        object-fit: cover;
    }

    /* Buttons responsiveness */
    .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;
        margin-left: 0 !important; /* Remove margin for stacked buttons */
        margin-bottom: 15px;
    }

    .page-blog__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important; /* Adjust gap for stacked buttons */
    }

    .page-blog__section-title {
        font-size: 1.8rem;
    }
    .page-blog__main-title {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
    }
    .page-blog__post-title {
        font-size: 1.2rem;
    }
    .page-blog__faq-item summary {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }
    
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }
    .page-blog__latest-posts,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding: 50px 0;
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__post-card {
        min-height: auto;
    }
}