/* style/blog.css */

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

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--background-color);
}

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

.page-blog__section-title {
    font-size: clamp(2em, 5vw, 2.8em);
    font-weight: 700;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small decorative top padding, body handles header offset */
    background-color: var(--deep-green);
    overflow: hidden;
}

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

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

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

.page-blog__main-title {
    font-size: clamp(2.5em, 6vw, 3.5em);
    font-weight: 800;
    color: var(--gold-color);
    margin-bottom: 20px;
    line-height: 1.1;
}

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

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
}

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

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

.page-blog__btn-secondary:hover {
    background: var(--gold-color);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__post-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    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;
    height: 100%;
    border: 1px solid var(--border-color);
}

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

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

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

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

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

.page-blog__card-title a:hover {
    color: var(--gold-color);
}

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

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

.page-blog__read-more {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

.page-blog__view-all {
    text-align: center;
}

/* About Blog Section */
.page-blog__about-blog {
    padding: 80px 0;
    background-color: var(--deep-green);
    color: var(--text-main);
}

/* Categories Section */
.page-blog__categories {
    padding: 80px 0;
    background-color: var(--background-color);
    color: var(--text-main);
}

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

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

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

.page-blog__category-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 20px auto;
    display: block;
}

.page-blog__category-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 10px;
}

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

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

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

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

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

.page-blog__benefit-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.page-blog__benefit-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 15px;
}

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

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: var(--background-color);
    color: var(--text-main);
    text-align: center;
}

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

.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: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-item summary {
    display: block;
    padding: 20px 25px;
    cursor: pointer;
    outline: none;
    position: relative;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

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

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

.page-blog__faq-qtext {
    display: inline-block;
    margin-right: 30px; /* Space for toggle icon */
}

.page-blog__faq-toggle {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    line-height: 1;
    color: var(--gold-color);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: '−'; /* Changed by JS for better control */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__container {
        padding: 0 15px;
    }
    .page-blog__hero-content {
        padding: 15px;
    }
    .page-blog__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-blog__hero-description {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .page-blog__section-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }
    .page-blog__section-description {
        font-size: 1em;
    }

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }

    .page-blog__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__main-title {
        font-size: clamp(2em, 8vw, 2.5em);
    }

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

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

    .page-blog__post-grid,
    .page-blog__category-grid,
    .page-blog__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__post-thumbnail,
    .page-blog__category-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 200px !important; /* Ensure min size */
        object-fit: cover;
    }

    .page-blog__post-card,
    .page-blog__category-card,
    .page-blog__benefits-section,
    .page-blog__cta-section,
    .page-blog__faq-section,
    .page-blog__latest-posts,
    .page-blog__about-blog {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-height: 200px; /* Enforce min height for content images */
    }

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

    .page-blog__faq-toggle {
        right: 20px;
        font-size: 1.2em;
    }

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

@media (max-width: 480px) {
    .page-blog__hero-section {
        padding: 30px 10px;
        padding-top: 10px !important;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 9vw, 2.2em);
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .page-blog__post-grid,
    .page-blog__category-grid,
    .page-blog__benefits-grid {
        gap: 15px;
    }
}