/* style/blog.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-blog {
    color: #333333; /* Default text color for light body background #F4F7FB */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #F4F7FB; /* Ensure main content area respects body background */
}

.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    padding: 0 20px 60px; /* Adjust padding as per "page首屏仅小顶距" for the section, image will be full width */
    padding-top: 10px; /* Small top padding as per requirement */
    background-color: #F4F7FB; /* Match body background */
}

.page-blog__hero-image {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px; /* Space between image and content */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-blog__main-title {
    font-size: clamp(2rem, 3.5vw, 3rem); /* Using clamp as per H1 rule */
    color: #1F2D3D; /* Custom Text Main */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: 1.1rem;
    color: #1F2D3D; /* Custom Text Main */
    margin-bottom: 30px;
}

.page-blog__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom Button color */
    color: #ffffff; /* White text for primary button */
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.6);
}

.page-blog__posts-section {
    padding: 60px 0;
    background-color: #F4F7FB; /* Ensure main content area respects body background */
}

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

.page-blog__section-title {
    font-size: 2.2rem;
    color: #1F2D3D; /* Custom Text Main */
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

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

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

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency, will be auto on mobile */
    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: 1.4rem;
    color: #1F2D3D; /* Custom Text Main */
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1; /* Allow title to take available space */
}

.page-blog__post-title:hover {
    color: #2F6BFF; /* Hover effect with main brand color */
}

.page-blog__post-date {
    font-size: 0.9rem;
    color: #6a737d;
    margin-bottom: 15px;
    display: block;
}

.page-blog__post-excerpt {
    font-size: 1rem;
    color: #333333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.page-blog__read-more {
    display: inline-block;
    color: #2F6BFF; /* Main brand color for read more */
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
    text-decoration: underline;
}

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

.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    background-color: #FFFFFF; /* White background */
    color: #2F6BFF; /* Main brand color for text */
    border: 2px solid #2F6BFF; /* Main brand color for border */
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__btn-secondary:hover {
    background-color: #2F6BFF; /* Main brand color on hover */
    color: #ffffff; /* White text on hover */
}

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

    .page-blog__hero-section {
        padding: 0 15px 40px;
        padding-top: 10px !important; /* Small top padding for mobile */
    }

    .page-blog__hero-image {
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .page-blog__btn-primary {
        padding: 12px 25px;
        font-size: 0.95rem;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__posts-section {
        padding: 40px 0;
    }

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

    .page-blog__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-blog__post-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .page-blog__post-image {
        height: 180px; /* Adjust height for mobile */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

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

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

    .page-blog__post-excerpt {
        font-size: 0.95rem;
    }

    .page-blog__view-all-wrapper {
        margin-top: 40px;
    }

    .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-left: 15px;
        padding-right: 15px;
    }

    /* All images, videos, and their containers must be responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog video,
    .page-blog__video { /* If video elements are ever added */
        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; /* Prevent horizontal scroll */
    }
}