/* style/blog.css */

/* Custom Colors */
:root {
    --color-background: #08160F;
    --color-card-bg: #11271B;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

/* Base styles for the blog page */
.page-blog {
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Page sections */
.page-blog__section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-blog__section-title {
    font-size: 2.5em;
    color: var(--color-text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--color-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;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--color-background);
}

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

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

.page-blog__hero-content {
    max-width: 900px;
    padding: 0 20px 60px;
    box-sizing: border-box;
    z-index: 1; /* Ensure content is above image if any overlap */
}

.page-blog__main-title {
    color: var(--color-gold);
    font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size for H1 */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

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

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

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

.page-blog__btn-primary {
    background: var(--color-button-gradient-start);
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: var(--color-text-main);
    border: none;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--color-glow), 0.3);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: var(--color-button-gradient-start);
    border: 2px solid var(--color-button-gradient-start);
}

.page-blog__btn-secondary:hover {
    background-color: var(--color-button-gradient-start);
    color: var(--color-text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--color-glow), 0.3);
}

/* Recent Posts Section */
.page-blog__recent-posts {
    background-color: var(--color-background);
}

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

.page-blog__post-card {
    background-color: var(--color-card-bg);
    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;
}

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

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

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Ensure content images are not too small */
    min-height: 200px;
}

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

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

.page-blog__post-title:hover {
    color: var(--color-gold);
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: var(--color-text-secondary);
    flex-grow: 1;
}

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

/* Categories Section */
.page-blog__categories {
    background-color: var(--color-deep-green);
    border-radius: 12px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-blog__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-border);
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: bold;
}

.page-blog__category-item:hover {
    background-color: var(--color-button-gradient-start);
    transform: translateY(-2px);
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: var(--color-background);
}

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

.page-blog__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--color-text-main);
    cursor: pointer;
    background-color: var(--color-deep-green);
    border-bottom: 1px solid var(--color-divider);
    list-style: none; /* For details/summary */
}
.page-blog__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for details/summary */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to form an X or simply change to minus */
}
.page-blog__faq-item[open] > .page-blog__faq-question {
    border-bottom: 1px solid transparent; /* Remove border when open */
}


.page-blog__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-divider);
}

.page-blog__faq-answer p {
    margin-bottom: 0;
}

/* CTA Banner Section */
.page-blog__cta-banner {
    position: relative;
    text-align: center;
    padding: 0;
    margin-top: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-deep-green); /* Fallback background */
    border-radius: 12px;
}

.page-blog__cta-banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.2; /* Make image subtle background */
    min-width: 200px; /* Ensure content images are not too small */
    min-height: 200px;
}

.page-blog__cta-content {
    position: relative;
    z-index: 1;
    padding: 60px 20px;
    max-width: 800px;
}

.page-blog__cta-title {
    font-size: 2.2em;
    color: var(--color-text-main);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__cta-description {
    font-size: 1.1em;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
}

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

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

@media (max-width: 768px) {
    .page-blog__section {
        padding: 40px 15px;
    }
    .page-blog__hero-section {
        padding-bottom: 40px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__post-image {
        height: 180px; /* Adjust card image height for mobile */
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
    .page-blog__category-item {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 15px 20px;
    }
    .page-blog__cta-title {
        font-size: 1.8em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }

    /* Mobile specific overrides for images, videos, buttons and containers */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important; /* Ensure content images take full width */
        height: auto !important;
        display: block !important;
    }

    /* Containers for responsive handling */
    .page-blog__section,
    .page-blog__post-card,
    .page-blog__category-list,
    .page-blog__faq-list,
    .page-blog__cta-banner,
    .page-blog__hero-cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
    /* Specific adjustment for hero section to avoid double padding if it's already full width */
    .page-blog__hero-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-blog__hero-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 480px) {
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__main-title {
        font-size: clamp(1.5em, 8vw, 2.2em);
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__cta-title {
        font-size: 1.5em;
    }
}