/* style/blog.css */

/* General styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #FFF1E8; /* Text Main */
    background-color: #140C0C; /* Background */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #C61F1F; /* Main color */
    color: #FFF1E8; /* Light text for dark background */
    overflow: hidden; /* Ensure content doesn't overflow */
    padding-top: 10px; /* Small top padding for the first section */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    box-sizing: border-box;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    max-width: 1200px; /* Constrain image width on larger screens */
    margin: 0 auto;
}

.page-blog__hero-content {
    max-width: 900px;
    margin-bottom: 30px;
    z-index: 1;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: bold;
    color: #F3C54D; /* Gold */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #FFF1E8;
}

/* Buttons */
.page-blog__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button color */
    color: #140C0C; /* Dark text for light button */
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #D86A14 0%, #FFB04A 100%);
}

.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background-color: transparent;
    color: #F3C54D; /* Gold */
    border: 2px solid #F3C54D; /* Gold border */
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-secondary:hover {
    background-color: #F3C54D;
    color: #140C0C; /* Dark text for gold button */
}

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

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

/* Text blocks */
.page-blog__text-block {
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: justify;
    color: #FFF1E8;
}

/* Intro Section */
.page-blog__intro-section {
    padding: 60px 0;
    background-color: #140C0C; /* Background */
    color: #FFF1E8;
}

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 60px 0;
    background-color: #2A1212; /* Card BG */
    color: #FFF1E8;
}

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

.page-blog__article-card {
    background-color: #140C0C; /* Background */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    border: 1px solid #6A1E1E; /* Border */
}

.page-blog__article-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-height: 200px; /* Ensure minimum size */
}

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

.page-blog__article-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #F3C54D; /* Gold */
}

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

.page-blog__article-title a:hover {
    color: #FFB04A; /* Lighter gold on hover */
}

.page-blog__article-excerpt {
    font-size: 0.95rem;
    color: #FFF1E8;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: #E53030; /* Auxiliary color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: #140C0C; /* Background */
    color: #FFF1E8;
}

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

.page-blog__category-card {
    background-color: #2A1212; /* Card BG */
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #6A1E1E; /* Border */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-blog__category-title {
    font-size: 1.5rem;
    color: #F3C54D; /* Gold */
    margin-bottom: 15px;
}

.page-blog__category-card p {
    font-size: 0.95rem;
    color: #FFF1E8;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Why betsu Section */
.page-blog__why-betsu {
    padding: 60px 0;
    background-color: #C61F1F; /* Main color */
    color: #FFF1E8;
    text-align: center;
}

.page-blog__why-betsu .page-blog__text-block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #140C0C; /* Background */
    color: #FFF1E8;
}

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

.page-blog__faq-item {
    background-color: #2A1212; /* Card BG */
    border: 1px solid #6A1E1E; /* Border */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: #F3C54D; /* Gold */
    background-color: #2A1212; /* Card BG */
    list-style: none; /* For details/summary */
    -webkit-tap-highlight-color: transparent; /* Remove highlight on mobile */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none;
}

.page-blog__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: #FFF1E8;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 0.95rem;
    color: #FFF1E8;
}

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

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background-color: #E53030; /* Auxiliary color */
    color: #FFF1E8;
    text-align: center;
}

.page-blog__cta-content {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure all links within text blocks are styled appropriately */
.page-blog__text-block a,
.page-blog__faq-answer a {
    color: #F3C54D; /* Gold */
    text-decoration: underline;
}

.page-blog__text-block a:hover,
.page-blog__faq-answer a:hover {
    color: #FFB04A; /* Lighter gold on hover */
}

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

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-blog__main-title {
        font-size: 2rem;
    }

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

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        margin-bottom: 10px; /* Add space between stacked buttons */
    }
    
    .page-blog__btn-primary:last-child,
    .page-blog__btn-secondary:last-child {
        margin-bottom: 0;
    }

    .page-blog__container {
        padding: 0 15px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__article-card {
        margin-bottom: 20px;
    }

    .page-blog__article-image {
        height: auto !important; /* Allow height to adjust */
        min-height: 200px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

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

    .page-blog__category-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__category-card {
        margin-bottom: 20px;
    }

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

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

    /* Mobile image responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__article-card,
    .page-blog__category-card,
    .page-blog__faq-item,
    .page-blog__cta-content,
    .page-blog__intro-section .page-blog__container,
    .page-blog__latest-articles .page-blog__container,
    .page-blog__categories-section .page-blog__container,
    .page-blog__why-betsu .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;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-blog__hero-section {
        padding-left: 0 !important; /* Reset padding for hero section */
        padding-right: 0 !important;
    }
    .page-blog__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}