/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #FFF1E8); /* Default text color from custom scheme */
    background-color: var(--bg-color, #140C0C); /* Default background color from custom scheme */
}

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

.page-blog__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--gold, #F3C54D); /* Gold color for titles */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-blog__section-title--light {
    color: var(--text-main, #FFF1E8); /* Light text for dark backgrounds */
}

.page-blog__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold, #F3C54D), transparent);
    border-radius: 2px;
}

.page-blog__text-block {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
    color: var(--text-main, #FFF1E8);
}

.page-blog__text-block--light {
    color: var(--text-main, #FFF1E8);
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Small top padding as per requirement */
    background-color: var(--bg-color, #140C0C);
}

.page-blog__hero-image {
    width: 100%;
    height: 550px; /* Fixed height for desktop hero */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-blog__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Default cover for desktop */
    display: block;
    filter: brightness(0.7); /* Darken image for better text readability */
}

.page-blog__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    max-width: 800px;
    width: 90%;
    color: var(--text-main, #FFF1E8);
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main, #FFF1E8);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-main, #FFF1E8);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 100%; /* For responsive buttons */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Intro Section */
.page-blog__intro-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background for contrast */
    color: #333333; /* Dark text for light background */
}

.page-blog__intro-section .page-blog__section-title {
    color: #333333;
}

.page-blog__intro-section .page-blog__section-title::after {
    background: linear-gradient(90deg, transparent, #C61F1F, transparent);
}

.page-blog__intro-section .page-blog__text-block {
    color: #333333;
}

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--card-bg, #2A1212); /* Dark background from custom scheme */
}

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

.page-blog__category-card {
    background: var(--bg-color, #140C0C);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border, #6A1E1E);
}

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

.page-blog__category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-blog__card-content {
    padding: 20px;
    color: var(--text-main, #FFF1E8);
}

.page-blog__card-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-blog__card-title a {
    color: var(--gold, #F3C54D);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
    color: #FFB04A;
}

.page-blog__card-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.page-blog__btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: var(--gold, #F3C54D);
    border: 2px solid var(--gold, #F3C54D);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-secondary:hover {
    background-color: var(--gold, #F3C54D);
    color: var(--bg-color, #140C0C);
}

/* Featured Articles Section */
.page-blog__featured-articles {
    padding: 60px 0;
    background-color: #ffffff; /* Light background */
    color: #333333; /* Dark text */
}

.page-blog__featured-articles .page-blog__section-title {
    color: #333333;
}

.page-blog__featured-articles .page-blog__section-title::after {
    background: linear-gradient(90deg, transparent, #C61F1F, transparent);
}

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

.page-blog__article-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-blog__article-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333333;
    line-height: 1.4;
}

.page-blog__article-title:hover {
    color: #C61F1F;
}

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

.page-blog__article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
}

.page-blog__button-group {
    text-align: center;
    margin-top: 50px;
}

.page-blog__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Why Choose Section */
.page-blog__why-choose-section {
    padding: 60px 0;
    background-color: var(--deep-red, #7E0D0D); /* Deep Red background */
    color: var(--text-main, #FFF1E8);
}

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

.page-blog__list-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__list-title {
    font-size: 22px;
    color: var(--gold, #F3C54D);
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-blog__list-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-main, #FFF1E8);
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background */
    color: #333333; /* Dark text */
}

.page-blog__faq-section .page-blog__section-title {
    color: #333333;
}

.page-blog__faq-section .page-blog__section-title::after {
    background: linear-gradient(90deg, transparent, #C61F1F, transparent);
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
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: #333333; /* Ensure contrast on light background */
}
.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: #555555; /* Ensure contrast on light background */
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--bg-color, #140C0C); /* Dark background */
    color: var(--text-main, #FFF1E8);
}

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

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

/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__hero-image {
        height: 450px;
    }
    .page-blog__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-blog__hero-description {
        font-size: 1.1em;
    }
    .page-blog__section-title {
        font-size: 30px;
    }
    .page-blog__category-card,
    .page-blog__article-card,
    .page-blog__list-item {
        margin-bottom: 20px;
    }
    .page-blog__categories-grid,
    .page-blog__articles-grid,
    .page-blog__why-list {
        gap: 20px;
    }
}

@media (max-width: 849px) {
    /* HERO 主图区域: 移动 object-fit:contain !important; aspect-ratio:unset; 禁止 cover 裁切两侧; 顶距约 10px，禁止 var(--header-offset) */
    .page-blog__hero-image img {
        object-fit: contain !important;
        aspect-ratio: unset !important;
    }
    .page-blog__hero-image {
        height: auto; /* Allow height to adjust based on aspect-ratio */
        padding-bottom: 56.25%; /* 16:9 aspect ratio if object-fit:contain */
        position: relative;
    }
    .page-blog__hero-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    .page-blog__hero-content {
        position: relative; /* Adjust positioning for contain image */
        top: unset;
        left: unset;
        transform: none;
        padding: 20px 15px;
        background: rgba(0, 0, 0, 0.6); /* Add background for text readability */
        margin-top: -10px; /* Overlap slightly with the image for visual flow */
    }
    .page-blog__hero-section {
        padding-top: 10px; /* Explicitly ensure small padding */
    }
}

@media (max-width: 768px) {
    /* 通用图片与容器: .page-blog img 及内容区容器的 max-width: 100% 等 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__intro-section,
    .page-blog__categories-section,
    .page-blog__featured-articles,
    .page-blog__why-choose-section,
    .page-blog__faq-section,
    .page-blog__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding */
    }
    .page-blog__hero-image {
        height: auto;
        padding-bottom: 60%; /* Adjusted aspect ratio for mobile */
    }
    .page-blog__hero-content {
        padding: 20px 15px;
        margin-top: 0; /* No negative margin on mobile */
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }
    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* 产品展示图区域 (Categories Grid) */
    .page-blog__categories-grid {
        grid-template-columns: 1fr; /* Single column for categories on mobile */
        gap: 20px;
        overflow-x: hidden; /* Ensure no horizontal scroll */
    }
    .page-blog__category-card {
        width: 100%;
        box-sizing: border-box;
    }
    .page-blog__category-image {
        height: 180px;
    }

    /* 装饰主标题 + 长文 SEO 区 (Section Titles, Text Blocks, Article Cards) */
    .page-blog__section-title {
        font-size: 24px;
        margin-bottom: 30px;
        padding-bottom: 10px;
    }
    .page-blog__section-title::after {
        width: 60px;
        height: 3px;
    }
    .page-blog__text-block {
        font-size: 16px;
        text-align: left; /* Align text to left on mobile */
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column for articles on mobile */
        gap: 20px;
    }
    .page-blog__article-image {
        height: 180px;
    }
    .page-blog__article-title {
        font-size: 18px;
    }
    .page-blog__article-excerpt {
        font-size: 14px;
    }
    .page-blog__why-list {
        grid-template-columns: 1fr; /* Single column for why list */
        gap: 20px;
    }
    .page-blog__list-title {
        font-size: 20px;
    }
    .page-blog__list-description {
        font-size: 15px;
    }

    /* 按钮与按钮容器 */
    .page-blog__cta-button,
    .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: 12px 15px !important; /* Adjusted padding for mobile */
        font-size: 16px !important;
    }

    .page-blog__cta-buttons,
    .page-blog__button-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px; /* Spacing between stacked buttons */
    }

    /* FAQ */
    details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
    .page-blog__faq-qtext { font-size: 15px; }
    details.page-blog__faq-item .page-blog__faq-answer { padding: 0 15px 15px; }
}