/* 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 */
}

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

.page-blog__dark-bg {
    background-color: #08160F; /* Background */
    color: #F2FFF6; /* Text Main */
}

.page-blog__card {
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main */
    border: 1px solid #2E7A4E; /* Border */
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Typography */
.page-blog h1,
.page-blog h2,
.page-blog h3,
.page-blog h4,
.page-blog h5,
.page-blog h6 {
    color: #F2FFF6; /* Text Main */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__main-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 20px auto;
}

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: left;
}

.page-blog__section-title--center {
    text-align: center;
}

.page-blog__sub-title {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

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

.page-blog__text-block--center {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: #A7D9B8; /* Text Secondary */
}

.page-blog__list-item {
    margin-bottom: 10px;
}

/* Links and Buttons */
.page-blog a {
    color: #57E38D; /* Glow */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog a:hover {
    color: #2AD16F; /* Lighter green from button gradient */
    text-decoration: underline;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent; /* Default transparent border */
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure button doesn't exceed container */
}

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

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    color: #F2FFF6;
}

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

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

.page-blog__btn-text {
    color: #57E38D; /* Glow */
    font-weight: 500;
}

.page-blog__btn-text:hover {
    text-decoration: underline;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding for first section */
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px; /* Ensure some height even with smaller images */
}

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

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    max-height: 500px; /* Cap hero image height for better balance */
}

.page-blog__hero-content {
    padding: 0 20px;
    max-width: 900px;
    z-index: 1; /* Ensure content is above any background effects */
}

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

.page-blog__cta-button {
    margin: 10px;
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 60px 20px;
}

.page-blog__image-content {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 30px 0;
    object-fit: cover;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 60px 20px;
    text-align: center;
}

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

.page-blog__article-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
    height: 100%; /* Ensure cards in a row have same height */
}

.page-blog__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-bottom: 15px;
}

.page-blog__card-content {
    padding: 0 20px 20px;
    flex-grow: 1; /* Allows content to push footer to bottom */
    display: flex;
    flex-direction: column;
}

.page-blog__card-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-blog__card-title a {
    color: #F2FFF6; /* Text Main */
    text-decoration: none;
}

.page-blog__card-title a:hover {
    color: #57E38D; /* Glow */
    text-decoration: underline;
}

.page-blog__card-date {
    font-size: 0.9em;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 15px;
    display: block;
}

.page-blog__card-excerpt {
    font-size: 1em;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the 'Read More' link to the bottom */
}

.page-blog__view-all-button-wrapper {
    margin-top: 30px;
}

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

.page-blog__faq-list {
    margin-top: 40px;
}

.page-blog__faq-item {
    margin-bottom: 20px;
    overflow: hidden; /* For details tag */
}

.page-blog__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: 600;
    color: #F2FFF6; /* Text Main */
    background-color: #11271B; /* Card BG */
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

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

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

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

.page-blog__faq-answer {
    padding: 15px 20px;
    font-size: 1em;
    color: #A7D9B8; /* Text Secondary */
    background-color: #0A4B2C; /* Deep Green - slightly lighter than card bg */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Final CTA Section */
.page-blog__cta-final-section {
    padding: 60px 20px;
    text-align: center;
}

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

/* Image Responsiveness */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

    .page-blog__container {
        padding: 0 15px; /* Adjust padding for mobile */
    }

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Ensure small top padding */
        min-height: auto;
    }

    .page-blog__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-blog__section-title {
        font-size: 2em;
        margin-bottom: 20px;
        text-align: center; /* Center align section titles on mobile */
    }

    .page-blog__sub-title {
        font-size: 1.5em;
        margin-top: 25px;
    }

    .page-blog__text-block {
        font-size: 1em;
    }

    .page-blog__introduction-section,
    .page-blog__latest-articles-section,
    .page-blog__faq-section,
    .page-blog__cta-final-section {
        padding: 40px 15px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

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

    .page-blog__card-title {
        font-size: 1.2em;
    }

    .page-blog__faq-item summary {
        font-size: 1.1em;
        padding: 12px 15px;
    }

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

    /* Mobile image responsiveness (mandatory) */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-image-wrapper,
    .page-blog__article-card,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Mobile button responsiveness (mandatory) */
    .page-blog__cta-button,
    .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;
        padding-right: 15px;
    }
    
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* Stack buttons vertically on mobile */
    }
}

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