/* style/blog.css */

:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --background-color: #08160F;
    --card-background-color: #11271B;
    --text-main-color: #F2FFF6;
    --text-secondary-color: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green-color: #0A4B2C;
}

.page-blog {
    font-family: Arial, sans-serif;
    color: var(--text-main-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

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

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.page-blog__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--text-secondary-color);
    text-align: center;
    margin-bottom: 40px;
    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;
    padding: 10px 0 60px 0; /* body handles top padding */
    background-color: var(--deep-green-color);
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7);
}

.page-blog__hero-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    z-index: 1;
    margin-top: -100px; /* Adjust to bring content closer to image without overlapping text */
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em);
    font-weight: 700;
    color: var(--gold-color);
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__lead-text {
    font-size: clamp(1em, 1.5vw, 1.25em);
    color: var(--text-main-color);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

.page-blog__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

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

.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-background-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-main-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: var(--text-secondary-color);
    line-height: 1.5;
}

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

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

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

.page-blog__category-card {
    background-color: var(--card-background-color);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    color: var(--text-main-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

.page-blog__category-title {
    font-size: 1.3em;
    font-weight: bold;
    padding: 20px;
    color: var(--gold-color);
}

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

.page-blog__featured-card {
    background-color: var(--card-background-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

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

.page-blog__featured-image {
    width: 100%;
    height: 337px; /* For 16:9 aspect ratio */
    object-fit: cover;
    display: block;
}

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

.page-blog__featured-title {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-main-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-blog__featured-meta {
    font-size: 0.95em;
    color: var(--text-secondary-color);
    margin-bottom: 20px;
}

.page-blog__featured-excerpt {
    font-size: 1.05em;
    color: var(--text-secondary-color);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.page-blog__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

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

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

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

.page-blog__faq-item {
    background-color: var(--card-background-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-blog__faq-question:hover {
    background-color: #1a3326; /* Slightly lighter card background on hover */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/* For details tag, hide default marker */
.page-blog__faq-item summary {
    list-style: none;
}
.page-blog__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary-color);
    line-height: 1.6;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

/* Ensure details content is visible when open */
.page-blog__faq-item[open] .page-blog__faq-answer {
    max-height: 2000px; /* Large enough to show content */
    opacity: 1;
}

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

.page-blog__cta-title {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--gold-color);
    margin-bottom: 20px;
}

.page-blog__cta-description {
    font-size: 1.1em;
    color: var(--text-main-color);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (min-width: 769px) {
    .page-blog__featured-card {
        flex-direction: row;
    }

    .page-blog__featured-image {
        width: 50%;
        height: auto;
    }

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

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

    .page-blog__section-title {
        font-size: 2em;
    }

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

    .page-blog__hero-content {
        padding: 30px 15px;
        margin-top: -50px;
    }

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

    .page-blog__lead-text {
        font-size: clamp(0.9em, 3.5vw, 1.1em);
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-blog__post-image {
        height: 180px;
    }

    .page-blog__post-title {
        font-size: 1.2em;
    }

    .page-blog__category-image {
        height: 150px;
    }

    .page-blog__category-title {
        font-size: 1.1em;
    }

    .page-blog__featured-image {
        height: auto;
    }

    .page-blog__featured-title {
        font-size: 1.5em;
    }

    .page-blog__featured-excerpt {
        font-size: 0.95em;
    }

    .page-blog__read-more-btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }

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

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

    .page-blog__cta-title {
        font-size: 1.8em;
    }

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

    /* Mobile image, video, and container responsiveness */
    .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__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper,
    .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;
        overflow: hidden !important; /* Ensure no overflow */
    }
    
    .page-blog__cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* Stack buttons vertically on mobile */
    }

    .page-blog__video-section {
        padding-top: 10px !important;
    }
}

/* Ensure min image size in content areas for desktop */
.page-blog__post-image, .page-blog__category-image, .page-blog__featured-image {
    min-width: 200px;
    min-height: 200px;
}

.page-blog__post-image { height: 225px; }
.page-blog__category-image { height: 200px; }
.page-blog__featured-image { height: 337px; }

@media (max-width: 768px) {
    .page-blog__post-image, .page-blog__category-image, .page-blog__featured-image {
        height: auto !important; /* Allow auto height for mobile */
    }
}