/* style/blog.css */

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

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

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

.page-blog__dark-section {
    background-color: var(--zh88-deep-green);
    color: var(--zh88-text-main);
}

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

.page-blog__section-title {
    font-size: clamp(28px, 4vw, 42px);
    color: var(--zh88-gold);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.page-blog__section-title--light {
    color: var(--zh88-text-main);
}

.page-blog__description {
    font-size: 18px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px;
    color: var(--zh88-text-secondary);
}

.page-blog__description--light {
    color: var(--zh88-text-main);
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    background-color: var(--zh88-card-bg);
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    color: var(--zh88-text-main);
}

.page-blog__main-title {
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--zh88-gold);
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: var(--zh88-button-gradient);
    color: #ffffff; /* Button text always white for primary */
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.page-blog__btn-secondary:hover {
    background-color: var(--zh88-gold);
    color: var(--zh88-bg);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-primary--large {
    padding: 18px 40px;
    font-size: 20px;
    min-width: 250px;
}

/* About Blog Section */
.page-blog__about-blog .page-blog__text-block {
    font-size: 17px;
    margin-bottom: 20px;
    text-align: left;
    color: var(--zh88-text-secondary);
}

.page-blog__about-blog .page-blog__text-block:last-child {
    margin-bottom: 0;
}

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

.page-blog__category-card {
    background-color: var(--zh88-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--zh88-text-main);
    border: 1px solid var(--zh88-border);
}

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

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

.page-blog__category-card .page-blog__card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 20px 20px 10px;
    color: var(--zh88-gold);
}

.page-blog__category-card .page-blog__card-description {
    font-size: 16px;
    color: var(--zh88-text-secondary);
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__category-card .page-blog__card-link {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background-color: var(--zh88-primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border-radius: 0 0 12px 12px;
}

.page-blog__category-card .page-blog__card-link:hover {
    background-color: var(--zh88-secondary);
}

/* Why Follow Section */
.page-blog__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-blog__feature-item {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--zh88-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.page-blog__feature-title {
    font-size: 24px;
    color: var(--zh88-gold);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-blog__feature-description {
    font-size: 16px;
    color: var(--zh88-text-secondary);
}

/* Featured Articles Section */
.page-blog__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-blog__article-card {
    background-color: var(--zh88-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--zh88-border);
}

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

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

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

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

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

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

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

.page-blog__article-excerpt {
    font-size: 16px;
    color: var(--zh88-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    background-color: var(--zh88-primary);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

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

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

/* FAQ Section */
.page-blog__faq-list {
    margin-top: 40px;
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-blog__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-blog__faq-qtext {
    flex-grow: 1;
    color: var(--zh88-text-main);
}

.page-blog__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    width: 30px;
    text-align: center;
    color: var(--zh88-gold);
}

.page-blog__faq-answer {
    padding: 0 20px 20px;
    font-size: 16px;
    color: var(--zh88-text-secondary);
    line-height: 1.6;
}

.page-blog__faq-answer p {
    margin-bottom: 10px;
}

.page-blog__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-blog__faq-answer a {
    color: var(--zh88-primary);
    text-decoration: none;
    font-weight: 600;
}

.page-blog__faq-answer a:hover {
    text-decoration: underline;
}

/* Final CTA Section */
.page-blog__cta-final {
    background-color: var(--zh88-deep-green);
    text-align: center;
    padding: 80px 20px;
}

.page-blog__cta-final-content {
    max-width: 900px;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-blog__hero-image {
        height: auto;
    }
}

@media (max-width: 768px) {
    .page-blog__section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: clamp(24px, 6vw, 36px);
        margin-bottom: 30px;
    }
    .page-blog__main-title {
        font-size: clamp(30px, 7vw, 48px);
    }
    .page-blog__description {
        font-size: 16px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 300px !important; /* Max width for mobile buttons */
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__btn-primary--large {
        padding: 15px 30px;
        font-size: 18px;
        max-width: 350px !important;
    }
    .page-blog__category-grid,
    .page-blog__features-grid,
    .page-blog__article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-blog__category-image,
    .page-blog__article-image {
        height: 180px;
    }
    .page-blog__category-card .page-blog__card-title,
    .page-blog__article-title {
        font-size: 20px;
    }
    .page-blog__faq-question {
        font-size: 16px;
        padding: 15px;
    }
    .page-blog__faq-answer {
        font-size: 15px;
        padding: 0 15px 15px;
    }
    /* 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__hero-image-wrapper,
    .page-blog__category-card,
    .page-blog__article-card,
    .page-blog__faq-item,
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-blog__hero-section {
        padding-top: 10px !important; /* body handles --header-offset */
    }
    .page-blog__cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .page-blog__section {
        padding: 30px 0;
    }
    .page-blog__section-title {
        font-size: clamp(22px, 8vw, 32px);
    }
    .page-blog__main-title {
        font-size: clamp(28px, 9vw, 40px);
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
    }
    .page-blog__category-image,
    .page-blog__article-image {
        height: 160px;
    }
}

/* Color Contrast Fixes (if needed, applied automatically based on content analysis) */
.page-blog__text-block {
    color: var(--zh88-text-secondary);
}

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

.page-blog__light-bg {
    /* No light background used here, but if it were, text would be dark */
    color: #333333;
    background-color: #ffffff;
}