/* General Styling */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #FFF5E1; /* Main text color from custom colors, implies dark background */
    background-color: #B71C1C; /* Background color from custom colors */
}

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

.page-blog__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #FFD86A; /* Gold color for titles */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-blog__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #F4D34D; /* Gold color for underline */
    border-radius: 2px;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, not var(--header-offset) */
    padding-bottom: 60px;
    overflow: hidden;
    background-color: #7A0E0E; /* Deep Red background for hero */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-blog__hero-image {
    width: 100%;
    max-height: 500px; /* Limit hero image height */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Default cover, will be contain on mobile */
}

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 15px;
    z-index: 1;
}

.page-blog__main-title {
    font-size: clamp(28px, 4vw, 48px); /* H1 font size with clamp */
    font-weight: 800;
    color: #FFD86A; /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: 18px;
    color: #FFF5E1; /* Main text color */
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button gradient */
    color: #7A0E0E; /* Deep Red text for primary button */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 216, 106, 0.4);
}

.page-blog__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: #FFD86A; /* Gold text for secondary button */
    border: 2px solid #F2B544; /* Gold border */
    margin-left: 20px;
}

.page-blog__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Blog Posts Section */
.page-blog__posts-section {
    padding: 60px 0;
    background-color: #B71C1C; /* Background from custom colors */
}

.page-blog__posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.page-blog__post-card {
    background-color: #D32F2F; /* Card BG from custom colors */
    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__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-blog__post-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-blog__post-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFD86A; /* Gold for post titles */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-meta {
    font-size: 14px;
    color: #F2B544; /* Border color for meta info */
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 16px;
    color: #FFF5E1; /* Main text color */
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: #FFD86A; /* Gold color */
    font-weight: 600;
    text-decoration: underline;
}

.page-blog__view-all-wrapper {
    grid-column: 1 / -1; /* Span full width */
    text-align: center;
    margin-top: 30px;
}

/* About NN888 Section */
.page-blog__about-nn888-section {
    padding: 60px 0;
    background-color: #D32F2F; /* Card BG for this section */
    color: #FFF5E1; /* Main text color */
}

.page-blog__about-nn888-section .page-blog__section-title {
    color: #FFD86A;
}

.page-blog__content-area p {
    font-size: 17px;
    margin-bottom: 20px;
    color: #FFF5E1;
}

.page-blog__content-area .page-blog__btn-primary {
    margin-top: 30px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #B71C1C; /* Background from custom colors */
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border color from custom colors */
  overflow: hidden;
  background: #7A0E0E; /* Deep Red for FAQ item background */
}
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: #5a0a0a; /* Darker Deep Red on hover */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFD86A; /* Gold for FAQ question text */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFCC66; /* 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: #7A0E0E; /* Deep Red for FAQ answer background */
  border-radius: 0 0 5px 5px;
  color: #FFF5E1; /* Main text color for answer */
}
.page-blog__faq-answer p {
    margin-bottom: 0;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #C91F17; /* Main brand color for CTA background */
    color: #FFF5E1; /* Main text color */
}

.page-blog__cta-title {
    font-size: 38px;
    font-weight: 700;
    color: #FFD86A; /* Gold for CTA title */
    margin-bottom: 20px;
}

.page-blog__cta-description {
    font-size: 20px;
    color: #FFF5E1; /* Main text color */
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-section {
        padding-bottom: 40px;
    }
    .page-blog__main-title {
        font-size: clamp(26px, 4.5vw, 42px);
    }
    .page-blog__description {
        font-size: 17px;
    }
    .page-blog__posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-blog__post-title {
        font-size: 20px;
    }
    .page-blog__cta-title {
        font-size: 32px;
    }
    .page-blog__cta-description {
        font-size: 18px;
    }
    .page-blog__faq-qtext {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
        padding-bottom: 30px;
    }
    .page-blog__hero-image img {
        object-fit: contain !important; /* Prevent cropping on mobile */
        aspect-ratio: unset !important; /* Remove fixed aspect ratio */
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__main-title {
        font-size: clamp(24px, 6vw, 36px);
        margin-bottom: 15px;
    }
    .page-blog__description {
        font-size: 15px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 12px 20px;
        font-size: 16px;
        width: 100% !important; /* Full width for buttons */
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0;
    }
    .page-blog__btn-secondary {
        margin-top: 15px; /* Add top margin for stacked buttons */
    }
    .page-blog__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        padding: 0 15px; /* Add padding to button container */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Blog Posts Section */
    .page-blog__posts-section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column for posts */
        gap: 20px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-blog__post-thumbnail {
        height: 180px; /* Adjust thumbnail height */
    }
    .page-blog__post-title {
        font-size: 18px;
    }
    .page-blog__post-excerpt {
        font-size: 15px;
    }
    .page-blog__view-all-wrapper {
        padding: 0 15px;
    }

    /* About NN888 Section */
    .page-blog__about-nn888-section {
        padding: 40px 0;
    }
    .page-blog__content-area p {
        font-size: 15px;
        padding: 0 15px;
    }
    .page-blog__content-area .page-blog__btn-primary {
        margin-top: 20px;
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }
    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;
    }

    /* CTA Section */
    .page-blog__cta-section {
        padding: 50px 0;
    }
    .page-blog__cta-title {
        font-size: 28px;
    }
    .page-blog__cta-description {
        font-size: 16px;
        padding: 0 15px;
    }
    .page-blog__cta-buttons {
        gap: 10px;
    }

    /* Universal image responsive styles */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__container,
    .page-blog__posts-section .page-blog__container,
    .page-blog__about-nn888-section .page-blog__container,
    .page-blog__faq-section .page-blog__container,
    .page-blog__cta-section .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}