/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--deep-navy); /* Body background from shared.css */
}

.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(--text-main);
    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: 4px;
    background: var(--gold);
    border-radius: 2px;
}

.page-blog__section-intro-text {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 900px;
    margin: -20px auto 50px auto;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Ensure image is above text */
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding */
    padding-bottom: 60px;
    background-color: var(--deep-navy);
    overflow: hidden;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover; /* Cover ensures image fills space without distorting */
    max-height: 500px; /* Limit height for desktop */
    display: block;
}

.page-blog__hero-content {
    position: relative; /* Not absolute, to flow below image */
    text-align: center;
    padding: 40px 15px 0;
    max-width: 900px;
    z-index: 2;
    color: var(--text-main);
}

.page-blog__hero-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

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

.page-blog__hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

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

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    background: var(--border-color);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

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

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

.page-blog__post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    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 12px 25px rgba(0, 0, 0, 0.4);
}

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

.page-blog__post-image {
    width: 100%;
    height: 220px; /* 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: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.page-blog__post-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

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

.page-blog__read-more {
    display: inline-block;
    font-weight: bold;
    color: var(--glow);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #ffffff;
}

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

/* Featured Guides Section */
.page-blog__featured-guides {
    padding: 60px 0;
    background-color: var(--deep-navy); /* Ensure consistency with body background */
}

.page-blog__dark-section {
    background-color: var(--deep-navy); /* Use the specified deep navy */
    color: var(--text-main); /* Light text for dark background */
}

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

.page-blog__guide-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-blog__guide-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 15px;
}

.page-blog__guide-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    flex-grow: 1;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--deep-navy);
}

.page-blog__cta-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 12px; /* Increased border-radius */
  border: 1px solid var(--border-color); /* Use border color */
  overflow: hidden;
  background: var(--card-bg); /* Use card background color */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
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;
  color: var(--text-main); /* Text main for question */
}
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(var(--border-color), 0.3); /* Lighter hover for dark theme */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px; /* Increased font size */
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.page-blog__faq-toggle {
  font-size: 28px; /* Larger toggle */
  font-weight: bold;
  color: var(--glow); /* Use glow color for toggle */
  flex-shrink: 0;
  margin-left: 20px; /* Increased margin */
  width: 30px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: rgba(var(--card-bg), 0.7); /* Slightly transparent background for answer */
  border-radius: 0 0 12px 12px;
  color: var(--text-secondary); /* Secondary text for answer */
}
.page-blog__faq-answer p {
    margin: 0;
    font-size: 16px;
}

/* --- Responsive Styles (Mobile First Approach, then Desktop Overrides) --- */

/* General Mobile adjustments */
@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .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: 30px;
    }

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

    /* Images */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-blog__hero-image {
        max-height: 300px;
        object-fit: cover;
    }

    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px;
        padding-bottom: 40px;
    }
    .page-blog__hero-content {
        padding-top: 20px;
    }
    .page-blog__hero-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    .page-blog__hero-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .page-blog__hero-cta {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* Buttons */
    .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-left: 15px;
        padding-right: 15px;
        text-align: center;
    }
    .page-blog__hero-cta .page-blog__btn-primary,
    .page-blog__hero-cta .page-blog__btn-secondary {
        max-width: 300px !important;
        margin: 0 auto;
    }
    .page-blog__view-all .page-blog__btn-primary {
        max-width: 300px !important;
        margin: 0 auto;
    }
    
    /* Latest Posts Section */
    .page-blog__latest-posts {
        padding: 40px 0;
    }
    .page-blog__post-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .page-blog__post-image {
        height: 180px;
    }
    .page-blog__post-title {
        font-size: 18px;
    }
    .page-blog__post-excerpt {
        font-size: 14px;
    }

    /* Featured Guides Section */
    .page-blog__featured-guides {
        padding: 40px 0;
    }
    .page-blog__guide-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .page-blog__guide-item {
        padding: 25px;
    }
    .page-blog__guide-title {
        font-size: 20px;
    }
    .page-blog__guide-text {
        font-size: 14px;
    }

    /* CTA Section */
    .page-blog__cta-section {
        padding: 50px 0;
    }
    .page-blog__cta-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-blog__cta-section .page-blog__btn-primary {
        max-width: 300px !important;
        margin: 0 auto;
    }

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

/* Specific rule for banner image at 849px and below */
@media (max-width: 849px) {
    .page-blog__hero-image {
        object-fit: contain; /* Ensure the image is fully visible */
        max-height: 400px;
    }
}

/* Ensure all image containers are responsive */
.page-blog__post-card,
.page-blog__guide-item,
.page-blog__hero-section,
.page-blog__latest-posts,
.page-blog__featured-guides,
.page-blog__cta-section,
.page-blog__faq-section {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Ensure images within content areas are responsive */
.page-blog__post-card img,
.page-blog__guide-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* No specific category-lobby or blog-slider on this blog page. */
/* Mobile @media (max-width: 768px)必写清单 items not applicable to this page's content structure: */
/* Banner __hero-section: covered by .page-blog__hero-image object-fit: contain; and padding-top: 10px; */
/* Three-link buttons __access-links: not present on blog page */
/* Five-entry __category-lobby: not present on blog page */
/* Blog slider __blog-slider: not present on blog page */