/* style/blog.css */

/* Custom properties for color scheme */
:root {
    --page-blog-background: #08160F;
    --page-blog-card-bg: #11271B;
    --page-blog-text-main: #F2FFF6;
    --page-blog-text-secondary: #A7D9B8;
    --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-blog-border: #2E7A4E;
    --page-blog-glow: #57E38D;
    --page-blog-gold: #F2C14E;
    --page-blog-divider: #1E3A2A;
    --page-blog-deep-green: #0A4B2C;
    --page-blog-primary-brand: #11A84E; /* Main brand color */
    --page-blog-secondary-brand: #22C768; /* Auxiliary brand color */
}

.page-blog {
    font-family: 'Arial', sans-serif; /* Example font */
    background-color: var(--page-blog-background);
    color: var(--page-blog-text-main); /* Ensure light text on dark background */
    line-height: 1.6;
    font-size: 16px;
}

.page-blog__section {
    padding: 60px 0;
    border-bottom: 1px solid var(--page-blog-divider);
}

.page-blog__section:last-of-type {
    border-bottom: none;
}

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

.page-blog__section-title {
    font-size: 2.5em; /* Not too large, will be responsive */
    font-weight: 700;
    color: var(--page-blog-text-main);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__section-title--light {
    color: var(--page-blog-text-main);
}

.page-blog__section-intro,
.page-blog__section-outro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--page-blog-text-secondary);
}

.page-blog__section-intro--light,
.page-blog__section-outro--light {
    color: var(--page-blog-text-secondary);
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--page-blog-background);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

.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 {
    max-width: 900px;
    text-align: center;
    padding: 0 20px 60px;
    z-index: 1; /* Ensure content is above image if any overlap occurs (though it shouldn't) */
    color: var(--page-blog-text-main);
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
    font-weight: 800;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

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

.page-blog__description--light {
    color: var(--page-blog-text-secondary);
}

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    min-width: 180px;
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--page-blog-button-gradient);
    color: var(--page-blog-text-main); /* White text on dark button */
    border: none;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: var(--page-blog-primary-brand);
    border: 2px solid var(--page-blog-primary-brand);
}

.page-blog__btn-secondary:hover {
    background-color: var(--page-blog-primary-brand);
    color: var(--page-blog-text-main);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 168, 78, 0.4);
}

/* Latest Articles Section */
.page-blog__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-blog__article-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--page-blog-border);
}

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

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

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

.page-blog__card-content {
    padding: 25px;
}

.page-blog__card-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-blog__card-excerpt {
    font-size: 1em;
    color: var(--page-blog-text-secondary);
}

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

/* Categories Section */
.page-blog__categories {
    background-color: var(--page-blog-deep-green); /* Darker green background */
    padding: 80px 0;
}

.page-blog__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.page-blog__category-item {
    background-color: var(--page-blog-primary-brand);
    color: var(--page-blog-text-main);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.page-blog__category-item:hover {
    background-color: var(--page-blog-secondary-brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Expert Insights Section */
.page-blog__expert-insights {
    background-color: var(--page-blog-background);
}

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

.page-blog__insight-item {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--page-blog-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__insight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-blog__insight-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-blog__insight-text {
    font-size: 1em;
    color: var(--page-blog-text-secondary);
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: var(--page-blog-background);
}

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

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg);
    border: 1px solid var(--page-blog-border);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.page-blog__faq-item[open] {
    background-color: var(--page-blog-deep-green);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--page-blog-text-main);
    user-select: none;
    list-style: none; /* Remove default marker */
}

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

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    margin-left: 20px;
    color: var(--page-blog-primary-brand);
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    color: var(--page-blog-text-secondary);
    font-size: 1em;
    line-height: 1.6;
}

/* CTA Banner Section */
.page-blog__cta-banner {
    position: relative;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    background-color: var(--page-blog-deep-green);
}

.page-blog__cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-blog__cta-text {
    max-width: 800px;
    margin-bottom: 40px;
}

.page-blog__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
    z-index: 1;
}

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

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

@media (max-width: 768px) {
    .page-blog__section {
        padding: 40px 0;
    }

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

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

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

    .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;
        padding: 12px 20px;
        font-size: 1em;
    }

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

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

    .page-blog__card-title {
        font-size: 1.2em;
    }

    .page-blog__category-item {
        padding: 8px 15px;
        font-size: 0.9em;
    }

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

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

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

    /* Mobile image responsiveness enforcement */
    .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,
    .page-blog__cta-content,
    .page-blog__hero-content,
    .page-blog__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }

    .page-blog__hero-section {
        padding-top: 10px !important; /* body handles --header-offset, this is just aesthetic */
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.8em;
    }

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        min-width: unset;
    }
}