/* style/blog.css */

/* --- Base Styles & Typography (Scoped to .page-blog) --- */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #F2FFF6; /* Main text color for dark background */
    background-color: #08160F; /* Body background */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    color: #F2FFF6;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: #A7D9B8;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box; /* Responsive button */
    white-space: normal; /* Allow text wrap for buttons */
    word-wrap: break-word; /* Allow text wrap for buttons */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #11A84E;
    border: 2px solid #11A84E;
}

.page-blog__btn-secondary:hover {
    background-color: #11A84E;
    color: #ffffff;
    transform: translateY(-2px);
}

.page-blog__btn-text {
    background: none;
    border: none;
    color: #57E38D;
    padding: 0;
    font-size: 0.95em;
    font-weight: normal;
    text-decoration: underline;
}

.page-blog__btn-text:hover {
    color: #F2C14E;
}

/* --- Hero Section --- */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Enforce image on top, text below */
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    overflow: hidden; /* Ensure no overflow from image */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    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: 12px;
}

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    z-index: 1;
    position: relative; /* Ensure content is above any potential background elements */
}

.page-blog__main-title {
    font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size */
    color: #F2FFF6;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.8px;
}

.page-blog__hero-description {
    font-size: 1.15em;
    color: #A7D9B8;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Latest Posts Section --- */
.page-blog__latest-posts {
    padding: 60px 0;
    background-color: #08160F;
}

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

.page-blog__post-card {
    background-color: #11271B;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

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

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

.page-blog__post-meta {
    font-size: 0.9em;
    color: #A7D9B8;
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 1em;
    color: #A7D9B8;
    flex-grow: 1; /* Pushes content down */
}

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

/* --- Featured Guides Section (Dark Section) --- */
.page-blog__featured-guides {
    padding: 80px 0;
    background-color: #0A4B2C; /* Custom dark background */
    color: #ffffff; /* Light text for this dark section */
}

.page-blog__featured-guides .page-blog__section-title {
    color: #ffffff;
}

.page-blog__featured-guides .page-blog__section-description {
    color: rgba(255, 255, 255, 0.8);
}

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

.page-blog__guide-card {
    background-color: #11271B;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-blog__guide-title {
    font-size: 1.3em;
    color: #F2FFF6;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__guide-excerpt {
    font-size: 1em;
    color: #A7D9B8;
    margin-bottom: 20px;
}

/* --- CTA Section within Featured Guides --- */
.page-blog__cta-section {
    background-color: #11271B;
    border-radius: 12px;
    display: flex;
    flex-direction: column; /* Default for mobile, will be row on desktop */
    align-items: center;
    padding: 40px;
    gap: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

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

.page-blog__cta-title {
    font-size: 2em;
    color: #F2FFF6;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__cta-text {
    font-size: 1.1em;
    color: #A7D9B8;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-content .page-blog__btn-primary,
.page-blog__cta-content .page-blog__btn-secondary {
    margin: 0 10px 15px; /* Spacing for multiple buttons */
}

/* --- Why Choose Us Section --- */
.page-blog__why-choose-us {
    padding: 80px 0;
    background-color: #08160F;
}

.page-blog__feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-blog__feature-item {
    background-color: #11271B;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__feature-title {
    font-size: 1.3em;
    color: #F2FFF6;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-blog__feature-text {
    font-size: 1em;
    color: #A7D9B8;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #0A4B2C; /* Dark background for FAQ */
    color: #ffffff;
}

.page-blog__faq-section .page-blog__section-title {
    color: #ffffff;
}

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

.page-blog__faq-item {
    background-color: #11271B;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #F2FFF6;
}

.page-blog__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #F2FFF6;
    background-color: rgba(17, 168, 78, 0.1); /* Slightly lighter background for summary */
    border-bottom: 1px solid #1E3A2A;
}

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or similar */
}

.page-blog__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #A7D9B8;
}

/* --- Responsive Design --- */
@media (min-width: 769px) {
    .page-blog__cta-section {
        flex-direction: row;
        text-align: left;
    }

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

@media (max-width: 1024px) {
    .page-blog__posts-grid,
    .page-blog__guides-grid,
    .page-blog__feature-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px;
    }

    .page-blog__section-title {
        font-size: 2em;
        margin-bottom: 20px;
    }

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

    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .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;
        margin-bottom: 10px; /* Stack buttons */
    }
    
    .page-blog__cta-content .page-blog__btn-primary,
    .page-blog__cta-content .page-blog__btn-secondary {
        margin: 0 0 10px 0; /* Stack buttons in CTA section */
    }

    .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 button groups */
        gap: 10px;
    }
    
    /* Ensure all images are responsive */
    .page-blog img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Image containers */
    .page-blog__hero-image-wrapper,
    .page-blog__post-thumbnail,
    .page-blog__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__hero-section,
    .page-blog__latest-posts,
    .page-blog__featured-guides,
    .page-blog__why-choose-us,
    .page-blog__faq-section {
        padding: 40px 0;
    }

    .page-blog__post-thumbnail {
        height: 180px; /* Adjust height for smaller screens */
    }

    .page-blog__cta-section {
        flex-direction: column;
        padding: 30px;
    }

    .page-blog__cta-title {
        font-size: 1.6em;
    }
    
    .page-blog__video-section {
        padding-top: 10px !important; /* Body handles --header-offset, this is just a small decorative top padding */
    }
}