/* style/blog.css */

/* Custom Variables from provided color scheme */
:root {
    --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-blog-card-bg: #11271B;
    --page-blog-background: #08160F; /* This is likely the body background, shared.css will handle it */
    --page-blog-text-main: #F2FFF6;
    --page-blog-text-secondary: #A7D9B8;
    --page-blog-border: #2E7A4E;
    --page-blog-glow: #57E38D;
    --page-blog-gold: #F2C14E;
    --page-blog-divider: #1E3A2A;
    --page-blog-deep-green: #0A4B2C;

    /* Base colors for contrast safety - assuming shared.css sets body background to --page-blog-background */
    --text-on-dark-bg: var(--page-blog-text-main);
    --text-on-light-bg: #333333; /* Fallback if a light background is used */
    --text-on-brand-button: var(--page-blog-text-main);
}


/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark-bg); /* Default text color for the page, assuming dark body background */
    background-color: var(--page-blog-background); /* Explicitly set for main content, though body handles most */
}

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

.page-blog__section-title {
    font-size: clamp(2em, 5vw, 2.8em);
    color: var(--page-blog-gold);
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--page-blog-text-secondary);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height of hero image */
    overflow: hidden;
    margin-bottom: 40px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    min-width: 200px;
    min-height: 200px;
}

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

.page-blog__main-title {
    font-size: clamp(2.5em, 6vw, 3.5em); /* Using clamp for H1 */
    color: var(--page-blog-gold);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.1;
}

.page-blog__subtitle {
    font-size: 1.2em;
    color: var(--page-blog-text-secondary);
    margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    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 */
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--page-blog-button-gradient);
    color: var(--page-blog-text-on-brand-button);
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 15px var(--page-blog-glow);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--page-blog-gold);
    border: 2px solid var(--page-blog-gold);
}

.page-blog__btn-secondary:hover {
    background: var(--page-blog-gold);
    color: var(--text-on-light-bg); /* Dark text on gold background for contrast */
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 60px 0;
    background-color: var(--page-blog-background);
}

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

.page-blog__article-card {
    background-color: var(--page-blog-card-bg); /* Card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have consistent height */
}

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

.page-blog__card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-blog__article-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to grow and push read more to bottom */
    display: flex;
    flex-direction: column;
}

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

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

.page-blog__article-excerpt {
    font-size: 1em;
    color: var(--page-blog-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__read-more {
    color: var(--page-blog-gold);
    font-weight: bold;
    text-decoration: none;
    align-self: flex-start; /* Align to the left */
}

.page-blog__read-more:hover {
    text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--page-blog-deep-green); /* Use deep green for contrast */
}

.page-blog__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.page-blog__category-card {
    background-color: var(--page-blog-card-bg);
    color: var(--page-blog-text-main);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--page-blog-border);
}

.page-blog__category-card:hover {
    background-color: var(--page-blog-gold);
    color: var(--text-on-light-bg); /* Dark text on gold */
    transform: translateY(-3px);
}

/* Featured Article Section */
.page-blog__featured-article-section {
    padding: 80px 0;
    background-color: var(--page-blog-background);
}

.page-blog__featured-article-content {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-blog__featured-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

.page-blog__text-block {
    flex: 1;
    min-width: 300px; /* Ensure text block doesn't get too small */
}

.page-blog__featured-title {
    font-size: 2em;
    color: var(--page-blog-gold);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__featured-excerpt {
    color: var(--page-blog-text-secondary);
    margin-bottom: 30px;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--page-blog-deep-green);
}

.page-blog__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg);
    border: 1px solid var(--page-blog-border);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--page-blog-text-main);
    cursor: pointer;
    background-color: var(--page-blog-card-bg);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome/Safari */
}

.page-blog__faq-item summary {
    list-style: none; /* Hide default marker for Firefox */
}

.page-blog__faq-question:hover {
    background-color: rgba(var(--page-blog-gold), 0.1); /* Slight hover effect */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--page-blog-gold);
}

.page-blog__faq-answer {
    padding: 0 20px 20px;
    color: var(--page-blog-text-secondary);
    font-size: 1em;
    /* No max-height for details/summary, browser handles it */
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--page-blog-background);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-image-wrapper {
        max-height: 500px;
    }
    .page-blog__featured-article-content {
        flex-direction: column;
    }
    .page-blog__featured-image {
        max-width: 100%;
    }
}

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

    .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
        padding-bottom: 40px;
    }

    .page-blog__main-title {
        font-size: 2.2em;
    }

    .page-blog__subtitle {
        font-size: 1em;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-blog__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__article-image {
        height: 180px;
        min-width: 200px;
        min-height: 200px;
    }

    .page-blog__article-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

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

    .page-blog__featured-image {
        min-width: 200px;
        min-height: 200px;
    }

    /* Enforce image/video responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog video,
    .page-blog__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-blog__video-section {
        padding-top: 10px !important;
    }
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Content area specific mobile padding */
    .page-blog__latest-articles-section,
    .page-blog__categories-section,
    .page-blog__featured-article-section,
    .page-blog__faq-section,
    .page-blog__cta-bottom-section {
        padding: 40px 0;
    }
}

/* Contrast fix if needed, though colors are chosen for contrast */
.page-blog__contrast-fix {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
}

.page-blog__text-contrast-fix {
    color: #333333 !important;
    text-shadow: none !important;
}