/* style/blog.css */

/* General styles for the blog page, ensuring light text on dark background */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #F2FFF6; /* Text Main */
    background-color: #08160F; /* Background */
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* Fixed header spacing is handled by shared.css body padding-top. */
/* This section should not add additional padding-top for header offset. */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px 60px; /* Small top padding, more bottom padding */
    box-sizing: border-box;
    overflow: hidden; /* Ensure content doesn't overflow */
}

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

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

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1; /* Ensure content is above any potential background layers */
}

.page-blog__hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

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

.page-blog__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #ffffff; /* White text for contrast */
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 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%);
}

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

.page-blog__section-title {
    font-size: 2.5rem;
    color: #F2FFF6; /* Text Main */
    text-align: center;
    margin-bottom: 50px;
    font-weight: bold;
    position: relative;
}

.page-blog__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #11A84E 0%, #22C768 100%); /* Main/Auxiliary color gradient */
    margin: 15px auto 0;
    border-radius: 2px;
}

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

.page-blog__post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 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;
    color: #F2FFF6; /* Text Main */
}

.page-blog__post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-blog__post-image-wrapper {
    width: 100%;
    overflow: hidden;
}

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image {
    transform: scale(1.05);
}

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

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

.page-blog__post-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

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

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

.page-blog__btn-link {
    display: inline-block;
    color: #57E38D; /* Glow */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-blog__btn-link:hover {
    color: #F2C14E; /* Gold */
}

/* Featured Categories Section */
.page-blog__featured-categories-section {
    padding: 60px 0;
    background-color: #08160F; /* Background */
}

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

.page-blog__category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #11271B; /* Card BG */
    border-radius: 10px;
    padding: 25px;
    text-decoration: none;
    color: #F2FFF6; /* Text Main */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__category-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid #2E7A4E; /* Border */
}

.page-blog__category-title {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    color: #F2FFF6; /* Text Main */
}

/* Why Read Section */
.page-blog__why-read-section {
    padding: 60px 0;
    background-color: #0A4B2C; /* Deep Green */
}

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

.page-blog__benefit-item {
    background-color: #11271B; /* Card BG */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: #F2FFF6; /* Text Main */
}

.page-blog__benefit-title {
    font-size: 1.6rem;
    color: #57E38D; /* Glow */
    margin-bottom: 15px;
    font-weight: bold;
}

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

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

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

.page-blog__cta-form {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

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

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

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

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

.page-blog__faq-item summary:hover {
    background-color: #2E7A4E; /* Border color for hover */
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

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

.page-blog__faq-answer {
    padding: 20px 25px;
    font-size: 1rem;
    color: #A7D9B8; /* Text Secondary */
    border-top: 1px solid #2E7A4E; /* Border */
}

/* Global image responsive styles (min 200x200 enforced for content images) */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
    /* No filter properties to change color */
}

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

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

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

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

    /* Buttons responsive */
    .page-blog__btn-primary,
    .page-blog__btn-link,
    .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;
        padding-right: 15px;
        text-align: center;
    }
    
    .page-blog__cta-form {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Container responsive padding */
    .page-blog__container {
        padding: 20px 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    /* Grid layouts responsive */
    .page-blog__post-grid,
    .page-blog__categories-grid,
    .page-blog__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Card-like elements responsive */
    .page-blog__post-card,
    .page-blog__category-card,
    .page-blog__benefit-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Internal padding for cards is maintained */
    }

    /* Image responsive */
    .page-blog__post-image,
    .page-blog__category-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__post-image {
        height: 180px; /* Adjust height for mobile */
    }

    .page-blog__category-image {
        width: 120px;
        height: 120px;
    }

    /* FAQ responsive */
    .page-blog__faq-item summary {
        font-size: 1.1rem;
        padding: 15px 20px;
    }

    .page-blog__faq-answer {
        padding: 15px 20px;
    }
}