/* style/blog.css */

/* --- Base Styles for .page-blog --- */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: var(--Text-Main, #F2FFF6); /* Default text color for dark background */
    background-color: var(--Background, #08160F); /* Page background color */
    line-height: 1.6;
}

.page-blog__section {
    padding: 60px 20px;
    margin-bottom: 0; /* Ensure no extra margin between sections */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--Text-Main, #F2FFF6);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--Text-Secondary, #A7D9B8);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* --- Hero Section --- */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px; /* Minimum height for hero */
    padding-top: 10px; /* Small top padding as body handles --header-offset */
    overflow: hidden; /* To contain the image */
}

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

.page-blog__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* Darken image for text readability */
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text */
    border-radius: 10px;
}

.page-blog__main-title {
    font-weight: 700;
    color: var(--Text-Main, #F2FFF6);
    margin-bottom: 20px;
    line-height: 1.2;
    /* Using clamp for H1 font-size */
    font-size: clamp(2.5rem, 5vw, 3.5rem); 
}

.page-blog__description {
    font-size: 1.15em;
    color: var(--Text-Secondary, #A7D9B8);
    margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    max-width: 100%; /* Ensure button does not overflow */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: var(--Text-Main, #F2FFF6);
    border: 2px solid transparent;
}

.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: transparent;
    color: var(--Glow, #57E38D);
    border: 2px solid var(--Glow, #57E38D);
}

.page-blog__btn-secondary:hover {
    background: var(--Glow, #57E38D);
    color: var(--Background, #08160F);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(87, 227, 141, 0.3);
}

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

.page-blog__article-card {
    background-color: var(--Card-B-G, #11271B); /* Card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--Text-Main, #F2FFF6);
}

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

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

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

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

.page-blog__article-title a {
    color: var(--Text-Main, #F2FFF6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: var(--Glow, #57E38D);
}

.page-blog__article-meta {
    font-size: 0.9em;
    color: var(--Text-Secondary, #A7D9B8);
    margin-bottom: 15px;
}

.page-blog__article-snippet {
    font-size: 1em;
    color: var(--Text-Secondary, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow snippet to take available space */
}

.page-blog__read-more-link {
    color: var(--Glow, #57E38D);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.page-blog__read-more-link:hover {
    color: var(--Gold, #F2C14E);
}

.page-blog__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-blog__read-more-link:hover .page-blog__arrow {
    transform: translateX(5px);
}

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

/* --- Categories Section --- */
.page-blog__categories {
    background-color: var(--Deep-Green, #0A4B2C); /* Darker background for contrast */
    padding: 80px 20px;
}

.page-blog__categories .page-blog__section-title {
    color: var(--Text-Main, #F2FFF6);
}

.page-blog__categories .page-blog__section-description {
    color: var(--Text-Secondary, #A7D9B8);
}

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

.page-blog__category-item {
    background-color: var(--Border, #2E7A4E);
    color: var(--Text-Main, #F2FFF6);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap; /* Keep category items on one line */
}

.page-blog__category-item:hover {
    background-color: var(--Glow, #57E38D);
    color: var(--Background, #08160F);
}

/* --- Featured Article Section --- */
.page-blog__featured-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.page-blog__featured-image-wrapper {
    flex: 1;
    min-width: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

.page-blog__featured-text {
    flex: 2;
    color: var(--Text-Main, #F2FFF6);
}

.page-blog__featured-text .page-blog__article-title {
    font-size: 2em;
    margin-top: 0;
}

.page-blog__featured-text .page-blog__article-title a {
    color: var(--Text-Main, #F2FFF6);
}

.page-blog__article-text {
    margin-bottom: 15px;
    font-size: 1.05em;
    color: var(--Text-Secondary, #A7D9B8);
}

/* --- Why Choose Section --- */
.page-blog__why-choose {
    background-color: var(--Card-B-G, #11271B); /* Slightly different dark background */
    padding: 80px 20px;
}

.page-blog__why-choose .page-blog__section-title {
    color: var(--Text-Main, #F2FFF6);
}

.page-blog__why-choose .page-blog__section-description {
    color: var(--Text-Secondary, #A7D9B8);
}

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

.page-blog__advantage-item {
    text-align: center;
    background-color: var(--Background, #08160F); /* Even darker background for items */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-blog__advantage-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px var(--Glow, #57E38D)); /* Add a subtle glow */
}

.page-blog__advantage-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--Glow, #57E38D);
    margin-bottom: 15px;
}

.page-blog__advantage-text {
    font-size: 1em;
    color: var(--Text-Secondary, #A7D9B8);
}

/* --- FAQ Section --- */
.page-blog__faq-section {
    background-color: var(--Background, #08160F);
}

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

.page-blog__faq-item {
    background-color: var(--Card-B-G, #11271B);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: var(--Text-Main, #F2FFF6);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    color: var(--Text-Main, #F2FFF6);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: var(--Deep-Green, #0A4B2C);
    border-bottom: 1px solid var(--Divider, #1E3A2A);
    border-radius: 8px 8px 0 0;
}

.page-blog__faq-question::-webkit-details-marker { /* Hide default marker for Chrome */
    display: none;
}
.page-blog__faq-question::marker { /* Hide default marker for Firefox */
    display: none;
}

.page-blog__faq-question:hover {
    background-color: var(--Divider, #1E3A2A);
}

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

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--Text-Secondary, #A7D9B8);
}

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


/* --- CTA Section --- */
.page-blog__cta-section {
    background-color: var(--Deep-Green, #0A4B2C);
    padding: 80px 20px;
}

.page-blog__cta-section .page-blog__section-title {
    color: var(--Text-Main, #F2FFF6);
}

.page-blog__cta-section .page-blog__section-description {
    color: var(--Text-Secondary, #A7D9B8);
    margin-bottom: 40px;
}

.page-blog__text-center {
    text-align: center;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__hero-content {
        padding: 30px 15px;
    }

    .page-blog__main-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

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

    .page-blog__featured-image-wrapper {
        min-width: unset;
        width: 100%;
        max-width: 800px;
        margin-bottom: 30px;
    }
}

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

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

    .page-blog__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    /* Images responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__hero-image {
        height: 100% !important; /* Ensure hero image covers height */
    }

    /* Card and container responsiveness */
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-content,
    .page-blog__featured-image-wrapper,
    .page-blog__advantage-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
    
    /* Buttons responsiveness */
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .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; /* Adjust padding for full width buttons */
        padding-right: 15px;
    }

    .page-blog__article-image {
        height: 200px; /* Adjust height for mobile cards */
    }

    .page-blog__featured-text .page-blog__article-title {
        font-size: 1.5em;
    }

    .page-blog__advantage-icon {
        width: 80px;
        height: 80px;
    }

    .page-blog__advantage-title {
        font-size: 1.3em;
    }

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

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

@media (max-width: 480px) {
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    .page-blog__description {
        font-size: 1em;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        font-size: 0.95em;
        padding: 12px 20px;
    }
}