/* General styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for dark body background */
    background-color: var(--deep-navy); /* From shared.css, ensure text contrast */
}

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

.page-blog__section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, assuming body handles header offset */
    margin-bottom: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for desktop */
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover for desktop */
    object-position: center;
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    width: 100%;
    max-width: 900px;
    margin-top: -100px; /* Overlap slightly with image for visual effect */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: var(--card-bg); /* Dark background for content */
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* H1 clamp for responsive font size */
    font-weight: 800;
    color: var(--gold); /* Using gold for prominence */
    margin-bottom: 15px;
    line-height: 1.2;
    max-width: 90%;
}

.page-blog__hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 80%;
}

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    width: 100%; /* Ensure container takes full width for flex-wrap */
    max-width: 500px; /* Limit max width for button group */
}

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

.page-blog__btn-primary {
    background: var(--button-gradient); /* Custom button gradient */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-blog__btn-secondary {
    background: transparent;
    color: var(--glow); /* Using glow color for secondary button text */
    border: 2px solid var(--glow);
}

.page-blog__btn-secondary:hover {
    background: rgba(79, 168, 255, 0.1); /* Light background on hover */
    transform: translateY(-2px);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
    padding: 60px 0;
    background-color: var(--deep-navy);
}

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

.page-blog__blog-card {
    background: var(--card-bg); /* Dark background for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

.page-blog__blog-card-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    overflow: hidden;
}

.page-blog__blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__blog-card:hover .page-blog__blog-card-image {
    transform: scale(1.05);
}

.page-blog__blog-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
}

.page-blog__blog-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-blog__blog-card-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__blog-card-date {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
}

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

/* Featured Topics Section */
.page-blog__featured-topics-section {
    padding: 60px 0;
    background-color: #f9f9f9; /* Light background for contrast */
}

.page-blog__text-dark {
    color: #333333; /* Dark text for light background */
}
.page-blog__text-secondary-dark {
    color: #666666; /* Secondary dark text for light background */
}

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

.page-blog__topic-card {
    background: #ffffff; /* White background for topic cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-blog__topic-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

.page-blog__topic-card-title {
    font-size: 22px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-blog__topic-card-text {
    font-size: 15px;
    color: #666666;
    margin-bottom: 20px;
    padding: 0 15px;
    flex-grow: 1;
}

/* About King88vin One Section */
.page-blog__about-king88vin-one-section {
    padding: 60px 0;
    background-color: var(--card-bg); /* Dark background */
    color: var(--text-main);
}

.page-blog__content-area p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

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

.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 var(--border); /* Custom border color */
  overflow: hidden;
  background: var(--card-bg); /* Dark background for FAQ items */
  color: var(--text-main);
}
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;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}
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: rgba(255, 255, 255, 0.05); /* Slight hover effect on dark background */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--glow); /* Using glow color for toggle icon */
  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: rgba(255, 255, 255, 0.03); /* Slightly lighter dark background for answer */
  border-radius: 0 0 5px 5px;
  color: var(--text-secondary);
}
.page-blog__faq-answer p {
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Universal Image Responsiveness (Desktop) */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Media Queries */

/* Specific rule for hero image object-fit for smaller desktops/tablets */
@media (max-width: 849px) {
    .page-blog__hero-image {
        object-fit: contain !important; /* Prevent cropping on smaller screens */
        aspect-ratio: unset !important; /* Allow natural aspect ratio */
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-blog__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
        margin-bottom: 30px;
    }

    .page-blog__hero-image-wrapper {
        max-height: 300px; /* Adjust height for mobile */
    }

    .page-blog__hero-image {
        object-fit: contain !important;
        aspect-ratio: unset !important;
    }

    .page-blog__hero-content {
        padding: 30px 15px;
        margin-top: -50px; /* Less overlap on mobile */
        max-width: calc(100% - 30px);
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem); /* Smaller clamp for mobile H1 */
        max-width: 100%;
    }

    .page-blog__hero-description {
        font-size: 16px;
        max-width: 95%;
    }

    /* 按钮与按钮容器 */
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 产品展示图区域 (Blog list is similar in layout) */
    .page-blog__latest-posts-section {
        padding: 40px 0;
    }

    .page-blog__blog-list {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
        margin-top: 30px;
        overflow-x: hidden;
    }

    .page-blog__blog-card-image-wrapper {
        height: 180px; /* Adjust height for mobile card images */
    }

    .page-blog__blog-card-title {
        font-size: 18px;
    }

    .page-blog__blog-card-excerpt {
        font-size: 14px;
    }

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

    /* 装饰主标题 + 长文 SEO 区 (Featured Topics and About sections) */
    .page-blog__featured-topics-section {
        padding: 40px 0;
    }

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

    .page-blog__topic-card-image {
        height: 180px;
    }

    .page-blog__topic-card-title {
        font-size: 20px;
    }

    .page-blog__topic-card-text {
        font-size: 14px;
    }

    .page-blog__about-king88vin-one-section {
        padding: 40px 0;
    }

    .page-blog__content-area p {
        font-size: 15px;
    }

    /* 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-content,
    .page-blog__about-king88vin-one-section,
    .page-blog__faq-list,
    .page-blog__blog-list,
    .page-blog__topics-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Ensure padding-left/right for direct children of main or sections */
    .page-blog__latest-posts-section > .page-blog__container,
    .page-blog__featured-topics-section > .page-blog__container,
    .page-blog__about-king88vin-one-section > .page-blog__container,
    .page-blog__faq-section > .page-blog__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Section Mobile */
    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;
    }
    .page-blog__faq-answer p {
        font-size: 14px;
    }
}