/* style/blog.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-login-register-text: #FFFF00;
    --background-color: #FFFFFF; /* Default from shared.css */
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-color);
}

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

.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
}

.page-blog__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no filter changes image color */
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    padding: 30px 20px;
    color: var(--text-color-light);
    max-width: 900px;
    margin: -10% auto 0; /* Pull content up slightly over image */
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent background for readability */
    border-radius: 10px;
}

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--secondary-color);
    max-width: 100%;
}

.page-blog__hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: var(--button-register-bg);
    color: var(--button-login-register-text);
    border: 2px solid var(--button-register-bg);
}

.page-blog__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

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

.page-blog__btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.page-blog__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-blog__section-description {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__news-section,
.page-blog__guide-section,
.page-blog__strategy-section,
.page-blog__promotions-section,
.page-blog__faq-section,
.page-blog__cta-bottom-section {
    padding: 60px 0;
}

.page-blog__light-bg {
    background-color: var(--background-color);
    color: var(--text-color-dark);
}

.page-blog__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-blog__dark-bg .page-blog__section-title {
    color: var(--secondary-color);
}

.page-blog__dark-bg .page-blog__section-description {
    color: var(--secondary-color);
}

.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(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.page-blog__article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no filter changes image color */
}

.page-blog__article-content {
    padding: 25px;
}

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

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

.page-blog__article-title a:hover {
    color: #005a2d;
}

.page-blog__article-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 1rem;
    color: var(--text-color-dark);
    margin-bottom: 20px;
}

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

.page-blog__read-more:hover {
    color: #005a2d;
}

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

.page-blog__guide-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-blog__guide-image {
    flex: 1;
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    filter: none; /* Ensure no filter changes image color */
    display: block;
}

.page-blog__guide-text {
    flex: 1;
    color: var(--text-color-light);
}

.page-blog__guide-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.page-blog__guide-text p {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

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

.page-blog__strategy-item {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.page-blog__strategy-item:hover {
    transform: translateY(-5px);
}

.page-blog__strategy-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    filter: none; /* Ensure no filter changes image color */
    display: block;
}

.page-blog__strategy-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-blog__strategy-item p {
    font-size: 1rem;
    color: var(--text-color-dark);
    margin-bottom: 20px;
}

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

.page-blog__promotion-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--text-color-light);
}

.page-blog__promotion-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    filter: none; /* Ensure no filter changes image color */
    display: block;
}

.page-blog__promotion-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.page-blog__promotion-text {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

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

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

.page-blog__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none;
    position: relative;
}

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

.page-blog__faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--text-color-dark);
}

.page-blog__cta-bottom-section {
    text-align: center;
    padding: 80px 0;
}

.page-blog__cta-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.page-blog__cta-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--secondary-color);
}

/* General Image and Container Responsive Styles */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: none; /* Ensure no filter changes image color */
}

.page-blog__section,
.page-blog__card,
.page-blog__container,
.page-blog__hero-image-wrapper,
.page-blog__guide-image {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-blog__section-title {
        font-size: 2.2rem;
    }
    .page-blog__cta-title {
        font-size: 2.4rem;
    }
    .page-blog__guide-content {
        flex-direction: column;
        align-items: center;
    }
    .page-blog__guide-image {
        max-width: 80%;
        margin-bottom: 30px;
    }
    .page-blog__hero-content {
        margin-top: -5%;
    }
}

@media (max-width: 768px) {
    /* HERO Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles --header-offset */
        padding-bottom: 30px;
    }
    .page-blog__hero-image-wrapper {
        padding-bottom: 65%; /* Adjust aspect ratio for mobile */
    }
    .page-blog__hero-content {
        margin-top: -15% !important; /* Pull content up more for mobile */
        padding: 20px 15px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 10px;
    }
    .page-blog__hero-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    /* General Images and Containers */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-image-wrapper,
    .page-blog__guide-image,
    .page-blog__articles-grid,
    .page-blog__strategy-grid,
    .page-blog__promotions-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }

    /* Buttons and Button Containers */
    .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-left: 15px;
        padding-right: 15px;
    }
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column;
    }

    /* News Section */
    .page-blog__news-section,
    .page-blog__guide-section,
    .page-blog__strategy-section,
    .page-blog__promotions-section,
    .page-blog__faq-section,
    .page-blog__cta-bottom-section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    .page-blog__section-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__article-image {
        height: 180px;
    }
    .page-blog__article-title {
        font-size: 1.2rem;
    }

    /* Guide Section */
    .page-blog__guide-content {
        flex-direction: column;
        gap: 20px;
    }
    .page-blog__guide-image {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .page-blog__guide-subtitle {
        font-size: 1.5rem;
    }

    /* Strategy Section */
    .page-blog__strategy-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__strategy-image {
        height: 180px;
    }
    .page-blog__strategy-subtitle {
        font-size: 1.3rem;
    }

    /* Promotions Section */
    .page-blog__promotions-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__promotion-image {
        height: 150px;
    }
    .page-blog__promotion-title {
        font-size: 1.2rem;
    }

    /* FAQ Section */
    .page-blog__faq-item summary {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }

    /* Bottom CTA Section */
    .page-blog__cta-bottom-section {
        padding: 50px 0;
    }
    .page-blog__cta-title {
        font-size: 2rem;
    }
    .page-blog__cta-description {
        font-size: 1rem;
    }
}