/* style/blog.css */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --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;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

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

.page-blog__light-bg {
    background-color: #ffffff;
    color: #333333;
}

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

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
    overflow: hidden;
    background-color: var(--background-color);
}

.page-blog__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.3; /* Make it a background texture */
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-blog__main-title {
    color: var(--gold-color);
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.6);
    /* No fixed font-size for H1 */
}

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

.page-blog__hero-cta-button {
    display: inline-block;
    background: var(--button-gradient);
    color: var(--text-main);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

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

/* Section common styles */
.page-blog__section-title {
    font-size: 2.2em;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
    text-shadow: 0 0 5px rgba(242, 193, 78, 0.4);
}

.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;
}

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

.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 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

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

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

.page-blog__post-content {
    padding: 20px;
}

.page-blog__post-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    min-height: 70px; /* Ensure consistent height for titles */
}

.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;
    min-height: 90px; /* Ensure consistent height for excerpts */
}

.page-blog__read-more-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
    background-color: var(--secondary-color);
}

.page-blog__view-all-posts, .page-blog__view-all-news {
    text-align: center;
    margin-top: 20px;
}

.page-blog__view-all-button {
    display: inline-block;
    background: var(--deep-green);
    color: var(--text-main);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-blog__view-all-button:hover {
    background-color: var(--primary-color);
}

/* Featured Categories Section */
.page-blog__featured-categories-section {
    padding: 60px 0;
}

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

.page-blog__category-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

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

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

.page-blog__category-title {
    font-size: 1.5em;
    margin-top: 15px;
    color: var(--gold-color);
}

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

/* Guides & Strategies Section */
.page-blog__guides-strategies-section {
    padding: 60px 0;
}

.page-blog__guide-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 900px;
}

.page-blog__guide-item {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.page-blog__guide-item a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1em;
    display: block;
    transition: color 0.3s ease;
}

.page-blog__guide-item a:hover {
    color: var(--gold-color);
}

/* News & Updates Section */
.page-blog__news-updates-section {
    padding: 60px 0;
}

.page-blog__news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.page-blog__news-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

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

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

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

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

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

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

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

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

.page-blog__faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--gold-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.page-blog__faq-item .page-blog__faq-toggle {
    font-size: 1.5em;
    margin-left: 10px;
    color: var(--primary-color);
}

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

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

/* Call to Action Section (Footer CTA) */
.page-blog__cta-section {
    padding: 60px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.page-blog__cta-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.2;
}

.page-blog__cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__post-grid, .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__hero-content, .page-blog__cta-content {
        padding: 30px 15px;
    }

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

    .page-blog__section-title {
        font-size: 1.8em;
        padding-top: 30px;
    }

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

    .page-blog__post-grid, .page-blog__category-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__post-image {
        height: 200px;
    }

    .page-blog__post-title {
        font-size: 1.2em;
        min-height: auto;
    }
    
    .page-blog__post-excerpt {
        min-height: auto;
    }

    .page-blog__category-title {
        font-size: 1.3em;
    }

    .page-blog__guide-item a, .page-blog__news-title a {
        font-size: 1em;
    }

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

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

    /* Mobile image responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__hero-section,
    .page-blog__latest-posts-section,
    .page-blog__featured-categories-section,
    .page-blog__guides-strategies-section,
    .page-blog__news-updates-section,
    .page-blog__faq-section,
    .page-blog__cta-section,
    .page-blog__container,
    .page-blog__post-card,
    .page-blog__category-card,
    .page-blog__guide-item,
    .page-blog__news-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden;
    }

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

    /* Button responsiveness */
    .page-blog__hero-cta-button,
    .page-blog__read-more-button,
    .page-blog__view-all-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}