/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #1F2D3D; /* Text Main */
    background-color: #F4F7FB; /* Background */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    color: #000000; /* Custom Color_1776249996415 */
    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: 4px;
    background: linear-gradient(90deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    border-radius: 2px;
}

.page-blog__description,
.page-blog__text-block {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, not var(--header-offset) */
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* Ensure content doesn't spill */
}

.page-blog__hero-image {
    width: 100%;
    max-height: 500px; /* Limit height for desktop */
    object-fit: cover;
    display: block;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* H1 font-size clamp */
    color: #2F6BFF; /* Main color */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

.page-blog__hero-cta-button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 50px 0;
    background-color: #FFFFFF; /* Card BG */
    margin-bottom: 50px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.page-blog__article-card {
    background-color: #FFFFFF; /* Card BG */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
}

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

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

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

.page-blog__article-title {
    font-size: 1.4em;
    color: #2F6BFF; /* Main color */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__article-date {
    font-size: 0.85em;
    color: #666;
    margin-top: auto;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 50px 0;
    margin-bottom: 50px;
}

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

.page-blog__category-card {
    background-color: #FFFFFF; /* Card BG */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: #000000; /* Custom Color_1776249996415 */
    text-align: center;
    padding-bottom: 20px;
}

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

.page-blog__category-image {
    width: 100%;
    height: 180px; /* Consistent height for category images */
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.page-blog__category-title {
    font-size: 1.3em;
    color: #2F6BFF; /* Main color */
}

/* Why Follow Section */
.page-blog__why-follow-section {
    padding: 60px 0;
    background: #2F6BFF; /* Main color */
    color: #ffffff; /* White text for dark background */
    text-align: center;
    margin-bottom: 50px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__why-follow-section .page-blog__section-title {
    color: #ffffff; /* White title */
}

.page-blog__why-follow-section .page-blog__section-title::after {
    background: #A5C4FF; /* Glow color */
}

.page-blog__why-follow-section .page-blog__description,
.page-blog__why-follow-section .page-blog__text-block {
    color: #f0f0f0;
}

.page-blog__feature-list {
    list-style: none;
    padding: 0;
    margin: 40px auto;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-blog__feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 8px;
    text-align: left;
}

.page-blog__feature-title {
    font-size: 1.2em;
    color: #A5C4FF; /* Glow color */
    margin-bottom: 10px;
}

.page-blog__feature-item p {
    font-size: 0.95em;
    color: #f0f0f0;
    text-align: left;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 50px 0;
    margin-bottom: 50px;
}

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

.page-blog__faq-item {
    background-color: #FFFFFF; /* Card BG */
    border: 1px solid #D6E2FF; /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #2F6BFF; /* Main color */
    cursor: pointer;
    background-color: #F4F7FB; /* Background */
    border-bottom: 1px solid #D6E2FF; /* Border color */
    list-style: none; /* For details/summary */
}

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

.page-blog__faq-question .page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    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: 15px 25px 20px;
    font-size: 1em;
    color: #1F2D3D; /* Text Main */
}

/* Join Community Section */
.page-blog__join-community-section {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    color: #ffffff;
    border-radius: 10px;
    margin-bottom: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

.page-blog__join-community-section .page-blog__section-title::after {
    background: #A5C4FF; /* Glow color */
}

.page-blog__join-community-section .page-blog__description {
    color: #f0f0f0;
}

.page-blog__cta-buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Button Styles */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box; /* Button responsive */
    white-space: normal; /* Button responsive */
    word-wrap: break-word; /* Button responsive */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    box-shadow: 0 0 15px #A5C4FF; /* Glow */
}

.page-blog__btn-secondary {
    background: #ffffff; /* Card BG */
    color: #2F6BFF; /* Main color */
    border: 2px solid #2F6BFF; /* Main color */
}

.page-blog__btn-secondary:hover {
    background: #f0f0f0;
    color: #2F6BFF;
    box-shadow: 0 0 15px rgba(47, 107, 255, 0.3);
}

/* Image responsive base styles */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-blog__description,
    .page-blog__text-block {
        font-size: 1em;
        margin-bottom: 20px;
        text-align: left; /* Adjust alignment for mobile readability */
        padding: 0 15px; /* Add padding for text blocks */
    }

    /* Hero Section Mobile */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Ensure fixed small padding */
        margin-bottom: 30px;
    }

    .page-blog__hero-image {
        max-height: 300px;
        margin-bottom: 20px;
    }

    .page-blog__main-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        padding: 0 10px;
    }

    .page-blog__hero-cta-button {
        padding: 10px 25px;
        font-size: 1em;
    }

    /* Latest Articles Section Mobile */
    .page-blog__latest-articles-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr; /* Single column for articles */
        gap: 20px;
    }

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

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

    .page-blog__article-excerpt {
        font-size: 0.9em;
    }

    /* Categories Section Mobile */
    .page-blog__categories-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }

    .page-blog__category-grid {
        grid-template-columns: 1fr; /* Single column for categories */
        gap: 20px;
    }

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

    /* Why Follow Section Mobile */
    .page-blog__why-follow-section {
        padding: 40px 0;
        margin-bottom: 30px;
    }

    .page-blog__feature-list {
        grid-template-columns: 1fr; /* Single column for features */
        margin: 20px auto;
        padding: 0 15px;
    }

    .page-blog__feature-item {
        padding: 20px;
        text-align: center;
    }
    
    .page-blog__feature-item p {
        text-align: center;
    }

    /* FAQ Section Mobile */
    .page-blog__faq-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }

    .page-blog__faq-item {
        margin-bottom: 10px;
    }

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

    .page-blog__faq-answer {
        padding: 10px 20px 15px;
        font-size: 0.95em;
    }

    /* Join Community Section Mobile */
    .page-blog__join-community-section {
        padding: 40px 0;
        margin-bottom: 30px;
    }

    .page-blog__cta-buttons-wrapper {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
    }

    /* General Image & Button Responsive for Mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__article-card,
    .page-blog__category-card,
    .page-blog__feature-item,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .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__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;
        flex-wrap: wrap !important;
        gap: 10px;
    }
}

/* --- Tablet Responsive Styles (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .page-blog__container {
        padding: 0 25px;
    }
    
    .page-blog__section-title {
        font-size: 2.2em;
    }

    .page-blog__hero-image {
        max-height: 400px;
    }

    .page-blog__main-title {
        font-size: clamp(2.2rem, 4vw, 3rem);
    }

    .page-blog__article-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }

    .page-blog__category-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }

    .page-blog__feature-list {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }

    .page-blog__cta-buttons-wrapper {
        flex-wrap: wrap;
        gap: 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        flex: 1 1 auto; /* Allow buttons to grow/shrink */
    }
}