/* style/blog.css */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Default body background */
}

.page-blog__hero-section {
    background-color: #26A9E0; /* Primary brand color for hero background */
    padding: 40px 20px;
    text-align: center;
    color: #FFFFFF; /* White text on primary background */
}

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.page-blog__description {
    font-size: 1.15rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure button doesn't exceed container width */
}

.page-blog__btn-primary {
    background-color: #EA7C07; /* Login button color */
    color: #FFFFFF;
    border: 2px solid #EA7C07;
}

.page-blog__btn-primary:hover {
    background-color: #d16b06;
    border-color: #d16b06;
}

.page-blog__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0; /* Primary brand color */
    border: 2px solid #FFFFFF;
}

.page-blog__btn-secondary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
}

.page-blog__btn-tertiary {
    background-color: #26A9E0;
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

.page-blog__btn-tertiary:hover {
    background-color: #1e87c4;
    border-color: #1e87c4;
}

.page-blog__article-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-blog__content-section {
    margin-bottom: 40px;
}

.page-blog__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #26A9E0; /* Primary brand color for section titles */
    margin-bottom: 25px;
    text-align: center;
}

.page-blog__content-section p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.page-blog__sub-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-blog__list {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
}

.page-blog__list li {
    margin-bottom: 10px;
    font-size: 1rem;
}

.page-blog__image-figure {
    margin: 30px 0;
    text-align: center;
}

.page-blog__article-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block; /* Ensures image takes up full width in its container */
    margin: 0 auto;
}

.page-blog__image-caption {
    font-style: italic;
    font-size: 0.9rem;
    color: #666666;
    margin-top: 10px;
}

.page-blog__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
}

.page-blog__faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-blog__faq-answer {
    font-size: 1rem;
    color: #555555;
}

.page-blog__cta-section {
    background-color: #F0F8FF; /* Light blue background for CTA */
    padding: 50px 20px;
    text-align: center;
    border-radius: 12px;
}

.page-blog__cta-section .page-blog__section-title {
    color: #26A9E0;
}

.page-blog__cta-section p {
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap */
    width: 100%; /* Ensure container takes full width for responsive behavior */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-blog__related-articles {
    padding: 40px 0;
    text-align: center;
}

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

.page-blog__card {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #333333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

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

.page-blog__card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #26A9E0;
    margin: 15px 15px 10px 15px;
    flex-grow: 1;
    text-align: left;
}

.page-blog__card-meta {
    font-size: 0.9rem;
    color: #666666;
    margin: 0 15px 15px 15px;
    text-align: left;
}

/* --- Responsive Styles --- */

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

    /* 1. 顶区标题 + 双 CTA */
    .page-blog__hero-section {
        padding: 25px 15px;
    }

    .page-blog__main-title {
        font-size: clamp(2rem, 8vw, 2.5rem); /* Adjust for smaller screens */
    }

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

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

    .page-blog__btn {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    /* 2. 单栏长文容器 */
    .page-blog__article-wrap {
        padding: 20px 15px;
    }

    .page-blog__content-section,
    .page-blog__cta-section {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-blog__sub-title {
        font-size: 1.3rem;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .page-blog__list,
    .page-blog__faq-item {
        padding-left: 0;
        margin-left: 15px;
    }

    /* 3. 通用图片与 figure */
    .page-blog__article-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__image-figure {
        margin: 20px 0;
    }

    /* 4. 按钮与按钮容器 (already covered in hero-cta and general .page-blog__btn) */
    .page-blog__cta-buttons {
        flex-direction: column; /* Ensure CTA buttons stack */
        gap: 10px;
        padding: 0 15px;
    }

    /* 5. 注册教程与 FAQ 区块 (FAQ is handled as h3 Q&A, general text styling applies) */
    .page-blog__faq-item {
        padding: 15px;
    }

    .page-blog__faq-question {
        font-size: 1.1rem;
    }

    .page-blog__article-cards {
        grid-template-columns: 1fr; /* Single column for cards */
        padding: 0 15px;
    }

    .page-blog__card-image {
        height: 200px; /* Adjust card image height for mobile */
    }

    .page-blog__card-title,
    .page-blog__card-meta {
        margin-left: 10px;
        margin-right: 10px;
    }

    .page-blog__related-articles {
        padding: 30px 0;
    }
}