/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--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(--text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__section-subtitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
}

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

/* 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(--background);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
}

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

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

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

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
    max-width: 100%;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #F2FFF6;
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: #11271B;
    color: #A7D9B8;
    border: 2px solid var(--border);
}

.page-blog__btn-secondary:hover {
    background: var(--border);
    color: #F2FFF6;
    transform: translateY(-2px);
}

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

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

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

.page-blog__post-card:hover {
    transform: translateY(-5px);
}

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

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

.page-blog__post-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

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

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

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

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

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

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

/* About Promotions Section */
.page-blog__about-promotions {
    padding: 80px 0;
    background-color: var(--deep-green);
    color: var(--text-main);
}

.page-blog__about-promotions .page-blog__section-title,
.page-blog__about-promotions .page-blog__description {
    color: var(--text-main);
}

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

.page-blog__content-block {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__content-heading {
    font-size: 1.8em;
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__list {
    list-style: disc inside;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-blog__list li {
    margin-bottom: 10px;
}

.page-blog__list strong {
    color: var(--text-main);
}

.page-blog__content-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-top: 20px;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

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

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

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    background-color: transparent;
    border: none;
    width: 100%;
    text-align: left;
    outline: none;
    position: relative;
    list-style: none;
}

.page-blog__faq-question::-webkit-details-marker {
    display: none;
}

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
}

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

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

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: var(--deep-green);
    color: var(--text-main);
}

.page-blog__cta-section .page-blog__container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.page-blog__cta-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__description {
    text-align: left;
    color: var(--text-main);
}

.page-blog__cta-image-wrapper {
    flex: 1;
    min-width: 300px;
    text-align: right;
}

.page-blog__cta-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
    margin-left: auto; /* Align right */
}

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

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

    .page-blog__hero-section {
        padding: 40px 15px;
    }

    .page-blog__latest-posts,
    .page-blog__about-promotions,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding: 60px 0;
    }

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

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

    .page-blog__hero-content,
    .page-blog__section-title,
    .page-blog__section-subtitle,
    .page-blog__description {
        text-align: center;
    }

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

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-blog__post-image,
    .page-blog__content-image,
    .page-blog__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__hero-image-wrapper,
    .page-blog__post-card,
    .page-blog__content-block,
    .page-blog__cta-section .page-blog__container,
    .page-blog__cta-content,
    .page-blog__cta-image-wrapper,
    .page-blog__faq-item,
    .page-blog__latest-posts .page-blog__container,
    .page-blog__about-promotions .page-blog__container,
    .page-blog__faq-section .page-blog__container,
    .page-blog__cta-section .page-blog__container {
        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;
    }

    .page-blog__cta-section .page-blog__container {
        flex-direction: column;
    }

    .page-blog__cta-content {
        text-align: center;
    }

    .page-blog__cta-image-wrapper {
        text-align: center;
    }
}