/* Custom Colors */
:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --background-color: #F4F7FB;
    --text-main-color: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
}

.page-blog {
    font-family: 'Arial', sans-serif;
    color: var(--text-main-color); /* Body background is light, so use dark text */
    background-color: var(--background-color);
    line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    margin-bottom: 40px;
    text-align: center;
    background-color: var(--background-color);
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for aesthetic */
    overflow: hidden;
    margin-bottom: 20px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover the area, but mobile will be contain */
    border-radius: 10px;
}

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

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* Use clamp for H1 */
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.1rem;
    color: var(--text-main-color);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* General Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog a[class*="button"],
.page-blog a[class*="btn"] {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For responsive buttons */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
}

.page-blog__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-blog__btn-secondary {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.2);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 40px 0;
    background-color: var(--card-bg); /* Use card background for this section */
    margin-bottom: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.page-blog__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-black);
    text-align: center;
    margin-bottom: 15px;
}

.page-blog__section-description {
    font-size: 1.1rem;
    color: var(--text-main-color);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__article-card {
    background: var(--card-bg);
    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;
    display: flex;
    flex-direction: column;
}

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

.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.3rem;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 10px;
    line-height: 1.4;
}

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

.page-blog__article-summary {
    font-size: 1rem;
    color: var(--text-main-color);
    margin-bottom: 15px;
    flex-grow: 1;
}

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

/* About Blog Section */
.page-blog__about-blog-section {
    padding: 60px 0;
    background-color: var(--background-color);
    margin-bottom: 40px;
}

.page-blog__about-blog-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.page-blog__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-blog__text-block {
    flex: 2;
}

.page-blog__text-block p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-main-color);
}

.page-blog__text-block p strong {
    color: var(--text-black);
}

.page-blog__image-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__info-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.page-blog__info-cta p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 15px;
    text-align: center;
}

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

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px; /* Slightly larger radius */
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Increased padding */
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  font-weight: 600;
  color: var(--text-black);
}
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: #f0f4f9; /* Lighter hover background */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.1rem; /* Slightly larger font */
  line-height: 1.5;
  text-align: left;
}
.page-blog__faq-toggle {
  font-size: 26px; /* Larger icon */
  font-weight: bold;
  color: var(--primary-color); /* Use brand color for toggle */
  flex-shrink: 0;
  margin-left: 20px; /* Increased margin */
  width: 30px; /* Larger width */
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px; /* Consistent padding */
  background: #f9fbfc; /* Lighter background for answer */
  border-radius: 0 0 10px 10px;
  color: var(--text-main-color);
  font-size: 1rem;
}
details.page-blog__faq-item .page-blog__faq-answer p {
    margin: 0; /* Remove default paragraph margin */
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__container {
        padding: 15px;
    }

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

    .page-blog__main-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }

    .page-blog__hero-description,
    .page-blog__section-description {
        font-size: 1rem;
    }

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

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

    .page-blog__article-image {
        height: 200px;
    }

    .page-blog__about-blog-section {
        padding: 50px 0;
    }

    .page-blog__content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__text-block,
    .page-blog__image-block {
        flex: none;
        width: 100%;
    }

    .page-blog__info-image {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding, body handles header offset */
        margin-bottom: 30px;
    }

    .page-blog__hero-image-wrapper {
        max-height: unset; /* Remove max-height for mobile */
    }

    .page-blog__hero-image {
        object-fit: contain !important; /* Ensure image is fully visible, not cropped */
        aspect-ratio: unset !important; /* Allow aspect ratio to adjust */
        width: 100% !important; /* Ensure image takes full width */
        height: auto !important; /* Adjust height automatically */
    }

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

    .page-blog__hero-description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .page-blog__hero-cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to container */
    }
    
    /* 按钮与按钮容器 */
    .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; /* Adjust padding for mobile */
    }

    .page-blog__hero-cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden; /* Prevent overflow */
        flex-wrap: wrap !important;
        gap: 10px;
    }

    /* 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-blog__container,
    .page-blog__latest-articles-section,
    .page-blog__about-blog-section,
    .page-blog__faq-section,
    .page-blog__article-card,
    .page-blog__content-wrapper, /* Ensure all content containers are responsive */
    .page-blog__text-block,
    .page-blog__image-block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 产品展示图区域 - Blog page doesn't have a dedicated "product display" section like homepage.
       The article grid behaves like a product display, so apply similar rules. */
    .page-blog__latest-articles-section {
        padding: 30px 0;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

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

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

    .page-blog__article-title {
        font-size: 1.1rem;
    }

    .page-blog__article-summary {
        font-size: 0.95rem;
    }

    /* 装饰主标题 + 长文 SEO 区 */
    .page-blog__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 10px;
        text-align: center;
    }

    .page-blog__section-description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .page-blog__about-blog-section {
        padding: 30px 0;
    }

    .page-blog__content-wrapper {
        flex-direction: column;
        gap: 20px;
        align-items: stretch; /* Stretch items to full width */
    }

    .page-blog__image-block {
        padding: 15px;
    }

    .page-blog__info-image {
        max-width: 100%; /* Ensure full width on mobile */
    }

    .page-blog__text-block p {
        font-size: 0.95rem;
    }

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

    details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
    .page-blog__faq-qtext { font-size: 1rem; }
    .page-blog__faq-toggle {
        font-size: 22px;
        margin-left: 15px;
        width: 25px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 15px 15px;
        font-size: 0.95rem;
    }
}