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

.page-blog {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Body background is dark, so text is light */
    background-color: var(--bg-color);
    line-height: 1.6;
}

.page-blog__section {
    padding: 60px 0;
}

.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, 48px);
    font-weight: 700;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__section-description {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 0 60px 0; /* body padding-top handled by shared.css */
    background-color: var(--deep-green);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    margin-bottom: 40px;
}

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

.page-blog__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-blog__main-title {
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 800;
    color: var(--gold-color);
    margin-bottom: 20px;
    line-height: 1.1;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

.page-blog__btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

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

.page-blog__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 20px;
}

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

/* Recent Posts */
.page-blog__recent-posts {
    background-color: var(--bg-color);
}

.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: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    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.4);
}

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

.page-blog__post-image {
    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: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

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

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

.page-blog__read-more {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
}

.page-blog__read-more::after {
    content: '→';
    margin-left: 8px;
    transition: margin-left 0.3s ease;
}

.page-blog__post-link:hover .page-blog__read-more::after {
    margin-left: 12px;
}

.page-blog__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Categories Section */
.page-blog__categories {
    background-color: var(--deep-green);
}

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

.page-blog__category-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding: 30px 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
}

.page-blog__category-image {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-blog__category-card:hover .page-blog__category-image {
    filter: brightness(1.1);
}

.page-blog__category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.page-blog__category-card:hover .page-blog__category-title {
    color: #ffffff;
}

/* Why Read Section */
.page-blog__why-read {
    background-color: var(--bg-color);
}

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

.page-blog__advantage-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__advantage-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

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

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

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--divider-color);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: var(--primary-color);
}

.page-blog__faq-item[open] .page-blog__faq-question .page-blog__faq-qtext {
    color: #ffffff;
}

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    color: #ffffff;
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 16px;
    color: var(--text-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
    max-height: 500px; /* Adjust as needed */
    padding-top: 15px;
}

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

.page-blog__text-link {
    color: var(--gold-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-blog__text-link:hover {
    color: var(--glow-color);
}

/* CTA Bottom Section */
.page-blog__cta-bottom {
    text-align: center;
    background-color: var(--bg-color);
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-image-wrapper {
        max-height: 400px;
    }
    .page-blog__hero-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .page-blog__section {
        padding: 40px 0;
    }
    .page-blog__container {
        padding: 0 15px;
    }
    .page-blog__section-title {
        font-size: 32px;
    }
    .page-blog__section-description {
        font-size: 16px;
    }

    .page-blog__hero-section {
        padding: 10px 0 40px 0;
    }
    .page-blog__hero-image-wrapper {
        max-height: 250px;
        margin-bottom: 30px;
    }
    .page-blog__hero-image {
        height: 250px;
    }
    .page-blog__main-title {
        font-size: 36px;
    }
    .page-blog__description {
        font-size: 16px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 16px;
        margin-left: 0 !important;
        margin-bottom: 15px; /* For stacking buttons */
    }
    .page-blog__button-group {
        flex-direction: column;
        gap: 0;
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__post-image {
        height: 180px;
    }
    .page-blog__post-title {
        font-size: 20px;
    }
    .page-blog__post-excerpt {
        font-size: 15px;
    }

    .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    .page-blog__category-card {
        padding: 20px 10px;
    }
    .page-blog__category-title {
        font-size: 18px;
    }

    .page-blog__advantage-item {
        padding: 25px;
    }
    .page-blog__advantage-title {
        font-size: 20px;
    }
    .page-blog__advantage-description {
        font-size: 15px;
    }

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

    /* Mobile image responsive adaptation */
    .page-blog img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__hero-image-wrapper,
    .page-blog__posts-grid,
    .page-blog__category-grid,
    .page-blog__advantages-grid,
    .page-blog__faq-list,
    .page-blog__button-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important; /* Ensure no overflow */
    }
    .page-blog__hero-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-blog__hero-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-blog__video-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 28px;
    }
    .page-blog__section-title {
        font-size: 28px;
    }
    .page-blog__post-title {
        font-size: 18px;
    }
    .page-blog__post-image {
        height: 150px;
    }
    .page-blog__category-card {
        max-width: 100%;
    }
}