/* style/blog.css */

/* Custom properties for colors */
:root {
    --page-blog-bg: #08160F;
    --page-blog-card-bg: #11271B;
    --page-blog-text-main: #F2FFF6;
    --page-blog-text-secondary: #A7D9B8;
    --page-blog-border: #2E7A4E;
    --page-blog-glow: #57E38D;
    --page-blog-gold: #F2C14E;
    --page-blog-divider: #1E3A2A;
    --page-blog-deep-green: #0A4B2C;
    --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-blog-button-text: #ffffff; /* Explicitly white for buttons */
}

.page-blog {
    background-color: var(--page-blog-bg); /* Dark background from custom palette */
    color: var(--page-blog-text-main); /* Light text for contrast */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* HERO Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px 60px; /* Small top padding, more bottom padding */
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

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

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

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__intro-text {
    font-size: 1.2rem;
    color: var(--page-blog-text-secondary);
    margin-bottom: 30px;
}

/* General Section Styling */
.page-blog__section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-blog__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--page-blog-text-main);
    text-align: center;
    margin-bottom: 40px;
}

.page-blog__section-title--light {
    color: var(--page-blog-text-main); /* Already light, but for explicit override */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For responsive buttons */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-blog__btn-primary {
    background: var(--page-blog-button-gradient);
    color: var(--page-blog-button-text);
    border: none;
    margin-right: 15px;
}

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

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

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

.page-blog__btn-text {
    color: var(--page-blog-glow); /* Use glow color for text links */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__btn-text:hover {
    color: var(--page-blog-gold);
    text-decoration: underline;
}

/* Latest Articles Section */
.page-blog__latest-articles {
    background-color: var(--page-blog-bg);
}

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

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

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

.page-blog__card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.page-blog__card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-blog__card-excerpt {
    font-size: 1rem;
    color: var(--page-blog-text-secondary);
    margin-bottom: 15px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__card-date {
    font-size: 0.9rem;
    color: var(--page-blog-text-secondary);
    opacity: 0.8;
}

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

/* Categories Section */
.page-blog__categories {
    background-color: var(--page-blog-bg);
}

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

.page-blog__category-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__category-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
}

.page-blog__category-description {
    font-size: 1rem;
    color: var(--page-blog-text-secondary);
    margin-bottom: 20px;
}

/* Benefits Section */
.page-blog__benefits-community {
    background-color: var(--page-blog-bg);
}

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

.page-blog__benefit-item {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.page-blog__benefit-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--page-blog-text-main);
    margin-bottom: 15px;
}

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

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

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

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--page-blog-text-main); /* Ensure light text on dark card */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--page-blog-text-main);
    list-style: none; /* For <summary> tag */
}

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

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

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

.page-blog__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--page-blog-glow);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−"; /* Change to minus when open (handled by JS for consistency) */
}

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

/* CTA Section */
.page-blog__cta-section {
    background: var(--page-blog-deep-green); /* Use Deep Green for a strong CTA background */
    text-align: center;
    padding: 80px 20px;
    border-radius: 12px;
    margin-bottom: 60px;
}

.page-blog__cta-section .page-blog__section-title {
    color: var(--page-blog-text-main);
    margin-bottom: 25px;
}

.page-blog__cta-description {
    font-size: 1.2rem;
    color: var(--page-blog-text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-blog__section-title {
        font-size: 2rem;
    }
    .page-blog__article-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 10px 15px 40px;
    }
    .page-blog__hero-content {
        padding: 0 15px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .page-blog__intro-text {
        font-size: 1rem;
    }
    .page-blog__section {
        padding: 40px 15px;
    }
    .page-blog__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    .page-blog__article-grid,
    .page-blog__category-grid,
    .page-blog__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-blog__article-image {
        height: 200px; /* Ensure images are not too small */
    }
    .page-blog__card-title {
        font-size: 1.2rem;
    }
    .page-blog__category-title {
        font-size: 1.4rem;
    }
    .page-blog__benefit-title {
        font-size: 1.3rem;
    }
    .page-blog__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }
    .page-blog__cta-section {
        padding: 60px 15px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        margin-right: 0;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    /* Mobile image, video, and container adaptations */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog video,
    .page-blog__video { /* If video were present */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper,
    .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; /* Add padding to prevent content from touching edges */
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
    .page-blog__video-section {
        padding-top: 10px !important;
    }

    /* Ensure content area images are not too small */
    .page-blog__content-area img,
    .page-blog__article-card img {
      min-width: 200px !important;
      min-
      width: 100% !important;
      height: auto !important;
    }
}

/* Ensure no filter on images */
.page-blog img {
    filter: none !important;
}

/* Desktop video container width (not present, but for rule compliance) */
.page-blog__video-container {
    width: 100%;
    max-width: 1200px;
}