/* style/blog.css */

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

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

.page-blog__section-title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: bold;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

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

.page-blog__text-block {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-align: justify;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 10px 0 60px 0; /* body handles padding-top, this is decorative */
    overflow: hidden;
    text-align: center;
}

.page-blog__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-blog__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 20px;
    background: rgba(8, 22, 15, 0.7); /* Card BG with opacity */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__main-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 30px;
}

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

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

.page-blog__btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--deep-green);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-blog__btn-secondary:hover {
    background-color: var(--deep-green);
    color: #ffffff;
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 60px 0;
    background-color: var(--background);
}

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

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

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

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

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

.page-blog__post-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

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

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

.page-blog__post-date {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.page-blog__view-all-button-wrapper {
    text-align: center;
}

/* Promo Section */
.page-blog__promo-section {
    padding: 60px 0;
    text-align: center;
}

.page-blog__dark-section {
    background-color: var(--deep-green);
    color: #ffffff;
}

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

.page-blog__dark-section .page-blog__section-title::after {
    background-color: #ffffff;
}

.page-blog__dark-section .page-blog__text-block {
    color: rgba(255, 255, 255, 0.8);
}

.page-blog__promo-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.page-blog__feature-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-blog__feature-item:hover {
    transform: translateY(-5px);
}

.page-blog__feature-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__feature-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-blog__feature-description {
    font-size: 15px;
    color: var(--text-secondary);
}

.page-blog__promo-cta {
    margin-top: 30px;
}

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

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

.page-blog__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    position: relative;
}

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

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

.page-blog__faq-toggle {
    font-size: 24px;
    font-weight: normal;
    color: var(--gold);
    margin-left: 15px;
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 16px;
    color: var(--text-secondary);
    text-align: justify;
}

/* Final CTA Section */
.page-blog__final-cta-section {
    padding: 60px 0;
    text-align: center;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-content {
        padding: 15px;
    }

    .page-blog__main-title {
        font-size: clamp(28px, 4.5vw, 40px);
    }

    .page-blog__description {
        font-size: clamp(15px, 2.2vw, 18px);
    }
}

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

    .page-blog__section-title {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 30px;
    }

    .page-blog__text-block {
        font-size: 15px;
    }

    .page-blog__hero-section {
        min-height: 400px;
        padding-bottom: 40px;
    }

    .page-blog__hero-content {
        padding: 15px;
        width: 90%;
    }

    .page-blog__main-title {
        font-size: clamp(28px, 6vw, 36px);
    }

    .page-blog__description {
        font-size: clamp(14px, 3vw, 16px);
        margin-bottom: 20px;
    }

    .page-blog__hero-cta-buttons,
    .page-blog__final-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-blog__post-grid {
        grid-template-columns: 1fr;
    }

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

    .page-blog__post-title {
        font-size: 18px;
    }

    .page-blog__post-excerpt {
        font-size: 14px;
    }

    .page-blog__promo-features {
        grid-template-columns: 1fr;
    }

    .page-blog__feature-item {
        padding: 20px;
    }

    .page-blog__feature-title {
        font-size: 20px;
    }

    .page-blog__feature-description {
        font-size: 14px;
    }

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

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

    /* Mobile image responsiveness */
    .page-blog img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__post-card,
    .page-blog__feature-item,
    .page-blog__container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden !important;
    }
    .page-blog__hero-image-wrapper {
        padding: 0;
    }
    .page-blog__post-card, .page-blog__feature-item {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-section {
        min-height: 350px;
        padding-bottom: 30px;
    }
    .page-blog__hero-content {
        width: 95%;
    }
    .page-blog__main-title {
        font-size: clamp(24px, 7vw, 32px);
    }
    .page-blog__description {
        font-size: clamp(14px, 3.5vw, 15px);
    }
    .page-blog__btn-primary, .page-blog__btn-secondary {
        font-size: 15px !important;
        padding: 10px 10px !important;
    }
}

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

/* Ensure contrast for text on dark backgrounds */
.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
    color: var(--text-main);
}

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

.page-blog__dark-section {
    background-color: var(--deep-green);
    color: var(--text-main);
}

.page-blog__dark-section .page-blog__text-block {
    color: var(--text-secondary);
}

.page-blog__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
}

.page-blog__btn-secondary {
    border-color: var(--deep-green);
    color: var(--text-main);
}

.page-blog__btn-secondary:hover {
    background-color: var(--deep-green);
    color: #ffffff;
}

.page-blog__post-card {
    background-color: var(--card-bg);
}

.page-blog__faq-item {
    background-color: var(--card-bg);
    border-color: var(--divider);
}

.page-blog__faq-toggle {
    color: var(--gold);
}