/* style/blog.css */

/* General styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: #F2FFF6; /* Text Main for dark background */
    background-color: #08160F; /* Background color */
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.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, 48px); /* H1 size restriction, using clamp */
    color: #F2FFF6; /* Text Main */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-blog__section-description {
    font-size: 18px;
    color: #A7D9B8; /* Text Secondary */
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.5;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding as per instructions */
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.7); /* Slightly darken image for text contrast, NOT changing color */
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin-top: 40px; /* Separate content from image */
    padding: 0 20px;
}

.page-blog__main-title {
    font-size: clamp(32px, 5vw, 60px); /* H1 size restriction, using clamp */
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.page-blog__description {
    font-size: 20px;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%; /* Ensure button responsiveness */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button color */
    color: #F2FFF6; /* Text Main */
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #2AD16F; /* A brighter green from gradient for text */
    border: 2px solid #2AD16F;
    margin-left: 20px;
}

.page-blog__btn-secondary:hover {
    background-color: #2AD16F;
    color: #08160F; /* Background color for hover text */
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 80px 0;
    background-color: #08160F; /* Background color */
}

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

.page-blog__article-card {
    background-color: #11271B; /* Card B G */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #2E7A4E; /* Border color */
    display: flex;
    flex-direction: column;
}

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

.page-blog__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency, adjust as needed */
    object-fit: cover;
    display: block;
    min-height: 200px; /* Minimum size requirement */
}

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

.page-blog__article-date {
    font-size: 14px;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 10px;
    display: block;
}

.page-blog__article-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    flex-grow: 1;
}

.page-blog__article-link {
    color: #F2FFF6; /* Text Main */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-link:hover {
    color: #2AD16F; /* Brighter green for hover */
}

.page-blog__article-excerpt {
    font-size: 16px;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
}

.page-blog__read-more-btn {
    display: inline-block;
    color: #2AD16F; /* Brighter green */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more-btn:hover {
    text-decoration: underline;
    color: #57E38D; /* Glow color for hover */
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 80px 0;
    background-color: #0A4B2C; /* Deep Green */
}

.page-blog__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.page-blog__category-card {
    background-color: #11271B; /* Card B G */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #F2FFF6; /* Text Main */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid #2E7A4E; /* Border color */
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    background-color: #1E3A2A; /* Slightly lighter green for hover */
}

.page-blog__category-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #F2FFF6; /* Text Main */
}

.page-blog__category-desc {
    font-size: 16px;
    color: #A7D9B8; /* Text Secondary */
    line-height: 1.5;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #08160F; /* Background color */
}

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

.page-blog__faq-item {
    background-color: #11271B; /* Card B G */
    border: 1px solid #2E7A4E; /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.page-blog__faq-item[open] {
    background-color: #1E3A2A; /* Divider color for open state */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    color: #F2FFF6; /* Text Main */
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
    list-style: none; /* Hide default marker for details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-question:hover {
    color: #2AD16F; /* Brighter green for hover */
}

.page-blog__faq-toggle {
    font-size: 24px;
    font-weight: 700;
    margin-left: 15px;
    color: #2AD16F; /* Brighter green */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    color: #57E38D; /* Glow color */
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 16px;
    color: #A7D9B8; /* Text Secondary */
    line-height: 1.6;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: #0A4B2C; /* Deep Green */
}

.page-blog__cta-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-blog__cta-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-blog__cta-content .page-blog__section-title,
.page-blog__cta-content .page-blog__section-description {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-blog__cta-image-wrapper {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-blog__cta-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}


/* Responsive styles */
@media (max-width: 992px) {
    .page-blog__hero-content {
        margin-top: 20px;
    }

    .page-blog__main-title {
        font-size: clamp(28px, 4.5vw, 50px);
    }

    .page-blog__description {
        font-size: 18px;
    }

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

    .page-blog__categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .page-blog__cta-container {
        flex-direction: column;
        text-align: center;
    }

    .page-blog__cta-content {
        text-align: center;
    }

    .page-blog__cta-content .page-blog__section-title,
    .page-blog__cta-content .page-blog__section-description {
        text-align: center;
    }

    .page-blog__cta-buttons {
        justify-content: center;
    }
}

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

    .page-blog__section-title {
        font-size: clamp(24px, 6vw, 36px);
    }

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

    .page-blog__main-title {
        font-size: clamp(28px, 7vw, 40px);
    }

    .page-blog__description {
        font-size: 16px;
    }

    /* Images 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__latest-articles-section,
    .page-blog__categories-section,
    .page-blog__faq-section,
    .page-blog__cta-section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Video responsiveness (if any) */
    .page-blog video,
    .page-blog__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important;
    }
    .page-blog__video-section {
        padding-top: 10px !important; /* Small top padding */
    }

    /* Button responsiveness */
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog a[class*="button"],
    .page-blog a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: 0 !important; /* Remove margin-left on secondary button */
    }
    
    .page-blog__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        align-items: center;
    }
    
    .page-blog__hero-content .page-blog__btn-primary {
        margin-bottom: 15px; /* Space between stacked buttons */
    }

    .page-blog__article-image {
        height: 180px; /* Adjust card image height for mobile */
    }

    .page-blog__category-card {
        padding: 25px;
    }

    .page-blog__faq-question {
        font-size: 16px;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px 20px;
    }
}