/* style/blog.css */

/* General styling for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #F2FFF6); /* Default text color for the page content */
    background-color: var(--background, #08160F); /* Ensure body background is used */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    color: var(--text-main, #F2FFF6);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-blog__text-block {
    font-size: 1.1em;
    color: var(--text-secondary, #A7D9B8);
    text-align: center;
    margin-bottom: 30px;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    overflow: hidden; /* Ensure no overflow */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 30px; /* 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 {
    text-align: center;
    padding: 0 20px;
    max-width: 900px;
    width: 100%; /* Ensure content takes full width up to max-width */
    z-index: 1;
}

.page-blog__hero-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    color: var(--text-main, #F2FFF6);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-text {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

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

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-secondary {
    background: var(--card-bg, #11271B);
    color: var(--text-main, #F2FFF6);
    border: 2px solid var(--border, #2E7A4E);
}

.page-blog__btn-secondary:hover {
    background: var(--border, #2E7A4E);
    color: #ffffff;
}

.page-blog__btn-text {
    color: var(--glow, #57E38D);
    text-decoration: underline;
    padding: 0;
    border: none;
    background: none;
    font-size: 1em;
}

.page-blog__btn-text:hover {
    color: var(--gold, #F2C14E);
}

/* Intro Section */
.page-blog__intro-section {
    padding: 60px 0;
    background-color: var(--background, #08160F);
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--deep-green, #0A4B2C);
}

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

.page-blog__category-card {
    background-color: var(--card-bg, #11271B);
    border: 1px solid var(--border, #2E7A4E);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__category-title {
    font-size: 1.6em;
    color: var(--text-main, #F2FFF6);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__category-description {
    color: var(--text-secondary, #A7D9B8);
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Featured Articles Section */
.page-blog__featured-articles {
    padding: 60px 0;
    background-color: var(--background, #08160F);
}

.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: var(--card-bg, #11271B);
    border: 1px solid var(--border, #2E7A4E);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__article-title {
    font-size: 1.4em;
    color: var(--text-main, #F2FFF6);
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

.page-blog__article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: var(--glow, #57E38D);
}

.page-blog__article-meta {
    font-size: 0.9em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 1em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1;
}

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

/* Why Read Section */
.page-blog__why-read-section {
    padding: 60px 0;
    background-color: var(--deep-green, #0A4B2C);
}

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

.page-blog__benefit-item {
    background-color: var(--card-bg, #11271B);
    border: 1px solid var(--border, #2E7A4E);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.page-blog__benefit-title {
    font-size: 1.5em;
    color: var(--text-main, #F2FFF6);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__benefit-description {
    color: var(--text-secondary, #A7D9B8);
    font-size: 1em;
}

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

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

.page-blog__faq-item {
    background-color: var(--card-bg, #11271B);
    border: 1px solid var(--border, #2E7A4E);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-item summary {
    list-style: none; /* Remove default marker */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    color: var(--text-main, #F2FFF6);
    font-weight: bold;
    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); /* Lighter hover for dark background */
}

.page-blog__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--glow, #57E38D);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−";
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--text-secondary, #A7D9B8);
}

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background-color: var(--deep-green, #0A4B2C);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-blog__cta-description {
    font-size: 1.2em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

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

/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-blog__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px; /* Add side padding for mobile */
    }

    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }

    .page-blog__hero-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

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

    .page-blog__hero-cta-buttons,
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add side padding to button containers */
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog__btn-text {
        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;
    }

    /* General image responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Image containers responsiveness */
    .page-blog__image-full-width,
    .page-blog__article-image,
    .page-blog__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        height: auto !important; /* Ensure height adjusts */
    }

    /* Section/Card containers responsiveness */
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__category-grid,
    .page-blog__article-grid,
    .page-blog__benefits-grid,
    .page-blog__faq-list,
    .page-blog__hero-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

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

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

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

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

    .page-blog__cta-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    /* Ensure video container has width: 100% for desktop as well */
    .page-blog__video-container {
        width: 100%; /* Explicitly set for desktop as well for consistency */
    }
    .page-blog__video-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
}