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

/* Main page styling - assumes shared.css body has dark background */
.page-blog {
    font-family: Arial, sans-serif;
    color: var(--page-blog-text-main); /* Light text for dark background */
    background-color: var(--page-blog-background);
}

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

.page-blog__light-bg {
    background-color: #ffffff;
    color: #333333;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 40px;
    box-sizing: border-box;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
    padding: 0 15px;
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--page-blog-text-main);
    text-shadow: 0 0 8px rgba(34, 199, 104, 0.4);
}

.page-blog__hero-description {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--page-blog-text-secondary);
}

/* General Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--page-blog-primary-color);
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
}

.page-blog__light-bg .page-blog__section-title {
    color: var(--page-blog-primary-color);
}

.page-blog__section-description {
    font-size: 1.1em;
    color: var(--page-blog-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-blog__light-bg .page-blog__section-description {
    color: #555555;
}

/* Buttons */
.page-blog__cta-button {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: var(--page-blog-button-gradient);
    color: #ffffff; /* White text for primary button */
    border: none;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

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

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

.page-blog__light-bg .page-blog__btn-secondary {
    color: var(--page-blog-primary-color);
    border-color: var(--page-blog-primary-color);
}

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

.page-blog__cta-buttons-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Articles Grid */
.page-blog__articles-grid,
.page-blog__guides-grid,
.page-blog__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-blog__article-card,
.page-blog__guide-card,
.page-blog__category-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure cards in a row have same height */
    display: flex;
    flex-direction: column;
}

.page-blog__light-bg .page-blog__article-card,
.page-blog__light-bg .page-blog__guide-card {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--page-blog-border);
}

.page-blog__article-card:hover,
.page-blog__guide-card:hover,
.page-blog__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-blog__article-content,
.page-blog__guide-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-blog__article-title,
.page-blog__guide-title,
.page-blog__category-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--page-blog-primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-blog__light-bg .page-blog__article-title,
.page-blog__light-bg .page-blog__guide-title {
    color: var(--page-blog-primary-color);
}

.page-blog__article-excerpt,
.page-blog__guide-excerpt {
    font-size: 0.95em;
    color: var(--page-blog-text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__light-bg .page-blog__article-excerpt,
.page-blog__light-bg .page-blog__guide-excerpt {
    color: #666666;
}

.page-blog__article-date,
.page-blog__guide-date {
    font-size: 0.85em;
    color: var(--page-blog-text-secondary);
    opacity: 0.7;
    margin-top: auto;
}

.page-blog__light-bg .page-blog__article-date,
.page-blog__light-bg .page-blog__guide-date {
    color: #888888;
}

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

/* Community Section */
.page-blog__community-section {
    padding: 60px 20px;
}

.page-blog__community-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-blog__community-image {
    flex: 1 1 45%;
    min-width: 300px;
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
    height: auto;
    display: block;
}

.page-blog__community-text {
    flex: 1 1 45%;
    min-width: 300px;
    line-height: 1.7;
    font-size: 1.1em;
}

.page-blog__community-text p {
    margin-bottom: 20px;
    color: #666666;
}

.page-blog__community-text .page-blog__cta-button {
    margin-top: 20px;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 20px;
}

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

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg);
    border: 1px solid var(--page-blog-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--page-blog-primary-color);
    cursor: pointer;
    list-style: none;
}

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

.page-blog__faq-qtext {
    flex-grow: 1;
    color: var(--page-blog-text-main);
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--page-blog-secondary-color);
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
}

.page-blog__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--page-blog-text-secondary);
}

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 20px;
    text-align: center;
}

.page-blog__cta-buttons-group .page-blog__cta-button {
    min-width: 180px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-image-wrapper {
        margin-bottom: 30px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 5vw, 2.8em);
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__articles-grid,
    .page-blog__guides-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .page-blog__community-content {
        flex-direction: column;
    }
    .page-blog__community-image,
    .page-blog__community-text {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles --header-offset, this is for visual spacing */
    }
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-blog__hero-content {
        padding: 0 10px;
    }
    .page-blog__main-title {
        font-size: clamp(1.5em, 6vw, 2.5em);
        margin-bottom: 15px;
    }
    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        padding-top: 30px;
    }
    .page-blog__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-blog__container {
        padding: 15px;
    }
    .page-blog__articles-grid,
    .page-blog__guides-grid,
    .page-blog__categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-blog__article-card,
    .page-blog__guide-card,
    .page-blog__category-card {
        margin-bottom: 0;
    }
    .page-blog__article-image,
    .page-blog__guide-image,
    .page-blog__category-image {
        height: 180px;
    }
    .page-blog__category-image {
        height: 120px;
    }
    .page-blog__article-content,
    .page-blog__guide-content {
        padding: 15px;
    }
    .page-blog__article-title,
    .page-blog__guide-title,
    .page-blog__category-title {
        font-size: 1.15em;
    }
    .page-blog__article-excerpt,
    .page-blog__guide-excerpt {
        font-size: 0.9em;
    }
    .page-blog__cta-buttons-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__cta-button {
        padding: 12px 20px;
        font-size: 1em;
        width: 100% !important; /* Enforce full width for buttons */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0 auto;
    }
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-image-wrapper,
    .page-blog__community-content,
    .page-blog__faq-list,
    .page-blog__cta-buttons-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px;
    }
    .page-blog__faq-answer {
        padding: 0 15px 15px 15px;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-section {
        padding: 30px 10px;
        padding-top: 10px !important;
    }
    .page-blog__main-title {
        font-size: clamp(1.3em, 7vw, 2em);
    }
    .page-blog__section-title {
        font-size: 1.5em;
    }
    .page-blog__hero-description {
        font-size: 0.9em;
    }
    .page-blog__article-image,
    .page-blog__guide-image,
    .page-blog__category-image {
        height: 150px;
    }
    .page-blog__category-image {
        height: 100px;
    }
    .page-blog__article-title,
    .page-blog__guide-title,
    .page-blog__category-title {
        font-size: 1em;
    }
    .page-blog__article-excerpt,
    .page-blog__guide-excerpt {
        font-size: 0.85em;
    }
}