/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: var(--bg-color, #FFFFFF);
}

/* 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 */
    text-align: center;
    overflow: hidden;
}

.page-blog__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    color: #FFFFFF; /* Ensure text is visible on potentially dark hero image */
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
    padding: 30px;
    border-radius: 10px;
}

.page-blog__main-title {
    font-size: clamp(2.5em, 5vw, 3.8em); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFFFFF;
}

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

/* Container for content sections */
.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #26A9E0;
}

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

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 60px 0;
    background-color: #FFFFFF;
}

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

.page-blog__post-card {
    background-color: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    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.15);
}

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

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

.page-blog__post-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-blog__post-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: #1a7bb0;
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
}

.page-blog__read-more {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

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

/* Categories Section */
.page-blog__categories {
    padding: 60px 0;
    background-color: #26A9E0; /* Brand color as background */
    color: #FFFFFF; /* White text for contrast */
}

.page-blog__category-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.15); /* Slightly transparent white */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: #FFFFFF;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

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

.page-blog__category-description {
    font-size: 0.95em;
    color: #f0f0f0;
}

/* Featured Article Section */
.page-blog__featured-article {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-blog__featured-card {
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__featured-image {
    width: 100%;
    height: auto;
    max-height: 400px; /* Limit height on larger screens */
    object-fit: cover;
    display: block;
}

.page-blog__featured-content {
    padding: 30px;
}

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

.page-blog__featured-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__featured-title a:hover {
    color: #1a7bb0;
}

.page-blog__featured-meta {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 20px;
}

.page-blog__featured-excerpt {
    font-size: 1.1em;
    color: #444444;
    margin-bottom: 15px;
}

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

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

.page-blog__faq-item {
    background-color: #FFFFFF;
    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;
    font-size: 1.2em;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    list-style: none;
    outline: none;
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #26A9E0;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

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

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

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

.page-blog__faq-answer a {
    color: #26A9E0;
    text-decoration: underline;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background-color: #26A9E0;
    text-align: center;
    color: #FFFFFF;
}

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

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    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; /* Allow text wrapping */
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: #EA7C07; /* Custom color for Login */
    color: #FFFFFF;
    border: 2px solid #EA7C07;
}

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

.page-blog__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #1a7bb0;
    border-color: #1a7bb0;
}

/* General Responsive Adjustments */
@media (min-width: 769px) {
    .page-blog__featured-card {
        flex-direction: row;
        align-items: center;
    }

    .page-blog__featured-image {
        width: 50%;
        height: auto;
        max-height: 100%;
    }

    .page-blog__featured-content {
        width: 50%;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Ensure small top padding */
    }

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

    .page-blog__main-title {
        font-size: clamp(2em, 8vw, 2.8em);
    }

    .page-blog__description {
        font-size: 1em;
    }

    .page-blog__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-blog__container,
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__featured-article,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__post-image {
        height: auto !important; /* Allow height to adjust for smaller screens */
    }

    .page-blog__featured-card {
        flex-direction: column;
    }

    .page-blog__featured-image,
    .page-blog__featured-content {
        width: 100%;
    }

    /* Buttons responsive */
    .page-blog__cta-button,
    .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-direction: column !important; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-blog__faq-item summary {
        font-size: 1.1em;
        padding: 15px;
    }

    .page-blog__faq-answer {
        padding: 0 15px 15px 15px;
    }
}