: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: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* style/blog.css */

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Default to column for mobile first, then row for desktop */
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background: linear-gradient(180deg, var(--deep-green) 0%, var(--background) 100%); /* Deep Green to Background */
    color: var(--text-main);
    text-align: center;
}

.page-blog__hero-content {
    max-width: 900px;
    margin-bottom: 30px; /* Space between content and image on mobile */
    z-index: 2; /* Ensure content is above image if any overlap */
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

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

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

.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;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--button-gradient); /* Button gradient */
    color: #ffffff; /* White text for contrast */
    border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
    background: #ffffff; /* White background */
    color: var(--primary-color); /* Primary color text */
    border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(17, 168, 78, 0.2);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    margin-top: 30px; /* Space between content and image */
    text-align: center;
    z-index: 1;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    filter: none; /* Ensure no filter is applied */
}

/* Sections */
.page-blog__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
}

.page-blog__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--glow); /* Glow color for underline */
    border-radius: 2px;
}

.page-blog__section-title--light {
    color: var(--text-main); /* For dark sections */
}

.page-blog__content-text {
    max-width: 900px;
    margin: 0 auto 40px auto;
    font-size: 1.05em;
    color: var(--text-secondary);
    text-align: center;
}

/* Latest Posts Section */
.page-blog__latest-posts-section,
.page-blog__categories-section,
.page-blog__faq-section,
.page-blog__final-cta-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

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

.page-blog__post-card {
    background-color: var(--card-bg); /* Card background color */
    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;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no filter is applied */
}

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1; /* Allow title to take available space */
}

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

.page-blog__post-title a:hover {
    color: var(--glow);
}

.page-blog__post-excerpt {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-blog__post-date {
    font-size: 0.85em;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: auto; /* Push date to bottom */
}

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

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

.page-blog__category-card {
    background-color: var(--card-bg);
    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;
    border: 1px solid var(--border);
    text-align: center;
    padding-bottom: 25px;
}

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

.page-blog__category-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
    filter: none; /* Ensure no filter is applied */
}

.page-blog__category-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 0 15px;
}

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

.page-blog__category-title a:hover {
    color: var(--glow);
}

.page-blog__category-description {
    font-size: 0.95em;
    color: var(--text-secondary);
    padding: 0 15px;
}

/* Why Choose Section (Dark Background) */
.page-blog__why-choose-section {
    background-color: var(--deep-green); /* Darker background */
    color: var(--text-main);
    padding: 60px 20px;
    text-align: center;
}

.page-blog__why-choose-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1em;
    color: var(--text-secondary); /* Lighter secondary text for contrast */
}

.page-blog__why-choose-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.page-blog__why-choose-content .page-blog__cta-buttons {
    margin-top: 40px;
}

/* FAQ Section */
.page-blog__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    border: 1px solid var(--divider);
    border-radius: 12px;
    overflow: hidden;
}

.page-blog__faq-item {
    border-bottom: 1px solid var(--divider);
}

.page-blog__faq-item:last-child {
    border-bottom: none;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--text-main);
    background-color: var(--card-bg);
    cursor: pointer;
    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); /* Darker on open */
    color: var(--text-main);
}

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

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

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    color: var(--glow); /* Glow color for open state */
}