/* style/blog.css */

/* Variables from custom palette */
:root {
    --page-blog-card-bg: #11271B;
    --page-blog-background: #08160F;
    --page-blog-text-main: #F2FFF6;
    --page-blog-text-secondary: #A7D9B8;
    --page-blog-border: #2E7A4E;
    --page-blog-glow: #57E38D;
    --page-blog-gold: #F2C14E;
    --page-blog-divider: #1E3A2A;
    --page-blog-deep-green: #0A4B2C;
    --page-blog-btn-gradient-start: #2AD16F;
    --page-blog-btn-gradient-end: #13994A;
}

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: var(--page-blog-text-main); /* Default text color for dark background */
    background-color: var(--page-blog-background); /* Default background from palette */
    line-height: 1.6;
}

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

.page-blog__section-title {
    font-size: clamp(28px, 3.5vw, 48px); /* Responsive font size, not too large */
    font-weight: 700;
    color: var(--page-blog-text-main);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-blog__main-title {
    font-size: clamp(32px, 4.5vw, 58px); /* Responsive font size for H1 */
    font-weight: 800;
    color: var(--page-blog-text-main);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__description {
    font-size: clamp(16px, 1.8vw, 20px);
    color: var(--page-blog-text-secondary);
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__text-block {
    font-size: 17px;
    margin-bottom: 20px;
    color: var(--page-blog-text-main);
}

.page-blog__text-block a {
    color: var(--page-blog-glow);
    text-decoration: underline;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding: 60px 0; /* Adjusted for body padding-top */
    padding-top: 10px; /* Small top padding for visual spacing */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--page-blog-deep-green);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.page-blog__hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Buttons */
.page-blog__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.page-blog__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow word breaking */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, var(--page-blog-btn-gradient-start) 0%, var(--page-blog-btn-gradient-end) 100%);
    color: #ffffff; /* Always white for primary buttons */
    border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
    background: #ffffff;
    color: var(--page-blog-deep-green); /* Use deep green for contrast */
    border: 2px solid var(--page-blog-deep-green);
}

.page-blog__btn-secondary:hover {
    background: var(--page-blog-deep-green);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background for contrast */
    color: #333333; /* Dark text for light background */
}

.page-blog__introduction-section .page-blog__section-title,
.page-blog__introduction-section .page-blog__text-block {
    color: #333333;
}

.page-blog__introduction-section .page-blog__text-block a {
    color: var(--page-blog-deep-green);
}

.page-blog__image-full-width {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-top: 40px;
}

.page-blog__image-margin-top {
    margin-top: 40px;
}

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

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

.page-blog__category-card {
    background-color: var(--page-blog-card-bg);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--page-blog-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}

.page-blog__card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
}

.page-blog__card-text {
    font-size: 16px;
    color: var(--page-blog-text-secondary);
    margin-bottom: 25px;
    flex-grow: 1;
}

.page-blog__category-card .page-blog__btn-secondary {
    width: auto; /* Override max-width: 100% for desktop */
    align-self: center;
}

/* Featured Posts Section */
.page-blog__featured-posts {
    padding: 60px 0;
    background-color: #f5f5f5; /* Light background for contrast */
    color: #333333; /* Dark text for light background */
}

.page-blog__featured-posts .page-blog__section-title,
.page-blog__featured-posts .page-blog__text-block {
    color: #333333;
}

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

.page-blog__post-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

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

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

.page-blog__card-date {
    font-size: 14px;
    color: #777777;
    margin-bottom: 10px;
}

.page-blog__post-card .page-blog__card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #333333;
}

.page-blog__post-card .page-blog__card-title a {
    color: #333333;
    text-decoration: none;
}

.page-blog__post-card .page-blog__card-title a:hover {
    color: var(--page-blog-deep-green);
}

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

.page-blog__link-read-more {
    color: var(--page-blog-deep-green);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: auto;
}

.page-blog__link-read-more:hover {
    text-decoration: underline;
}

.page-blog__cta-area {
    text-align: center;
    margin-top: 50px;
}

/* Benefits Section */
.page-blog__benefits-section {
    padding: 60px 0;
    background-color: var(--page-blog-deep-green);
    color: var(--page-blog-text-main);
}

.page-blog__benefit-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-blog__benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: var(--page-blog-card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--page-blog-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__benefit-icon {
    font-size: 30px;
    color: var(--page-blog-gold);
    flex-shrink: 0;
}

.page-blog__benefit-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 10px;
}

.page-blog__benefit-text {
    font-size: 16px;
    color: var(--page-blog-text-secondary);
}

.page-blog__benefit-text a {
    color: var(--page-blog-glow);
    text-decoration: underline;
}

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

.page-blog__faq-section .page-blog__section-title {
    color: #333333;
}

.page-blog__faq-list {
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.page-blog__faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    list-style: none; /* For details/summary */
}

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

.page-blog__faq-toggle {
    font-size: 24px;
    font-weight: 700;
    color: var(--page-blog-deep-green);
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Plus sign rotates to X or minus */
}

.page-blog__faq-answer {
    font-size: 16px;
    color: #555555;
    padding-top: 15px;
    line-height: 1.6;
}

.page-blog__faq-answer p {
    margin-bottom: 10px;
    color: #555555;
}

.page-blog__faq-answer a {
    color: var(--page-blog-deep-green);
    text-decoration: underline;
}

/* Final CTA Section */
.page-blog__cta-final-section {
    padding: 60px 0;
    background-color: var(--page-blog-deep-green);
    text-align: center;
}

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

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

    .page-blog__hero-image-wrapper {
        max-height: 300px;
        margin-bottom: 20px;
    }

    .page-blog__main-title {
        font-size: clamp(28px, 8vw, 40px);
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: clamp(15px, 4vw, 18px);
        margin-bottom: 25px;
    }

    .page-blog__section-title {
        font-size: clamp(24px, 7vw, 36px);
        margin-bottom: 30px;
    }

    .page-blog__text-block {
        font-size: 16px;
    }

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

    .page-blog__cta-button {
        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: 16px;
    }

    .page-blog__container {
        padding: 0 15px;
    }

    .page-blog__introduction-section,
    .page-blog__categories-section,
    .page-blog__featured-posts,
    .page-blog__benefits-section,
    .page-blog__faq-section,
    .page-blog__cta-final-section {
        padding: 40px 0;
    }

    .page-blog__image-full-width,
    .page-blog__image-margin-top {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        margin-top: 30px;
    }

    .page-blog__category-grid,
    .page-blog__post-grid,
    .page-blog__benefit-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__category-card,
    .page-blog__post-card,
    .page-blog__benefit-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px;
    }

    .page-blog__card-image {
        height: 180px; /* Adjust height for mobile */
    }

    .page-blog__post-card .page-blog__card-title {
        font-size: 18px;
    }

    .page-blog__card-text {
        font-size: 14px;
    }

    .page-blog__faq-question {
        font-size: 16px;
    }

    .page-blog__faq-answer {
        font-size: 15px;
    }

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

    /* Ensure all video containers are responsive */
    .page-blog video,
    .page-blog__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

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