/* style/blog.css */

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

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 0 60px; /* Small top padding, larger bottom padding */
    background-color: #08160F; /* Ensure background matches body */
    overflow: hidden; /* Ensure no overflow */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 675px; /* Limit height of the image wrapper */
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and text */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Ensure image covers the area */
}

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

.page-blog__hero-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive H1 font size */
    font-weight: 700;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    line-height: 1.2;
}

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

.page-blog__hero-cta-button {
    display: inline-block;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #F2FFF6; /* Text Main */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    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__hero-cta-button:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

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

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 60px 0;
    background-color: #08160F; /* Background */
}

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

.page-blog__article-card {
    background-color: #11271B; /* Card B G */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-blog__article-image-wrapper {
    width: 100%;
    height: 225px; /* Fixed height for image area */
    overflow: hidden;
}

.page-blog__article-image {
    width: 100%;
    height: 100%;
    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.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.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.9em;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 15px;
}

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

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

.page-blog__read-more-button:hover {
    color: #F2FFF6; /* Text Main */
}

.page-blog__view-all-wrapper {
    text-align: center;
}

.page-blog__view-all-button {
    display: inline-block;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #F2FFF6; /* Text Main */
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-blog__view-all-button:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

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

.page-blog__category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item a {
    display: block;
    background-color: #11271B; /* Card B G */
    color: #F2FFF6; /* Text Main */
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid #2E7A4E; /* Border */
}

.page-blog__category-item a:hover {
    background-color: #0A4B2C; /* Deep Green */
    color: #57E38D; /* Glow */
    border-color: #57E38D;
}

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

.page-blog__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    background-color: #11271B; /* Card B G */
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

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

.page-blog__cta-text-wrapper {
    max-width: 700px;
}

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

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

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 10px 10px; /* Space between buttons */
}

.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%);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #57E38D; /* Glow */
    border: 2px solid #57E38D; /* Glow */
}

.page-blog__btn-secondary:hover {
    background-color: #57E38D; /* Glow */
    color: #11271B; /* Card B G */
}

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

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

.page-blog__faq-item {
    background-color: #11271B; /* Card B G */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px 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.1em;
    font-weight: 600;
    color: #F2FFF6; /* Text Main */
    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: #0A4B2C; /* Deep Green */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #57E38D; /* Glow */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−"; /* Change toggle to minus when open (JS will handle this) */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: clamp(2em, 5vw, 2.8em);
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__article-title {
        font-size: 1.3em;
    }
    .page-blog__cta-title {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 10px 0 40px;
    }
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-blog__hero-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__latest-articles-section,
    .page-blog__categories-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding: 40px 0;
    }
    .page-blog__article-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }
    .page-blog__category-item {
        width: 100%;
        max-width: 250px;
    }
    .page-blog__category-item a {
        width: 100%;
        text-align: center;
    }
    .page-blog__cta-content {
        padding: 30px;
    }
    .page-blog__cta-title {
        font-size: 1.6em;
    }
    .page-blog__cta-description {
        font-size: 0.95em;
    }
    .page-blog__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0 0 15px 0;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__cta-text-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .page-blog__faq-item summary {
        font-size: 1em;
        padding: 18px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 18px;
    }

    /* Mobile specific image handling */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__hero-image-wrapper,
    .page-blog__article-image-wrapper,
    .page-blog__cta-image,
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__cta-content,
    .page-blog__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__hero-section,
    .page-blog__latest-articles-section,
    .page-blog__categories-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-blog__hero-section {
        padding-top: 10px !important;
    }
}