/* style/blog.css */
/* Body padding-top is handled by shared.css via --header-offset.
   This page should NOT re-apply it to its top-level sections. */

:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background: #08160F;
    --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;
    color: var(--text-main); /* Default text color for the page, light text for dark background */
    background-color: var(--background); /* Main page background */
}

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

.page-blog__hero-content-wrapper {
    position: relative;
    z-index: 2; /* Content above image */
    max-width: 900px;
    width: 100%; /* Ensure it spans full width on desktop */
    margin-bottom: 30px;
}

.page-blog__hero-title {
    font-size: 2.8em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-blog__hero-description {
    font-size: 1.2em;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    margin-top: 30px; /* Space between text and image */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 50px 20px;
    background-color: var(--background);
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Add horizontal padding for content */
    box-sizing: border-box;
}

.page-blog__section-title {
    font-size: 2.2em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-main);
}

.page-blog__text-block {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-align: justify;
}

/* Featured Articles Section */
.page-blog__featured-articles-section {
    padding: 50px 20px;
    background-color: var(--card-bg); /* Darker background for cards section */
}

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

.page-blog__article-card {
    background-color: var(--background); /* Lighter background for individual cards */
    border-radius: 12px;
    overflow: hidden;
    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;
}

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

.page-blog__article-image-wrapper {
    width: 100%;
    height: 225px; /* Fixed height for consistent image size */
    overflow: hidden;
}

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

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

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

.page-blog__article-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

.page-blog__article-title a:hover {
    color: var(--primary-color); /* Use primary color on hover */
}

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

.page-blog__article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: auto; /* Push to bottom */
}

.page-blog__article-date {
    opacity: 0.8;
}

.page-blog__read-more-btn {
    display: inline-block;
    background-image: var(--button-gradient);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.page-blog__read-more-btn:hover {
    opacity: 0.9;
}

.page-blog__archive-link-wrapper {
    text-align: center;
    margin-top: 30px;
}

.page-blog__view-all-btn {
    display: inline-block;
    background-image: var(--button-gradient);
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.page-blog__view-all-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 20px;
    text-align: center;
    background-color: var(--deep-green); /* Use Deep Green for a strong CTA background */
    color: var(--text-main); /* Light text for dark background */
}

.page-blog__cta-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-blog__cta-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    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;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 180px;
    text-align: center;
    box-sizing: border-box; /* Ensure padding/border included in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-blog__btn-primary {
    background-image: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-blog__btn-secondary {
    background-color: #ffffff;
    color: var(--deep-green);
    border: 2px solid var(--deep-green);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background-color: #f0f0f0;
}

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

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

.page-blog__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-main);
}

.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;
    background-color: var(--card-bg);
    color: var(--text-main);
    transition: background-color 0.3s ease;
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

/* For details tag, the default marker needs to be hidden */
.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to become cross */
}
.page-blog__faq-item summary::-webkit-details-marker {
    display: none;
}
.page-blog__faq-item summary {
    list-style: none;
}


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

.page-blog__faq-answer p {
    margin-bottom: 10px;
}
.page-blog__faq-answer p:last-child {
    margin-bottom: 0;
}


/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.4em;
    }
    .page-blog__hero-description {
        font-size: 1.1em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px; /* Still small top padding */
    }
    .page-blog__hero-title {
        font-size: 1.8em;
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__introduction-section,
    .page-blog__featured-articles-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding: 30px 15px;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__cta-title {
        font-size: 1.8em;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 300px; /* Constrain button group width on mobile */
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    .page-blog__article-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__article-image-wrapper {
        height: 180px; /* Adjust image height for mobile cards */
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px 20px;
        font-size: 0.95em;
    }

    /* Mobile image and container responsiveness */
    .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__hero-content-wrapper,
    .page-blog__hero-image-wrapper,
    .page-blog__introduction-section,
    .page-blog__featured-articles-section,
    .page-blog__cta-section,
    .page-blog__faq-section,
    .page-blog__article-grid,
    .page-blog__article-card,
    .page-blog__article-image-wrapper,
    .page-blog__cta-buttons,
    .page-blog__faq-list,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no horizontal scroll */
    }
    .page-blog__hero-section {
        padding-left: 0 !important; /* Hero section can span full width, content wrapper handles padding */
        padding-right: 0 !important;
    }
    .page-blog__hero-content-wrapper {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-blog__archive-link-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__view-all-btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}