/* style/blog.css */

/* Custom Colors */
:root {
    --page-blog-card-bg: #11271B;
    --page-blog-bg: #08160F;
    --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;
    --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--page-blog-text-main); /* Light text for dark body background */
    background-color: var(--page-blog-bg); /* Ensure consistency if body background is not fully controlled by shared.css */
}

/* Section common styles */
.page-blog__section {
    padding: 60px 0;
    position: relative;
    background-color: var(--page-blog-bg); /* Default section background */
}

.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(--page-blog-text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__subsection-title {
    font-size: 1.8em;
    color: var(--page-blog-text-main);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.page-blog__text-block p {
    margin-bottom: 1em;
    color: var(--page-blog-text-secondary);
}

.page-blog__highlight {
    color: var(--page-blog-text-main);
    font-weight: bold;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Minimum height for hero */
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--page-blog-deep-green); /* Fallback/background for hero */
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

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

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 40px 20px;
    background: rgba(17, 39, 27, 0.7); /* Card BG with transparency */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-top: 150px; /* Push content down to avoid overlapping the top of the image */
    margin-bottom: 50px;
}

.page-blog__main-title {
    color: var(--page-blog-text-main);
    font-size: 2.8em; /* Using em for relative sizing, clamp for responsive is better if possible */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

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

/* 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;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: var(--page-blog-button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--page-blog-text-main);
    border: 2px solid var(--page-blog-border);
    margin-left: 20px;
}

.page-blog__btn-secondary:hover {
    background: rgba(46, 122, 78, 0.2); /* Lighter version of border color */
    transform: translateY(-2px);
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%; /* desktop */
    max-width: 100%; /* desktop */
    box-sizing: border-box;
    overflow: hidden;
}


/* Latest Posts Grid */
.page-blog__latest-posts {
    background-color: var(--page-blog-bg);
    padding-bottom: 80px;
}

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

.page-blog__post-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    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.4);
}

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 220px; /* Fixed height for thumbnails */
    object-fit: cover;
    display: block;
}

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

.page-blog__card-title {
    font-size: 1.3em;
    color: var(--page-blog-text-main);
    margin-bottom: 10px;
    font-weight: 600;
}

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

.page-blog__card-excerpt {
    font-size: 1em;
    color: var(--page-blog-text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.page-blog__view-all {
    text-align: center;
    margin-top: 40px;
}

/* Content Section */
.page-blog__content-section {
    background-color: var(--page-blog-bg);
}

.page-blog__content-section h2,
.page-blog__content-section h3 {
    color: var(--page-blog-text-main);
}

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

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

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

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

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

.page-blog__faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--page-blog-text-main);
    border-bottom: 1px solid var(--page-blog-divider);
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.page-blog__faq-item[open] .page-blog__faq-question {
    border-bottom-color: transparent;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--page-blog-glow);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−"; /* Change to minus when open */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--page-blog-text-secondary);
    line-height: 1.6;
}

/* Call to Action Section */
.page-blog__cta-section {
    background-color: var(--page-blog-bg);
    text-align: center;
    padding: 80px 0;
}

.page-blog__cta-content {
    max-width: 900px;
}

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


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: 2.2em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        min-height: 400px;
        padding: 40px 0;
        padding-top: 10px !important; /* body handles --header-offset, this is decorative */
    }

    .page-blog__hero-content {
        padding: 30px 15px;
        margin-top: 100px; /* Adjust margin for smaller screens */
        margin-bottom: 30px;
    }

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

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 12px 24px;
        font-size: 0.9em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: 0 !important; /* Remove margin-left for stacked buttons */
    }

    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-blog__section {
        padding: 40px 0;
    }

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

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

    .page-blog__subsection-title {
        font-size: 1.5em;
    }

    .page-blog__post-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
    }

    .page-blog__post-thumbnail {
        height: 180px; /* Adjust height for smaller screens */
    }

    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }

    /* All images must adapt to mobile screen width */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-blog__video-section {
        padding-top: 10px !important;
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.8em;
    }
    .page-blog__section-title {
        font-size: 1.6em;
    }
    .page-blog__hero-content {
        margin-top: 80px;
        margin-bottom: 20px;
    }
}