/* style/blog.css */

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

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    color: var(--cr88-text-main); /* Light text on dark body background */
    background-color: var(--cr88-background); /* Body background from custom colors */
    line-height: 1.6;
    padding-bottom: 60px; /* Ensure space above footer */
}

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

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

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--cr88-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;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: var(--cr88-deep-green);
}

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

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

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    max-width: 900px;
    margin-top: -100px; /* Overlap slightly with image for visual flow */
    background-color: var(--cr88-card-bg);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--cr88-border);
}

.page-blog__main-title {
    font-size: clamp(2.2em, 4vw, 3.2em); /* Use clamp for H1 */
    color: var(--cr88-gold);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

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

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--cr88-button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

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

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

.page-blog__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--cr88-background);
}

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

.page-blog__category-card {
    background-color: var(--cr88-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--cr88-border);
    transition: transform 0.3s ease;
    padding-bottom: 20px;
}

.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;
    color: var(--cr88-text-main);
    margin: 20px 20px 10px 20px;
    text-align: center;
}

.page-blog__category-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* Trusted Source Section */
.page-blog__trusted-source-section {
    padding: 60px 0;
    background-color: var(--cr88-deep-green);
}

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

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

.page-blog__feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    object-fit: contain;
}

.page-blog__feature-title {
    font-size: 1.4em;
    color: var(--cr88-text-main);
    margin-bottom: 10px;
}

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

/* Recent Articles Section */
.page-blog__recent-articles-section {
    padding: 60px 0;
    background-color: var(--cr88-background);
}

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

.page-blog__article-card {
    background-color: var(--cr88-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--cr88-border);
    transition: transform 0.3s ease;
}

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

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

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

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

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

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

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

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

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

.page-blog__read-more-btn:hover {
    opacity: 0.9;
}

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

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

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

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

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

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

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--cr88-secondary-color);
}

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-content {
        margin-top: -50px;
    }
}

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

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

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

    .page-blog__hero-section {
        padding-bottom: 40px;
    }

    .page-blog__hero-image-wrapper {
        max-height: 400px;
    }

    .page-blog__hero-content {
        margin-top: -80px; /* Adjust overlap for smaller screens */
        padding: 30px 15px;
    }

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

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

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

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

    .page-blog__category-image,
    .page-blog__article-image {
        height: 180px;
    }

    .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__category-card,
    .page-blog__feature-item,
    .page-blog__article-card,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__hero-section,
    .page-blog__categories-section,
    .page-blog__trusted-source-section,
    .page-blog__recent-articles-section,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

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

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.8em;
    }
    .page-blog__hero-content {
        margin-top: -60px;
    }
    .page-blog__hero-description {
        font-size: 0.9em;
    }
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__category-title,
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__feature-title {
        font-size: 1.3em;
    }
    .page-blog__faq-item summary {
        font-size: 1em;
    }
}