/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    background-color: #0A0A0A; /* Matches custom color '背景' */
    color: #FFF6D6; /* Matches custom color 'Text Main' for good contrast on dark background */
}

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

/* Top Section */
.page-blog__top-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 40px;
    text-align: center;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.2rem); /* Using clamp for H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #FFD36B; /* Glow color for prominence */
}

.page-blog__intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__top-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-blog__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for button max-width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure buttons don't exceed container width */
}

.page-blog__btn--primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Custom button color */
    color: #111111; /* Dark text on bright button for contrast */
    border: none;
}

.page-blog__btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-blog__btn--secondary {
    background: #111111; /* Card BG color */
    color: #FFD36B; /* Glow color for text */
    border: 2px solid #3A2A12; /* Border color */
}

.page-blog__btn--secondary:hover {
    background: #1e1e1e;
    transform: translateY(-2px);
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #FFD36B; /* Glow color for prominence */
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    line-height: 1.3;
}

.page-blog__section-description {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

/* Featured Article Section */
.page-blog__featured-article-section {
    padding: 50px 0;
}

.page-blog__featured-article-card {
    display: flex;
    background-color: #111111; /* Card BG color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    flex-direction: column; /* Default to column for mobile first */
}

.page-blog__featured-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-blog__featured-content {
    padding: 30px;
}

.page-blog__featured-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-blog__featured-title a {
    color: #FFF6D6; /* Text Main color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__featured-title a:hover {
    color: #FFD36B; /* Glow color on hover */
}

.page-blog__article-meta {
    font-size: 0.95rem;
    color: #F2C14E; /* Main color for meta */
    margin-bottom: 10px;
}

.page-blog__article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #FFF6D6; /* Text Main color */
}

.page-blog__read-more-btn {
    display: inline-block;
    color: #FFD36B; /* Glow color */
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #FFD36B;
    padding-bottom: 3px;
    transition: all 0.3s ease;
}

.page-blog__read-more-btn:hover {
    color: #F2C14E; /* Main color on hover */
    border-color: #F2C14E;
}

/* Articles Grid Section */
.page-blog__articles-grid-section {
    padding: 50px 0;
}

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

.page-blog__article-card {
    background-color: #111111; /* Card BG color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.page-blog__article-thumbnail {
    width: 100%;
    height: 200px; /* Fixed height for thumbnails */
    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: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    flex-grow: 1; /* Allows title to take available space */
}

.page-blog__article-title a {
    color: #FFF6D6; /* Text Main color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #FFD36B; /* Glow color on hover */
}

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

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background-color: #111111; /* Card BG color for this section */
    text-align: center;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 1150px;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box; /* Include padding in width */
    overflow: hidden; /* Hide overflow */
}

/* General image styling for content area */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Desktop Specific Styles --- */
@media (min-width: 769px) {
    .page-blog__featured-article-card {
        flex-direction: row;
    }

    .page-blog__featured-image {
        width: 60%; /* Take more width on desktop */
        height: auto;
    }

    .page-blog__featured-content {
        width: 40%;
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    /* 1. Top Section Title + CTA */
    .page-blog__top-section {
        padding-top: 10px !important; /* Explicitly 10px, not header-offset */
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__main-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .page-blog__intro-text {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .page-blog__top-cta {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }

    /* 2. Single-column long article container - applicable to general content containers */
    .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__section-title {
        font-size: 1.8rem;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .page-blog__section-description {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 15px; /* Add padding to description itself */
    }

    /* 3. Generic images */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-blog__featured-image {
        height: auto; /* Ensure auto height on mobile */
    }

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

    /* 4. Buttons and button containers */
    .page-blog__btn,
    .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;
    }

    .page-blog__top-cta,
    .page-blog__cta-buttons {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
      flex-direction: column; /* Ensure vertical stacking for cta buttons */
    }

    /* Card Layouts */
    .page-blog__featured-article-card {
        flex-direction: column;
        margin-bottom: 20px;
    }

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

    .page-blog__featured-title {
        font-size: 1.5rem;
    }

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

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

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

    .page-blog__cta-section {
        padding: 40px 15px;
        margin: 20px auto;
    }

    /* 5. Registration tutorial and FAQ - not explicitly present on this blog list page, general content styling applies */
}

/* Color Contrast Enforcement - ensuring text is visible on various backgrounds */
/* Main page background is #0A0A0A (dark), so main text is #FFF6D6 (light) */
/* Card backgrounds are #111111 (dark), so card text is #FFF6D6 (light) */
/* Primary button background is gradient (bright), so text is #111111 (dark) */
/* Secondary button background is #111111 (dark), so text is #FFD36B (bright) */
/* All combinations meet WCAG AA contrast. */