/* style/blog.css */

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

/* --- Base Styles --- */
.page-blog {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Light text on dark background */
    background-color: var(--background); /* Custom dark background color */
}

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

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

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

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

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

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

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

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--button); /* Custom button gradient */
    color: var(--text-main); /* Light text on dark button */
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

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

/* --- Latest Posts Section --- */
.page-blog__latest-posts-section {
    padding: 80px 0;
    background-color: var(--background);
}

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

.page-blog__post-card {
    background-color: var(--card-bg); /* Custom card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    color: var(--text-main); /* Light text on dark card */
}

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

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

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

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

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

.page-blog__post-title a:hover {
    color: var(--glow); /* Highlight on hover */
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.page-blog__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: var(--deep-green); /* Use deep green for secondary buttons */
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
    background-color: var(--glow);
}

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

.page-blog__view-all-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    background: var(--button);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.page-blog__view-all-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* --- Video Section --- */
.page-blog__video-section {
    padding: 80px 0;
    background-color: var(--deep-green); /* Use a darker green for video section */
    text-align: center;
}

.page-blog__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    width: 100%; /* Ensure width 100% for desktop */
    background: #000;
    margin: 0 auto 30px auto;
    border-radius: 10px;
    box-sizing: border-box;
}

.page-blog__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer; /* Indicate clickable */
}

.page-blog__video-description {
    font-size: 1.1em;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.page-blog__video-cta {
    background: var(--gold); /* Use gold for video CTA */
    color: #333333; /* Dark text on gold button for contrast */
}

.page-blog__video-cta:hover {
    background: #e0b03e; /* Slightly darker gold on hover */
}

/* --- Featured Articles Section --- */
.page-blog__featured-articles-section {
    padding: 80px 0;
    background-color: var(--background);
}

.page-blog__post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-blog__list-item {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.page-blog__list-item:hover {
    transform: translateY(-3px);
}

.page-blog__list-thumbnail {
    width: 250px; /* Fixed width for list thumbnail */
    height: 180px; /* Fixed height for list thumbnail */
    object-fit: cover;
    display: block;
}

.page-blog__list-content {
    padding: 20px;
    flex-grow: 1;
}

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

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

.page-blog__list-title a:hover {
    color: var(--glow);
}

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

.page-blog__list-excerpt {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

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

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

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--deep-green); /* Darker background for question */
    color: var(--text-main);
    border-bottom: 1px solid var(--divider);
}

.page-blog__faq-item[open] .page-blog__faq-question {
    border-bottom: 1px solid var(--border);
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    line-height: 1;
}

.page-blog__faq-answer {
    padding: 20px;
    font-size: 1em;
    color: var(--text-secondary);
    background-color: var(--card-bg); /* Lighter background for answer */
}

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

/* --- CTA Bottom Section --- */
.page-blog__cta-bottom-section {
    padding: 80px 0;
    background-color: var(--deep-green);
    text-align: center;
}

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

.page-blog__btn-primary {
    background: var(--button);
    color: var(--text-main);
}

.page-blog__btn-secondary {
    background: transparent;
    border: 2px solid var(--glow); /* Border with glow color */
    color: var(--text-main);
}

.page-blog__btn-secondary:hover {
    background: var(--glow);
    color: #333333; /* Dark text on glow hover */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }
    .page-blog__list-thumbnail {
        width: 200px;
        height: 150px;
    }
}

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

    .page-blog__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Images responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__hero-section,
    .page-blog__latest-posts-section,
    .page-blog__video-section,
    .page-blog__featured-articles-section,
    .page-blog__faq-section,
    .page-blog__cta-bottom-section,
    .page-blog__post-card,
    .page-blog__list-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Video responsive */
    .page-blog video,
    .page-blog__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 0 !important; /* Reset specific padding if any */
        padding-right: 0 !important; /* Reset specific padding if any */
    }

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

    /* Buttons responsive */
    .page-blog__cta-button,
    .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;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .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;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
    }

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px;
    }
    .page-blog__post-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__list-item {
        flex-direction: column;
    }
    .page-blog__list-thumbnail {
        width: 100%;
        height: auto; /* Allow height to adjust */
    }
    .page-blog__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }
}