/* style/blog.css */

/* --- Color Variables --- */
:root {
    --main-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-b-g: #11271B;
    --background: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* --- General Styles --- */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for dark background */
    background-color: var(--background); /* Body background from shared.css */
}

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

.page-blog__section-intro {
    font-size: 1.1em;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Ensure all text elements respect color contrast */
.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
    color: var(--text-main);
}

.page-blog p, .page-blog li {
    color: var(--text-secondary);
}

/* --- Hero Section --- */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, text below */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    box-sizing: border-box;
    background-color: var(--background);
}

.page-blog__image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: none; /* Ensure no image filters are applied */
}

.page-blog__hero-content {
    max-width: 800px;
    text-align: center;
}

.page-blog__main-title {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 20px;
    /* font-size handled by clamp in shared.css or implicit */
}

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

.page-blog__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 20px;
    width: 100%; /* Ensure container takes full width */
    max-width: 650px; /* Max width for button group */
    margin: 0 auto;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 300px; /* Limit individual button width */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-secondary:hover {
    background-color: var(--deep-green);
    color: #ffffff;
    border-color: var(--deep-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* --- Articles Grid --- */
.page-blog__articles-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-b-g);
    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__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no image filters are applied */
    min-width: 200px; /* Minimum size for content images */
    min-height: 200px; /* Minimum size for content images */
}

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

.page-blog__article-title {
    font-size: 1.35em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.page-blog__article-excerpt {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes read more to bottom */
}

.page-blog__read-more {
    display: inline-block;
    color: var(--glow);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: var(--gold);
    text-decoration: underline;
}

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

.page-blog__view-all .page-blog__btn-primary {
    max-width: 350px;
    width: 100%;
}

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

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

.page-blog__faq-item {
    background-color: var(--card-b-g);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

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

.page-blog__faq-item.active .page-blog__faq-question {
    background-color: var(--main-color);
}

.page-blog__faq-question:hover {
    background-color: var(--main-color);
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--text-main);
    width: 20px;
    text-align: center;
}

.page-blog__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    color: var(--text-secondary);
}

.page-blog__faq-item.active .page-blog__faq-answer {
    max-height: 500px; /* Adjust as needed for content */
    padding: 20px 25px;
}

.page-blog__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
    color: var(--text-secondary);
}

.page-blog__faq-answer a {
    color: var(--glow);
    text-decoration: none;
    font-weight: 600;
}

.page-blog__faq-answer a:hover {
    text-decoration: underline;
}

/* --- CTA Section --- */
.page-blog__cta-section {
    background-color: var(--deep-green);
    padding: 80px 20px;
    text-align: center;
    box-sizing: border-box;
    border-radius: 15px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-blog__cta-title {
    font-size: 2.8em;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__hero-section {
        padding: 40px 15px;
    }

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

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

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

@media (max-width: 768px) {
    /* Global image and container responsiveness */
    .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,
    .page-blog__hero-section,
    .page-blog__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-blog__hero-content {
        padding: 0 10px;
    }

    .page-blog__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

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

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog a[class*="button"],
    .page-blog a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
    }

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

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

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

    .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: 1.05em;
    }

    /* Ensure content images are not smaller than 200px (this is for the actual display, not the placeholder request size) */
    .page-blog__article-image {
        min-width: 200px;
        min-height: 200px;
    }
}