/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Inherit from body or shared.css */
    padding-bottom: 40px; /* Add some padding to the bottom */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for aesthetic */
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

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

.page-blog__hero-content {
    position: relative; /* Ensure content is not absolutely positioned over image */
    padding: 30px 20px 0;
    max-width: 900px;
}

.page-blog__hero-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 30px;
}

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

/* General Section Titles and Subtitles */
.page-blog__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
    padding-top: 40px;
}

.page-blog__section-subtitle {
    font-size: 1.1em;
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__btn-primary {
    background-color: #C30808; /* Custom Register/Login color */
    color: #FFFF00; /* Custom Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-blog__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-blog__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* Latest Blog Posts Section */
.page-blog__latest-posts-section {
    padding: 40px 0;
}

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

.page-blog__post-card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for cards */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.page-blog__post-content {
    padding: 20px;
}

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-blog__post-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-blog__post-meta {
    font-size: 0.85em;
    color: #999999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 40px 0;
}

.page-blog__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-blog__category-card {
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.12);
}

.page-blog__category-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-blog__category-description {
    font-size: 0.9em;
    color: #cccccc;
}

/* Why Read Section */
.page-blog__why-read-section {
    padding: 40px 0;
}

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

.page-blog__benefit-item {
    background-color: rgba(1, 116, 57, 0.6); /* Using primary brand color with opacity */
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.page-blog__benefit-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-blog__benefit-description {
    font-size: 1em;
    color: #f0f0f0;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 40px 0;
    text-align: center;
}

.page-blog__cta-image-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__cta-content {
    padding: 0 20px; /* Adjust padding */
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__cta-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__cta-description {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 700px;
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 40px 0;
}

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

.page-blog__faq-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
    list-style: none; /* Hide default marker */
}

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

.page-blog__faq-question::marker {
    display: none; /* Hide default marker for standard */
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 10px;
}

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

.page-blog__faq-answer {
    padding: 0 20px 20px;
    font-size: 1em;
    color: #cccccc;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 3em;
    }

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

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px !important;
    }

    /* HERO Section - Mobile */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles --header-offset */
        padding-bottom: 20px !important;
    }
    
    .page-blog__hero-image-wrapper {
        max-height: 300px !important;
    }

    .page-blog__hero-image {
        max-height: 300px !important;
    }

    .page-blog__hero-content {
        padding: 20px 15px 0 !important;
    }

    .page-blog__hero-title {
        font-size: 2em !important;
        margin-bottom: 10px !important;
    }

    .page-blog__hero-description {
        font-size: 1em !important;
        margin-bottom: 20px !important;
    }

    .page-blog__hero-cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* General Images - Mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__post-thumbnail {
        height: 180px !important; /* Adjust height for mobile */
    }

    /* Buttons - Mobile */
    .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 !important;
        padding-right: 15px !important;
    }
    
    .page-blog__hero-cta-buttons,
    .page-blog__cta-buttons,
    .page-blog__view-all-button-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    /* Other content modules - Mobile */
    .page-blog__section-title {
        font-size: 1.8em !important;
        padding-top: 20px !important;
        margin-bottom: 10px !important;
    }

    .page-blog__section-subtitle {
        font-size: 1em !important;
        margin-bottom: 20px !important;
    }

    .page-blog__posts-grid,
    .page-blog__categories-grid,
    .page-blog__benefits-grid {
        grid-template-columns: 1fr !important; /* Single column layout */
        gap: 20px !important;
    }

    .page-blog__post-content,
    .page-blog__category-card,
    .page-blog__benefit-item,
    .page-blog__faq-item {
        padding: 15px !important;
    }

    .page-blog__post-title {
        font-size: 1.2em !important;
    }
    
    .page-blog__post-excerpt {
        font-size: 0.9em !important;
    }

    .page-blog__category-title {
        font-size: 1.1em !important;
    }

    .page-blog__benefit-title {
        font-size: 1.3em !important;
    }

    .page-blog__cta-content {
        padding: 20px !important;
    }

    .page-blog__cta-title {
        font-size: 1.5em !important;
        margin-bottom: 15px !important;
    }

    .page-blog__cta-description {
        font-size: 0.95em !important;
        margin-bottom: 20px !important;
    }
    
    .page-blog__faq-question {
        font-size: 1em !important;
        padding: 15px !important;
    }
    
    .page-blog__faq-answer {
        padding: 0 15px 15px !important;
    }
}