/* style/blog.css */

/* Custom Colors */
:root {
    --page-blog-primary: #11A84E;
    --page-blog-secondary: #22C768;
    --page-blog-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-blog-card-bg: #11271B;
    --page-blog-background: #08160F;
    --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;

    /* Base colors for contrast based on body background. Assuming body is dark from shared.css. */
    --page-blog-text-on-dark: var(--page-blog-text-main); /* #F2FFF6 */
    --page-blog-text-on-light: #333333; /* Default dark text */
    --page-blog-bg-light: #ffffff; /* Default light background */
}

/* General Page Styling - Scoped to .page-blog */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--page-blog-text-on-dark); /* Default text color for the page, assuming dark body bg */
    background-color: var(--page-blog-background); /* Override body bg for specific sections if needed, or rely on shared body bg */
}

.page-blog h1,
.page-blog h2,
.page-blog h3,
.page-blog h4,
.page-blog h5,
.page-blog h6 {
    color: var(--page-blog-text-on-dark);
    line-height: 1.2;
    margin-bottom: 0.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* H1 specific style - no fixed large font-size */
.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
    font-weight: 800;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--page-blog-gold); /* Using gold for prominence */
}

.page-blog__description,
.page-blog p,
.page-blog li {
    color: var(--page-blog-text-secondary);
}

.page-blog a {
    color: var(--page-blog-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.page-blog__section-title {
    font-size: clamp(1.8em, 3vw, 2.8em);
    text-align: center;
    margin-bottom: 15px;
    color: var(--page-blog-text-main);
    font-weight: 700;
}

.page-blog__section-subtitle {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--page-blog-text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding for visual separation */
    background-color: var(--page-blog-background); /* Dark background for hero */
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%; /* Ensure wrapper is responsive */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

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

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%; /* Ensure container is responsive */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    max-width: 100%; /* Important for mobile responsiveness */
    box-sizing: border-box; /* Include padding in width calculation */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-blog__btn-primary {
    background: var(--page-blog-btn-gradient);
    color: var(--page-blog-text-main); /* White text on primary button */
    border: none;
}

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

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

.page-blog__btn-secondary:hover {
    background: var(--page-blog-primary);
    color: var(--page-blog-text-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 80px 0;
    background-color: var(--page-blog-bg-light); /* Light background for contrast */
    color: var(--page-blog-text-on-light);
}

.page-blog__latest-articles .page-blog__section-title,
.page-blog__latest-articles .page-blog__section-subtitle {
    color: var(--page-blog-text-on-light);
}

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

.page-blog__article-card {
    background-color: var(--page-blog-bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--page-blog-text-on-light); /* Ensure text on card is dark */
}

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

.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;
}

.page-blog__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--page-blog-primary); /* Use brand color for title */
}

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

.page-blog__article-title a:hover {
    color: var(--page-blog-secondary);
    text-decoration: underline;
}

.page-blog__article-meta {
    font-size: 0.9em;
    color: #777; /* Neutral grey for meta info */
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 1em;
    color: #555; /* Slightly darker grey for excerpt */
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--page-blog-primary);
    color: var(--page-blog-text-main);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more-btn:hover {
    background-color: var(--page-blog-secondary);
    text-decoration: none;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 80px 0;
    background-color: var(--page-blog-deep-green); /* Deep green background */
    color: var(--page-blog-text-main);
}

.page-blog__categories-section .page-blog__section-title {
    color: var(--page-blog-text-main);
}

.page-blog__categories-section .page-blog__section-subtitle {
    color: var(--page-blog-text-secondary);
}

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

.page-blog__category-card {
    background-color: var(--page-blog-card-bg); /* Card background color */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Ensure link styling is clean */
}

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

.page-blog__category-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--page-blog-gold); /* Gold for category titles */
}

.page-blog__category-card .page-blog__category-title {
    color: var(--page-blog-text-main); /* Ensure title on card is main text color */
}

.page-blog__category-card:hover .page-blog__category-title {
    color: var(--page-blog-gold); /* Gold on hover */
}

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

/* Featured Post Section */
.page-blog__featured-post {
    padding: 80px 0;
    background-color: var(--page-blog-bg-light); /* Light background for contrast */
    color: var(--page-blog-text-on-light);
}

.page-blog__featured-post .page-blog__section-title {
    color: var(--page-blog-text-on-light);
}

.page-blog__featured-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    background-color: var(--page-blog-bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 30px;
}

.page-blog__featured-image {
    width: 50%;
    max-width: 600px; /* Max width for image */
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.page-blog__featured-text {
    width: 50%;
}

.page-blog__featured-text .page-blog__article-title {
    font-size: 1.8em;
    color: var(--page-blog-primary);
}

.page-blog__featured-text .page-blog__article-meta {
    color: #777;
}

.page-blog__featured-text .page-blog__article-excerpt {
    color: #555;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: var(--page-blog-background); /* Dark background */
    color: var(--page-blog-text-main);
}

.page-blog__faq-section .page-blog__section-title {
    color: var(--page-blog-text-main);
}

.page-blog__faq-section .page-blog__section-subtitle {
    color: var(--page-blog-text-secondary);
}

.page-blog__faq-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg); /* Card background for FAQ items */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    color: var(--page-blog-text-main);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.15em;
    color: var(--page-blog-text-main);
    background-color: var(--page-blog-card-bg);
    transition: background-color 0.3s ease;
}

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

.page-blog__faq-question::marker {
    display: none;
}

.page-blog__faq-question:hover {
    background-color: var(--page-blog-deep-green); /* Slightly darker on hover */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--page-blog-gold); /* Gold for toggle icon */
    margin-left: 15px;
}

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

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: var(--page-blog-bg-light); /* Light background for contrast */
    text-align: center;
    color: var(--page-blog-text-on-light);
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__section-subtitle {
    color: var(--page-blog-text-on-light);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__featured-content {
        flex-direction: column;
        text-align: center;
    }

    .page-blog__featured-image,
    .page-blog__featured-text {
        width: 100%;
    }
}

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

    .page-blog__hero-section {
        padding: 40px 0;
        padding-top: 10px !important; /* body already handles header offset */
    }

    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }

    .page-blog__description {
        font-size: 1em;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
    }

    .page-blog__latest-articles,
    .page-blog__categories-section,
    .page-blog__featured-post,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding: 50px 0;
    }

    .page-blog__section-title {
        font-size: clamp(1.5em, 6vw, 2em);
    }

    .page-blog__section-subtitle {
        font-size: 0.9em;
        margin-bottom: 30px;
    }

    .page-blog__articles-grid,
    .page-blog__categories-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .page-blog__article-card,
    .page-blog__category-card,
    .page-blog__faq-item {
        margin: 0 15px; /* Adjust margin for mobile */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images and Videos responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog video,
    .page-blog__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__articles-grid,
    .page-blog__categories-grid,
    .page-blog__featured-content,
    .page-blog__faq-list,
    .page-blog__cta-buttons,
    .page-blog__container { /* Ensure all content containers are responsive */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

    .page-blog__faq-answer {
        padding: 0 20px 15px 20px;
    }
}