/* style/blog.css */

/* Custom Colors */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --btn-gradient-start: #2AD16F;
    --btn-gradient-end: #13994A;
    --card-bg: #11271B;
    --bg-color: #08160F; /* This will be overridden by shared.css body background, but useful for internal components */
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for the page, assuming dark body background */
    background-color: var(--bg-color); /* Fallback, actual body background is from shared.css */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--bg-color);
    padding-bottom: 60px; /* Added bottom padding */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    position: relative;
    z-index: 1;
    margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit height for hero image */
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 800px;
}

.page-blog__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size for H1 */
    color: var(--gold-color);
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.05em;
    box-sizing: border-box; /* Ensure padding is included in width */
    text-align: center;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: var(--text-main);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 60px 0;
    background-color: var(--card-bg); /* Darker background for this section */
    color: var(--text-main);
}

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

.page-blog__post-card {
    background-color: var(--deep-green); /* Slightly lighter dark for cards */
    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;
}

.page-blog__post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-blog__card-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    overflow: hidden;
}

.page-blog__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__card-image {
    transform: scale(1.05);
}

.page-blog__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-blog__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: bold;
}

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

.page-blog__card-title a:hover {
    color: var(--gold-color);
}

.page-blog__card-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-blog__card-excerpt {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

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

.page-blog__read-more:hover {
    color: var(--gold-color);
    text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--bg-color);
}

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

.page-blog__category-card {
    background-color: var(--deep-green);
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

.page-blog__category-image {
    width: 100px; /* Smaller images for categories */
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.page-blog__category-card:hover .page-blog__category-image {
    transform: scale(1.1);
}

.page-blog__category-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
}

/* Featured Article Section */
.page-blog__featured-article {
    padding: 60px 0;
    background-color: var(--card-bg); /* Use card-bg for contrast */
    color: var(--text-main);
}

.page-blog__featured-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-blog__featured-image-wrapper {
    flex: 1;
    min-width: 400px; /* Minimum width for the image */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-blog__featured-text {
    flex: 1.5;
}

.page-blog__featured-title {
    font-size: 2em;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

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

.page-blog__featured-title a:hover {
    color: var(--gold-color);
}

.page-blog__featured-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.page-blog__featured-excerpt {
    font-size: 1.05em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--bg-color);
}

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

.page-blog__faq-item {
    background-color: var(--deep-green);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

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

.page-blog__faq-item summary::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: var(--divider-color);
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--primary-color);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−"; /* Update content for open state via JS */
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary);
    border-top: 1px solid var(--divider-color);
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--card-bg);
    color: var(--text-main);
}

.page-blog__cta-section .page-blog__section-title {
    margin-bottom: 20px;
}

.page-blog__cta-section .page-blog__description {
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-image {
        max-height: 400px;
    }

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

    .page-blog__featured-content {
        flex-direction: column;
        text-align: center;
    }

    .page-blog__featured-image-wrapper {
        min-width: unset;
        width: 80%; /* Adjust width for smaller screens */
        margin-bottom: 30px;
    }
}

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

    .page-blog__hero-section {
        padding-bottom: 40px;
    }

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

    .page-blog__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

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

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1em;
    }

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

    .page-blog__card-image-wrapper {
        height: 180px;
    }

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

    .page-blog__category-image {
        width: 80px;
        height: 60px;
    }

    .page-blog__featured-article {
        padding: 40px 0;
    }

    .page-blog__featured-image-wrapper {
        width: 90%;
    }

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

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

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

    .page-blog__hero-image-wrapper,
    .page-blog__card-image-wrapper,
    .page-blog__featured-image-wrapper,
    .page-blog__category-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Ensure no overflow */
    }

    .page-blog__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__latest-posts,
    .page-blog__categories-section,
    .page-blog__featured-article,
    .page-blog__faq-section,
    .page-blog__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Ensure content area images are not too small */
.page-blog__post-card .page-blog__card-image,
.page-blog__featured-article .page-blog__featured-image {
    min-width: 200px;
    min-height: 200px;
}
/* Override min-height for specific card images if they are intentionally smaller (like category cards) */
.page-blog__category-card .page-blog__category-image {
    min-width: unset; /* Allow smaller width for category images */
    min-height: unset; /* Allow smaller height for category images */
}

/* Image filter restriction check */
.page-blog img {
    filter: none !important; /* Absolutely no filters */
}