/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: #0a0a0a; /* Ensure consistency with body background */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    text-align: center;
    overflow: hidden;
    background-color: #0a0a0a; /* Dark background */
    color: #ffffff;
}

.page-blog__hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}

.page-blog__hero-content {
    max-width: 900px;
    width: 100%; /* Ensure content takes full width up to max-width */
    z-index: 1;
}

.page-blog__hero-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #26A9E0; /* Brand color for emphasis */
}

.page-blog__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* General Container */
.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section Titles and Text */
.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #26A9E0; /* Brand color */
}

.page-blog__section-title--white {
    color: #ffffff;
}

.page-blog__section-text {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 20px auto;
    color: #cccccc;
}

.page-blog__section-text--white {
    color: #ffffff;
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background */
    color: #ffffff;
}

/* Featured Posts Section */
.page-blog__featured-posts {
    padding: 80px 0;
    background-color: #0a0a0a; /* Dark background */
}

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

.page-blog__post-card {
    background-color: #1a1a1a; /* Card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff; /* Text color for cards */
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #26A9E0; /* Brand color for titles */
}

.page-blog__post-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-blog__post-date {
    font-size: 0.85em;
    color: #888888;
    display: block;
    margin-bottom: 10px;
}

.page-blog__read-more {
    display: inline-block;
    color: #26A9E0;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #EA7C07; /* Login color for hover */
}

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

/* Call to Action Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand color background */
    color: #ffffff;
    text-align: center;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    text-align: center;
}

.page-blog__btn-primary {
    background-color: #EA7C07; /* Login color */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

.page-blog__btn-primary:hover {
    background-color: #cc6a00;
    border-color: #cc6a00;
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-blog__btn-secondary--white-text {
    color: #ffffff;
    border-color: #ffffff;
}

.page-blog__btn-secondary--white-text:hover {
    background-color: #ffffff;
    color: #26A9E0;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Dark background */
    color: #ffffff;
}

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

.page-blog__faq-item {
    background-color: #0a0a0a; /* Darker background for FAQ items */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    color: #26A9E0; /* Brand color for question */
    outline: none;
    list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit browsers */
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    margin-left: 20px;
    transition: transform 0.3s ease;
    color: #ffffff; /* White toggle icon */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'minus' effect */
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: #cccccc;
    line-height: 1.7;
}

.page-blog__faq-answer p {
    margin-bottom: 0;
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: clamp(2em, 5vw, 3em);
    }

    .page-blog__section-title {
        font-size: 2em;
    }

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

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Small top padding for mobile */
    }

    .page-blog__hero-image {
        margin-bottom: 20px;
    }

    .page-blog__hero-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__introduction-section,
    .page-blog__featured-posts,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding: 50px 0;
    }

    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .page-blog__section-text {
        font-size: 1em;
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-blog__post-image {
        height: 180px;
    }

    .page-blog__post-title {
        font-size: 1.2em;
    }

    .page-blog__post-excerpt {
        font-size: 0.9em;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .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__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-blog__faq-list {
        margin-top: 30px;
    }

    .page-blog__faq-item summary {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .page-blog__faq-answer {
        padding: 0 20px 15px 20px;
    }

    /* Mobile image and video responsive adaptation */
    .page-blog img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    
    .page-blog__video-section {
      padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
    }

    .page-blog video,
    .page-blog__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important;
    }
    
    .page-blog__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
}

/* Ensure no filter on images */
.page-blog img {
    filter: none;
}