/* style/blog.css */

/* Custom Colors */
:root {
    --page-blog-bg: #08160F; /* Background */
    --page-blog-card-bg: #11271B; /* Card BG */
    --page-blog-text-main: #F2FFF6; /* Text Main */
    --page-blog-text-secondary: #A7D9B8; /* Text Secondary */
    --page-blog-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
    --page-blog-border: #2E7A4E; /* Border */
    --page-blog-glow: #57E38D; /* Glow */
    --page-blog-gold: #F2C14E; /* Gold */
    --page-blog-divider: #1E3A2A; /* Divider */
    --page-blog-deep-green: #0A4B2C; /* Deep Green */
}

.page-blog {
    background-color: var(--page-blog-bg);
    color: var(--page-blog-text-main);
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--page-blog-deep-green); /* Ensure good contrast for content */
    text-align: center;
    overflow: hidden; /* Ensure no overflow issues */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    margin-bottom: 30px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    min-height: 200px; /* Enforce min size */
}

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
    color: var(--page-blog-text-main);
}

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* Use clamp for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--page-blog-gold);
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

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

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons adapt */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--page-blog-btn-gradient);
    color: var(--page-blog-text-main);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

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

.page-blog__btn-secondary:hover {
    background: rgba(242, 193, 78, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Section Titles */
.page-blog__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--page-blog-gold);
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

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

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

.page-blog__post-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 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: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

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

.page-blog__post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-blog__post-excerpt {
    font-size: 0.95rem;
    color: var(--page-blog-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__post-date {
    font-size: 0.85rem;
    color: var(--page-blog-border);
    text-align: right;
    display: block;
}

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

/* Benefits Section */
.page-blog__benefits-section {
    padding: 60px 0;
    background-color: var(--page-blog-deep-green);
    color: var(--page-blog-text-main);
}

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

.page-blog__benefit-item {
    background-color: var(--page-blog-card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    text-align: center;
    border: 1px solid var(--page-blog-border);
}

.page-blog__benefit-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--page-blog-gold);
    margin-bottom: 15px;
}

.page-blog__benefit-description {
    font-size: 1rem;
    color: var(--page-blog-text-secondary);
}

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

.page-blog__cta-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--page-blog-gold);
    margin-bottom: 20px;
}

.page-blog__cta-description {
    font-size: 1.1rem;
    color: var(--page-blog-text-secondary);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

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

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

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--page-blog-text-main);
    cursor: pointer;
    background-color: var(--page-blog-card-bg);
    border-bottom: 1px solid var(--page-blog-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-item[open] .page-blog__faq-question {
    border-bottom: 1px solid var(--page-blog-border);
}

.page-blog__faq-qtext {
    flex-grow: 1;
    color: var(--page-blog-gold);
}

.page-blog__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--page-blog-glow);
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .page-blog {
        font-size: 15px;
        line-height: 1.5;
    }

    .page-blog__container {
        padding: 0 15px;
    }

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

    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

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

    .page-blog__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 0.95rem;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__section-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        margin-bottom: 30px;
        padding-top: 30px;
    }

    .page-blog__latest-posts-section,
    .page-blog__benefits-section,
    .page-blog__faq-section {
        padding: 40px 0;
    }

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

    .page-blog__post-image {
        height: 180px; /* Adjust height for mobile */
        min-width: 200px; /* Enforce min size */
        min-height: 200px; /* Enforce min size */
    }

    .page-blog__post-title {
        font-size: 1.15rem;
    }

    .page-blog__post-excerpt {
        font-size: 0.9rem;
    }

    .page-blog__benefit-item {
        padding: 25px;
    }

    .page-blog__benefit-title {
        font-size: 1.25rem;
    }

    .page-blog__cta-section {
        padding: 60px 15px;
    }

    .page-blog__cta-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .page-blog__cta-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .page-blog__faq-question {
        font-size: 1rem;
        padding: 18px 20px;
    }

    .page-blog__faq-answer {
        padding: 0 20px 18px 20px;
        font-size: 0.95rem;
    }

    /* Mobile image and container responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__latest-posts-section,
    .page-blog__benefits-section,
    .page-blog__cta-section,
    .page-blog__faq-section,
    .page-blog__container,
    .page-blog__post-card,
    .page-blog__benefit-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__latest-posts-section .page-blog__container,
    .page-blog__benefits-section .page-blog__container,
    .page-blog__faq-section .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Ensure video containers also adapt if any are added */
    .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;
    }
}