/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background: #FFFFFF; /* Assuming body background is light from shared.css */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Minimal padding-top as body handles header offset */
    margin-bottom: 40px;
    background-color: #f5f5f5;
    text-align: center;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 450px; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
}

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

.page-blog__hero-content-wrapper {
    padding: 30px 20px;
    position: relative; /* Ensure content is above any potential background elements */
    z-index: 1;
    background-color: #FFFFFF; /* Ensure content background is light */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: -80px; /* Overlap with image slightly for visual effect */
    border-radius: 10px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__main-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #017439;
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
    width: 100%;
    max-width: 600px; /* Limit button group width */
    margin-left: auto;
    margin-right: auto;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
}

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

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

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

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

.page-blog__btn-secondary--white {
    border-color: #FFFFFF;
    color: #FFFFFF;
}
.page-blog__btn-secondary--white:hover {
    background-color: #FFFFFF;
    color: #017439;
}


/* Posts Section */
.page-blog__posts-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.page-blog__section-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
}

.page-blog__section-title--light {
    color: #FFFFFF;
}

.page-blog__posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.page-blog__post-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have equal height */
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-blog__post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-blog__post-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to fill available space */
    display: flex;
    flex-direction: column;
}

.page-blog__post-title {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 600;
    color: #017439;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 15px;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: #C30808;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

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

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


/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

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

details.page-blog__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
details.page-blog__faq-item summary.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
    display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
    background: #f5f5f5;
}
.page-blog__faq-qtext {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #017439;
}
.page-blog__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 20px;
    width: 32px;
    text-align: center;
    line-height: 1;
}
details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 25px 20px;
    background: #f9f9f9;
    border-radius: 0 0 10px 10px;
    color: #555555;
    font-size: 15px;
}
details.page-blog__faq-item .page-blog__faq-answer p {
    margin: 0;
}

/* Call to Action Section */
.page-blog__call-to-action {
    background-color: #017439; /* Primary brand color */
    padding: 80px 0;
    text-align: center;
}

.page-blog__text--light {
    color: #FFFFFF;
    font-size: clamp(16px, 2vw, 19px);
    max-width: 800px;
    margin: 20px auto 40px auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .page-blog__hero-content-wrapper {
        margin-top: -60px;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Ensure minimal padding-top */
        margin-bottom: 30px;
    }
    .page-blog__hero-image-wrapper {
        max-height: 300px;
    }
    .page-blog__hero-content-wrapper {
        padding: 25px 15px;
        margin-top: -40px;
        border-radius: 8px;
    }
    .page-blog__main-title {
        font-size: clamp(24px, 6vw, 36px);
        margin-bottom: 10px;
    }
    .page-blog__subtitle {
        font-size: clamp(15px, 3.5vw, 18px);
        margin-bottom: 20px;
    }
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 6px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Posts Section */
    .page-blog__posts-section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: clamp(22px, 5vw, 30px);
        margin-bottom: 30px;
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column for posts */
        gap: 20px;
        margin-bottom: 30px;
    }
    .page-blog__post-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__post-content {
        padding: 15px;
    }
    .page-blog__post-title {
        font-size: clamp(16px, 4vw, 20px);
    }
    .page-blog__post-meta {
        font-size: 13px;
    }
    .page-blog__post-excerpt {
        font-size: 14px;
    }
    .page-blog__post-image {
        max-width: 100% !important;
        height: auto !important;
    }
    .page-blog__post-image-wrapper {
        padding-bottom: 60%; /* Adjust aspect ratio for mobile */
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
    }
    .page-blog__faq-qtext {
        font-size: 16px;
    }
    .page-blog__faq-toggle {
        font-size: 24px;
        width: 28px;
        margin-left: 15px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 15px;
        font-size: 14px;
    }

    /* Call to Action Section */
    .page-blog__call-to-action {
        padding: 60px 0;
    }
    .page-blog__text--light {
        font-size: clamp(15px, 3.5vw, 18px);
        margin: 15px auto 30px auto;
    }

    /* General image responsiveness for content area */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__posts-section,
    .page-blog__faq-section,
    .page-blog__call-to-action {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}