/* style/blog.css */

/* Custom Colors */
:root {
    --f8be-primary: #11A84E;
    --f8be-secondary: #22C768;
    --f8be-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --f8be-card-bg: #11271B;
    --f8be-background: #08160F;
    --f8be-text-main: #F2FFF6;
    --f8be-text-secondary: #A7D9B8;
    --f8be-border: #2E7A4E;
    --f8be-glow: #57E38D;
    --f8be-gold: #F2C14E;
    --f8be-divider: #1E3A2A;
    --f8be-deep-green: #0A4B2C;
}

/* General Page Styles */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--f8be-text-main); /* Default text color for dark background */
    background-color: var(--f8be-background); /* Body background is dark */
}

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

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

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--f8be-text-secondary);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__dark-bg {
    background-color: var(--f8be-background);
    color: var(--f8be-text-main);
}

.page-blog__light-bg {
    background-color: var(--f8be-text-main);
    color: var(--f8be-deep-green);
}

.page-blog__dark-text {
    color: var(--f8be-deep-green);
}

.page-blog__card {
    background-color: var(--f8be-card-bg);
    border: 1px solid var(--f8be-border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: var(--f8be-button-gradient);
    color: var(--f8be-text-main);
    border: none;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
    background-color: var(--f8be-primary);
    color: var(--f8be-text-main);
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

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

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 40px;
}

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

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.page-blog__main-title {
    font-size: 3.2em;
    font-weight: 800;
    color: var(--f8be-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: 1.25em;
    color: var(--f8be-text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 80px 0;
}

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

.page-blog__post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.page-blog__post-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.page-blog__post-title {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--f8be-text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

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

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

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: var(--f8be-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: var(--f8be-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: var(--f8be-gold);
}

/* Categories Section */
.page-blog__categories {
    padding: 80px 0;
}

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

.page-blog__category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--f8be-deep-green);
    background-color: var(--f8be-text-main);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 180px;
}

.page-blog__category-card:hover {
    background-color: var(--f8be-primary);
    color: var(--f8be-text-main);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(17, 168, 78, 0.3);
}

.page-blog__category-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    /* Images in categories should remain their original color */
    filter: none; /* Ensure no filter is applied */
}

.page-blog__category-name {
    font-size: 1.2em;
    font-weight: 600;
}

/* Why Choose F8BE Section */
.page-blog__why-choose-f8be {
    padding: 80px 0;
}

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

.page-blog__feature-item {
    text-align: center;
}

.page-blog__feature-title {
    font-size: 1.8em;
    color: var(--f8be-text-main);
    margin-bottom: 15px;
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
}

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

.page-blog__faq-item {
    margin-bottom: 20px;
    background-color: var(--f8be-text-main);
    color: var(--f8be-deep-green);
    border: 1px solid var(--f8be-border);
    border-radius: 12px;
    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: 600;
    cursor: pointer;
    list-style: none; /* Remove default marker */
    color: var(--f8be-deep-green);
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: 2.8em;
    }

    .page-blog__description {
        font-size: 1.1em;
    }
}

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

    .page-blog__main-title {
        font-size: 2.2em;
    }

    .page-blog__description {
        font-size: 1em;
    }

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-blog__section-title {
        font-size: 2em;
    }

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

    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__why-choose-f8be,
    .page-blog__faq-section {
        padding: 50px 0;
    }

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

    .page-blog__post-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .page-blog__category-card {
        min-height: 150px;
        padding: 15px;
    }

    .page-blog__category-icon {
        width: 60px;
        height: 60px;
    }

    .page-blog__category-name {
        font-size: 1.1em;
    }

    .page-blog__features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-blog__feature-title {
        font-size: 1.5em;
    }

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

    /* Mobile image 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-section,
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__why-choose-f8be,
    .page-blog__faq-section,
    .page-blog__hero-image-wrapper,
    .page-blog__post-grid,
    .page-blog__category-grid,
    .page-blog__features-grid,
    .page-blog__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.8em;
    }

    .page-blog__section-title {
        font-size: 1.8em;
    }

    .page-blog__post-title {
        font-size: 1.4em;
    }

    .page-blog__faq-item summary {
        font-size: 1em;
    }
}