/* 基础变量和通用样式 */
:root {
    --primary-color: #E53935;
    --accent-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --background-color: #F5F7FA;
    --border-color: #E0E0E0;
    --header-offset: 122px; /* Placeholder, actual value from shared.css */
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color);
    background-color: var(--background-color);
}

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

.page-blog__section-title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
    background-color: var(--primary-color);
}

.page-blog__hero-image {
    width: 100%;
    max-height: 675px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    text-align: center;
    color: #ffffff;
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__main-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-blog__hero-section .page-blog__description {
    font-size: 20px;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: none;
}

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

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

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

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 60px 0;
    background-color: var(--background-color);
}

.page-blog__latest-articles .page-blog__section-title {
    color: var(--text-main-color);
}

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

.page-blog__article-card {
    background: var(--card-bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-blog__article-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.page-blog__article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-blog__article-content {
    padding: 25px;
}

.page-blog__article-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 16px;
    color: var(--text-main-color);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-blog__read-more-btn {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
    color: var(--primary-color);
}

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

/* Content Section */
.page-blog__content-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-blog__content-section .page-blog__section-title,
.page-blog__content-section .page-blog__section-description {
    color: #ffffff;
}

.page-blog__article-body {
    max-width: 900px;
    margin: 40px auto 0;
    font-size: 17px;
    line-height: 1.8;
}

.page-blog__article-body h3 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-blog__article-body p {
    margin-bottom: 20px;
    color: #f0f0f0;
}

.page-blog__article-figure {
    margin: 30px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.page-blog__article-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.page-blog__article-figure figcaption {
    font-size: 15px;
    color: #cccccc;
    padding: 10px 15px;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--background-color);
}

.page-blog__faq-section .page-blog__section-title {
    color: var(--text-main-color);
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg-color);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main-color);
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-main-color);
}

/* CTA Bottom Section */
.page-blog__cta-bottom {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: center;
}

.page-blog__cta-bottom .page-blog__section-title,
.page-blog__cta-bottom .page-blog__section-description {
    color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__container {
        padding: 20px 30px;
    }
    .page-blog__main-title {
        font-size: clamp(30px, 4.5vw, 42px);
    }
    .page-blog__hero-section .page-blog__description {
        font-size: 18px;
    }
    .page-blog__article-title {
        font-size: 20px;
    }
    .page-blog__article-body h3 {
        font-size: 26px;
    }
}

@media (max-width: 849px) {
    .page-blog__hero-image img {
        object-fit: contain !important; /* Prevent cropping */
        aspect-ratio: unset !important; /* Allow natural aspect ratio */
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px;
    }

    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
    }
    .page-blog__hero-content {
        padding: 30px 15px;
    }
    .page-blog__main-title {
        font-size: clamp(28px, 8vw, 38px);
    }
    .page-blog__hero-section .page-blog__description {
        font-size: 16px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Latest Articles Section */
    .page-blog__latest-articles {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: clamp(24px, 7vw, 30px);
        padding: 0 15px;
    }
    .page-blog__section-description {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    .page-blog__article-image-wrapper {
        height: 180px;
    }
    .page-blog__article-content {
        padding: 20px;
    }
    .page-blog__article-title {
        font-size: 18px;
    }
    .page-blog__article-excerpt {
        font-size: 15px;
    }
    .page-blog__read-more-btn {
        font-size: 15px;
    }
    .page-blog__view-all {
        padding: 0 15px;
    }

    /* Content Section */
    .page-blog__content-section {
        padding: 40px 0;
    }
    .page-blog__article-body {
        margin-top: 30px;
        font-size: 16px;
        padding: 0 15px;
    }
    .page-blog__article-body h3 {
        font-size: 24px;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    .page-blog__article-figure {
        margin: 20px 0;
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }
    .page-blog__faq-list {
        padding: 0 15px;
    }
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px;
    }
    .page-blog__faq-qtext {
        font-size: 15px;
    }
    .page-blog__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
        margin-left: 10px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 15px 15px;
    }

    /* CTA Bottom Section */
    .page-blog__cta-bottom {
        padding: 40px 0;
    }

    /* Universal mobile image and container responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__article-card,
    .page-blog__article-image-wrapper,
    .page-blog__hero-image,
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container,
    .page-blog__articles-grid,
    .page-blog__article-figure {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    /* Ensure content area does not cause horizontal scroll */
    .page-blog {
        overflow-x: hidden;
    }
}