/* style/blog.css */

/* Base styles for the blog page, assuming body has a dark background from shared.css */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #FFF5E1; /* Text Main */
    background-color: transparent; /* Rely on body background from shared.css */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding as body handles --header-offset */
    overflow: hidden; /* Ensure content doesn't overflow */
    box-sizing: border-box;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    filter: brightness(0.6); /* Slightly darken image for text readability, not changing color */
    min-width: 200px;
    min-height: 200px;
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #FFF5E1; /* Text Main */
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFF5E1; /* Text Main */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Enhance readability on image */
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #FFF5E1; /* Text Main */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Enhance readability on image */
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container doesn't overflow */
    box-sizing: border-box;
    padding: 0 15px; /* Add padding for buttons on small screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Button responsive */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button Gold */
    color: #7A0E0E; /* Deep Red for contrast on gold */
    border: none;
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: #FFF5E1; /* Text Main */
    border: 2px solid #F2B544; /* Border Gold */
}

.page-blog__btn-secondary:hover {
    background: #F2B544; /* Border Gold */
    color: #7A0E0E; /* Deep Red for contrast */
    transform: translateY(-2px);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    background-color: #B71C1C; /* Background Deep Red */
    padding: 80px 20px;
    text-align: center;
}

.page-blog__container {
    width: 100%; /* Ensure container takes full width */
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-blog__section-title {
    font-size: clamp(1.8em, 3vw, 2.8em);
    color: #FFF5E1; /* Text Main */
    margin-bottom: 20px;
    font-weight: 700;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__post-card {
    background-color: #D32F2F; /* Card BG Dark Red */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    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(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

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

.page-blog__post-content {
    padding: 25px;
    flex-grow: 1; /* Allow content to fill remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-blog__post-title {
    font-size: 1.4em;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.page-blog__post-meta {
    font-size: 0.9em;
    color: #FFCC66; /* Glow Light Gold */
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 1em;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to grow */
}

.page-blog__read-more {
    display: inline-block;
    color: #F4D34D; /* Gold */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #FFD86A; /* Lighter Gold */
}

.page-blog__view-all {
    margin-top: 30px;
}

/* Categories Section */
.page-blog__categories {
    background-color: #7A0E0E; /* Deep Red */
    padding: 80px 20px;
    text-align: center;
}

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

.page-blog__category-card {
    background-color: #C91F17; /* Primary Deep Red */
    border-radius: 10px;
    padding: 30px;
    text-decoration: none;
    color: #FFF5E1; /* Text Main */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 180px; /* Ensure cards have some height */
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    background-color: #E53935; /* Secondary Red */
}

.page-blog__category-title {
    font-size: 1.5em;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 10px;
    font-weight: 600;
}

.page-blog__category-description {
    font-size: 0.95em;
    color: #FFCC66; /* Glow Light Gold */
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: #B71C1C; /* Background Deep Red */
    padding: 80px 20px;
}

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

.page-blog__faq-item {
    background-color: #D32F2F; /* Card BG Dark Red */
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFF5E1; /* Text Main */
    cursor: pointer;
    background-color: #D32F2F; /* Card BG Dark Red */
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: #E53935; /* Secondary Red */
}

.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: #E53935; /* Secondary Red when open */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #F4D34D; /* Gold */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: '−'; /* Change to minus when open */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #FFF5E1; /* Text Main */
}

.page-blog__faq-answer p {
    margin: 0;
    color: #FFF5E1; /* Text Main */
}

/* Details element specific styling */
.page-blog__faq-item summary {
    list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker,
.page-blog__faq-item summary::marker {
    display: none; /* Hide marker for webkit and standard */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-blog__section-title {
        font-size: clamp(1.6em, 4vw, 2.5em);
    }
}

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

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    .page-blog__hero-content {
        padding: 0 10px;
    }

    .page-blog__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 1.1em;
        margin-bottom: 25px;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-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__latest-posts,
    .page-blog__categories,
    .page-blog__faq-section {
        padding: 50px 15px;
    }

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

    .page-blog__post-image {
        height: 200px; /* Adjust height for mobile */
        min-width: 200px !important;
        min-height: 200px !important;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__post-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }

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

    .page-blog__category-card {
        padding: 25px;
        min-height: 150px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__faq-question {
        font-size: 1.1em;
        padding: 18px 20px;
    }

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

    /* Ensure all images inside page-blog are responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__video-section {
        padding-top: 10px !important;
    }
}

/* No CSS filters allowed for images */
.page-blog img {
    filter: none; /* Explicitly ensure no filters are applied */
}