:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --bg-color: #08160F; /* Custom Background */
    --card-bg: #11271B; /* Custom Card BG */
    --text-main: #F2FFF6; /* Custom Text Main */
    --text-secondary: #A7D9B8; /* Custom Text Secondary */
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom Button */
    --border-color: #2E7A4E; /* Custom Border */
    --glow-color: #57E38D; /* Custom Glow */
    --gold-color: #F2C14E; /* Custom Gold */
    --divider-color: #1E3A2A; /* Custom Divider */
    --deep-green-color: #0A4B2C; /* Custom Deep Green */
}

/* Base styles for the blog page */
.page-blog {
    background-color: var(--bg-color); /* Dark background */
    color: var(--text-main); /* Light text for dark background */
    font-family: 'Arial', sans-serif;
    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: 2.5em;
    font-weight: bold;
    color: var(--gold-color); /* Use gold for main titles */
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.page-blog__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--button-gradient);
    border-radius: 2px;
}

.page-blog__section-intro {
    font-size: 1.1em;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

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

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
    margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative; /* Ensure content is above image but not overlapping */
}

.page-blog__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Flexible font size for H1 */
    font-weight: 700;
    color: var(--text-main); /* Light text for dark background */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.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;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Break long words */
    min-width: 180px; /* Ensure a minimum width for buttons */
}

.page-blog__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

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

.page-blog__btn-secondary:hover {
    background-color: var(--gold-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
    padding: 80px 0;
    background-color: var(--card-bg); /* Use card background for this section */
    color: var(--text-main);
}

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

.page-blog__post-card {
    background-color: var(--bg-color); /* Darker background for individual cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
}

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

.page-blog__post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
}

.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(--gold-color);
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Allows excerpt to take available space */
}

.page-blog__read-more {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start; /* Align to the start of the flex container */
}

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

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

/* Categories Section */
.page-blog__categories-section {
    padding: 80px 0;
    background-color: var(--deep-green-color); /* Use deep green for categories */
    color: var(--text-main);
}

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

.page-blog__category-card {
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px; /* Ensure minimum height for cards */
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
}

.page-blog__category-icon {
    width: 100px; /* Ensure icons are not too small */
    height: 75px; /* Maintain aspect ratio or set specific dimensions */
    object-fit: contain;
    margin-bottom: 15px;
}

.page-blog__category-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
}

/* Why Choose Us Section */
.page-blog__why-choose-us {
    padding: 80px 0;
    background-color: var(--card-bg);
    color: var(--text-main);
}

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

.page-blog__feature-item {
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 300px; /* Ensure minimum height for feature items */
}

.page-blog__feature-icon {
    width: 150px; /* Ensure icons are not too small */
    height: 100px; /* Maintain aspect ratio or set specific dimensions */
    object-fit: contain;
    margin-bottom: 20px;
}

.page-blog__feature-title {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--gold-color);
    margin-bottom: 15px;
}

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

.page-blog__cta-wrapper {
    text-align: center;
    margin-top: 60px;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: var(--deep-green-color);
    color: var(--text-main);
}

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

.page-blog__faq-item {
    background-color: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

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

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: normal;
    color: var(--gold-color);
    margin-left: 15px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-blog__posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-blog__categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .page-blog__features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

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

    .page-blog__hero-section,
    .page-blog__latest-posts-section,
    .page-blog__categories-section,
    .page-blog__why-choose-us,
    .page-blog__faq-section {
        padding: 40px 0;
    }

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

    .page-blog__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 12px 25px;
        font-size: 0.9em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-bottom: 10px; /* For stacked buttons */
    }

    .page-blog__hero-content .page-blog__btn-primary {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .page-blog__posts-grid,
    .page-blog__categories-grid,
    .page-blog__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__post-image-wrapper {
        height: 180px;
    }

    /* Mobile image responsive rules */
    .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__post-card,
    .page-blog__category-card,
    .page-blog__feature-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .page-blog__faq-item summary {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }

    /* Button Group specific mobile adaptation */
    .page-blog__cta-wrapper {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    .page-blog__cta-wrapper .page-blog__btn-primary,
    .page-blog__cta-wrapper .page-blog__btn-secondary {
        width: 100% !important; 
        margin: 0; /* Remove default margin for stacking */
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__main-title {
        font-size: clamp(1.6em, 7vw, 2.2em);
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
    .page-blog__category-title {
        font-size: 1em;
    }
    .page-blog__feature-title {
        font-size: 1.3em;
    }
    .page-blog__faq-item summary {
        padding: 12px 15px;
        font-size: 1em;
    }
    .page-blog__faq-answer {
        padding: 0 15px 12px;
    }
}