/* style/blog.css */

/* --- Base Styles for .page-blog content --- */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #F2FFF6; /* Main text color for dark background */
    background-color: #08160F; /* Overall background from custom palette */
}

.page-blog__section-title {
    font-size: clamp(2em, 5vw, 2.8em); /* Responsive font size for H2 */
    font-weight: 700;
    color: #F2FFF6;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.2;
}

.page-blog__sub-title {
    font-size: clamp(1.5em, 4vw, 2em); /* Responsive font size for H3 */
    font-weight: 600;
    color: #F2FFF6;
    margin-top: 40px;
    margin-bottom: 20px;
}

.page-blog__section-description,
.page-blog p {
    font-size: 1.1em;
    color: #A7D9B8; /* Secondary text color */
    margin-bottom: 20px;
    text-align: center;
}

.page-blog p {
    text-align: left; /* Default paragraph alignment */
}

/* --- Hero Section --- */
.page-blog__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: #08160F;
    position: relative;
    overflow: hidden;
}

.page-blog__hero-content {
    max-width: 900px;
    z-index: 2;
    margin-bottom: 40px;
}

.page-blog__hero-title {
    font-size: clamp(2.5em, 6vw, 3.5em); /* Responsive H1 font size */
    font-weight: 800;
    color: #F2FFF6;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: #A7D9B8;
    margin-bottom: 30px;
}

.page-blog__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__hero-image-container {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    margin-top: 40px;
    z-index: 1;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: block; /* Ensure it behaves as a block element for max-width */
}

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

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff; /* White text for primary button */
    border: none;
}

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

.page-blog__btn-secondary {
    background: #11271B; /* Card BG as secondary button background */
    color: #57E38D; /* Glow color for secondary button text */
    border: 2px solid #2E7A4E; /* Border color */
}

.page-blog__btn-secondary:hover {
    background: #0A4B2C; /* Deep Green on hover */
    color: #F2FFF6;
    transform: translateY(-2px);
}

/* --- Blog List Section --- */
.page-blog__blog-list-section {
    padding: 80px 20px;
    background-color: #08160F;
    text-align: center;
}

.page-blog__blog-list-section .page-blog__section-description {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

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

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

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

.page-blog__post-title a {
    color: #F2FFF6; /* Main text color for titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: #57E38D; /* Glow color on hover */
}

.page-blog__post-date {
    font-size: 0.9em;
    color: #A7D9B8; /* Secondary text color */
    margin-bottom: 15px;
    display: block;
}

.page-blog__post-excerpt {
    font-size: 1em;
    color: #A7D9B8;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: left;
}

.page-blog__read-more-link {
    display: inline-block;
    color: #2AD16F; /* Primary color for links */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more-link:hover {
    text-decoration: underline;
    color: #57E38D;
}

.page-blog__view-all-posts {
    margin-top: 50px;
}

/* --- Why Choose Us Section --- */
.page-blog__why-choose-us-section {
    padding: 80px 20px;
    background-color: #11271B; /* Card BG for this section */
    color: #F2FFF6;
}

.page-blog__why-choose-us-section .page-blog__section-title {
    color: #F2FFF6;
}

.page-blog__why-choose-us-section .page-blog__section-description {
    color: #A7D9B8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto 0;
    align-items: center;
}

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

.page-blog__text-block p {
    color: #A7D9B8;
    margin-bottom: 15px;
}

.page-blog__image-block {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-blog__feature-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    display: block;
}

/* --- CTA Section (Dark Background) --- */
.page-blog__cta-section {
    padding: 80px 20px;
    background-color: #0A4B2C; /* Deep Green for CTA */
    color: #F2FFF6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.page-blog__cta-content {
    max-width: 900px;
    z-index: 2;
    margin-bottom: 40px;
}

.page-blog__cta-section .page-blog__section-title {
    color: #F2FFF6;
}

.page-blog__cta-section .page-blog__section-description {
    color: #A7D9B8;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-section .page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1; /* Subtle background image */
    z-index: 1;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
    padding: 80px 20px;
    background-color: #08160F;
    color: #F2FFF6;
    text-align: center;
}

.page-blog__faq-list {
    max-width: 900px;
    margin: 40px auto;
    text-align: left;
}

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

.page-blog__faq-item[open] {
    background-color: #0A4B2C; /* Deep Green when open */
    border-color: #57E38D; /* Glow color border when open */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    color: #F2FFF6;
    transition: color 0.3s ease;
}

.page-blog__faq-question:hover {
    color: #57E38D;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #57E38D;
    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 */
    color: #F2C14E; /* Gold color when open */
}

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

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


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__hero-content {
        margin-bottom: 30px;
    }
    .page-blog__hero-image-container {
        margin-top: 30px;
    }
    .page-blog__blog-grid {
        gap: 20px;
    }
    .page-blog__content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-blog__text-block,
    .page-blog__image-block {
        min-width: unset;
        width: 100%;
    }
    .page-blog__text-block p {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles --header-offset, small top padding */
    }

    .page-blog__hero-title {
        font-size: 2.2em;
    }

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain button group width */
        margin: 0 auto;
    }

    .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__hero-image,
    .page-blog__post-image,
    .page-blog__feature-image,
    .page-blog__cta-image,
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Ensure all content containers are responsive */
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__blog-list-section,
    .page-blog__why-choose-us-section,
    .page-blog__cta-section,
    .page-blog__faq-section,
    .page-blog__hero-image-container,
    .page-blog__content-wrapper,
    .page-blog__text-block,
    .page-blog__image-block,
    .page-blog__blog-grid,
    .page-blog__faq-list,
    .page-blog__cta-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-blog__section-title {
        font-size: 1.8em;
    }
    
    .page-blog__sub-title {
        font-size: 1.3em;
    }

    .page-blog__post-card {
        margin-bottom: 20px;
    }

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

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

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

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

    .page-blog__cta-section .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain button group width */
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 1.8em;
    }
    .page-blog__section-title {
        font-size: 1.6em;
    }
    .page-blog__hero-description {
        font-size: 0.9em;
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
}

/* Ensure content area images are not too small */
/* This rule applies to any img within .page-blog, ensuring minimum display size */
.page-blog img:not(.page-blog__hero-image):not(.page-blog__cta-image) {
    min-width: 200px;
    min-height: 200px;
}
/* Override specific smaller dimensions if they exist, to meet 200px min */
.page-blog__post-image {
    min-width: 200px;
    min-height: 200px;
    height: auto; /* Allow auto height to maintain aspect ratio with min-height */
}
.page-blog__feature-image {
    min-width: 200px;
    min-height: 200px;
}