/* style/blog.css */

/* Variables and base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
}

/* 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 */
    box-sizing: border-box;
    background-color: #f5f5f5; /* Light background for hero section */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
}

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

.page-blog__hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-blog__main-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem); /* Responsive H1 font size */
    color: #26A9E0; /* Brand color for title */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

.page-blog__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #555555;
}

/* Section titles */
.page-blog__section-title {
    font-size: 2.2rem;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

/* Latest Posts Section */
.page-blog__latest-posts-section {
    background-color: #ffffff;
}

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

.page-blog__post-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__post-title {
    font-size: 1.4rem;
    color: #26A9E0;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: bold;
}

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

.page-blog__post-date {
    font-size: 0.85rem;
    color: #888888;
    display: block;
}

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

/* Categories Section */
.page-blog__categories-section {
    background-color: #f0f8ff; /* Light blue background */
}

.page-blog__category-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item {
    background-color: #26A9E0;
    border-radius: 25px;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.page-blog__category-item:hover {
    background-color: #1a7fb3; /* Darker shade on hover */
}

.page-blog__category-item a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

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

.page-blog__cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

.page-blog__cta-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Ensure buttons wrap on small screens */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

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

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

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

.page-blog__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #1a7fb3;
    border-color: #1a7fb3;
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: #ffffff;
}

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

.page-blog__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: #26A9E0;
    background-color: #f0f8ff; /* Light blue background for question */
    border-bottom: 1px solid #e0e0e0;
    list-style: none; /* For <details> summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none; /* For <details> summary */
}

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

.page-blog__faq-toggle {
    font-size: 1.5rem;
    margin-left: 15px;
    color: #26A9E0;
}

.page-blog__faq-answer {
    padding: 15px 25px;
    font-size: 1rem;
    color: #555555;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(1.6rem, 4vw, 2.5rem);
    }
    .page-blog__section-title {
        font-size: 2rem;
    }
    .page-blog__cta-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles --header-offset */
    }

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

    .page-blog__main-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

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

    .page-blog__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

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

    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__cta-section {
        padding: 60px 15px;
    }

    .page-blog__cta-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .page-blog__cta-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        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 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .page-blog__faq-answer {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    /* Mobile image responsiveness */
    .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 đã đảm nhiệm --header-offset, cấm dùng var(--header-offset) tại đây */
    }
    
    /* Video specific responsive styles for mobile */
    .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-section {
      padding-top: 10px !important;
    }
    
    .page-blog__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
}