/* style/blog.css */
: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-color: #0A4B2C;
}

/* Body background is default white from shared.css, so use dark text for light sections */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default for dark sections */
}

.page-blog__section {
    padding: 60px 0;
    position: relative;
}

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

/* HERO Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-color); /* Dark background for hero */
    color: var(--text-main);
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for aesthetic */
    overflow: hidden;
}

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

.page-blog__hero-content {
    position: relative;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

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

.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;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

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

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

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

/* Intro Section */
.page-blog__intro-section {
    background-color: #ffffff;
    color: #333333; /* Dark text on light background */
}

.page-blog__section-title {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.page-blog__text-block {
    font-size: 1.05em;
    margin-bottom: 20px;
    text-align: justify;
    color: #333333;
}

/* Why Follow Section */
.page-blog__why-follow-section {
    background-color: var(--background-color);
    color: var(--text-main);
}

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

.page-blog__feature-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.page-blog__feature-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

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

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

/* Categories Section */
.page-blog__categories-section {
    background-color: #ffffff;
    color: #333333;
}

.page-blog__category-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-blog__category-list li {
    background-color: #f9f9f9;
    border-left: 5px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 1.05em;
    color: #333333;
}

.page-blog__category-list li a {
    color: var(--deep-green-color);
    text-decoration: none;
    font-weight: 600;
}

.page-blog__category-list li a:hover {
    text-decoration: underline;
}

/* Featured Articles Section */
.page-blog__featured-articles {
    background-color: var(--background-color);
    color: var(--text-main);
}

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

.page-blog__article-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__article-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-blog__article-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-title a {
    color: var(--text-main);
    text-decoration: none;
}

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

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

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

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

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

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

/* Register CTA Section */
.page-blog__register-cta {
    background-color: #ffffff;
    color: #333333;
    text-align: center;
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: var(--background-color);
    color: var(--text-main);
}

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

.page-blog__faq-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--deep-green-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: var(--primary-color);
}

.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

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

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

.page-blog__faq-answer {
    padding: 15px 25px;
    font-size: 1em;
    color: var(--text-secondary);
    background-color: var(--card-bg);
}

.page-blog__faq-answer p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

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

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

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }
    .page-blog__hero-content {
        padding: 20px 15px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
        margin-bottom: 15px;
    }
    .page-blog__description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 12px 20px;
        width: 100% !important; /* Ensure full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__section {
        padding: 40px 0;
    }
    .page-blog__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }
    .page-blog__text-block {
        font-size: 0.95em;
    }
    .page-blog__feature-card,
    .page-blog__article-card {
        padding: 20px;
    }
    .page-blog__article-image {
        height: 180px;
    }
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 10px 20px;
    }

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

    .page-blog__hero-image-wrapper,
    .page-blog__feature-card,
    .page-blog__article-card,
    .page-blog__article-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: clamp(1.5em, 8vw, 2em);
    }
    .page-blog__section-title {
        font-size: 1.6em;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 10px 15px;
    }
    .page-blog__article-image {
        height: 150px;
    }
}