/* style/blog.css */
.page-blog {
    background-color: #0D0E12; /* Body background from shared.css */
    color: #FFF3E6; /* Text Main from custom palette */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

/* Hero Section (Main Blog Visual) */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
    background-color: #17191F; /* Card BG */
    border-bottom: 1px solid #A84F0C; /* Border */
}

.page-blog__hero-content-wrapper {
    display: flex;
    flex-direction: column; /* Default to column for "image above text" */
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 25px;
    padding: 20px 0;
}

.page-blog__main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    max-width: 100%;
    box-sizing: border-box;
}

.page-blog__text-content {
    text-align: center;
    max-width: 800px;
}

.page-blog__main-title {
    font-size: clamp(28px, 4vw, 42px); /* H1 font size constraint */
    font-weight: 700;
    color: #FF8C1A; /* Primary color */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #FFF3E6; /* Text Main */
}

.page-blog__cta-button {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Ensure responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__cta-button:hover {
    background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
}

.page-blog__cta-button--large {
    padding: 15px 30px;
    font-size: 18px;
}

/* General Section Styling */
.page-blog__content-section {
    padding: 40px 0;
    border-bottom: 1px solid #17191F; /* Card BG for subtle separator */
}

.page-blog__content-section:last-of-type {
    border-bottom: none;
}

.page-blog__section-title {
    font-size: clamp(24px, 3.5vw, 36px);
    color: #FF8C1A; /* Primary color */
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

.page-blog__latest-articles {
    padding: 50px 0;
    background-color: #17191F; /* Card BG */
}

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

.page-blog__article-card {
    background-color: #0D0E12; /* Background */
    border: 1px solid #A84F0C; /* Border */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__article-thumbnail {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}

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

.page-blog__article-date {
    font-size: 14px;
    color: #FFA53A; /* Auxiliary color */
    margin-bottom: 10px;
    display: block;
}

.page-blog__article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.page-blog__article-title a:hover {
    color: #FF8C1A; /* Primary color */
}

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

.page-blog__read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #A84F0C; /* Border color as button bg */
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    align-self: flex-start;
    transition: background-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__read-more:hover {
    background-color: #D96800; /* Deep Orange */
}

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

.page-blog__view-all-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__view-all-button:hover {
    background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
}

.page-blog__article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.page-blog__article-item {
    background-color: #17191F; /* Card BG */
    border: 1px solid #A84F0C; /* Border */
    border-radius: 8px;
    padding: 25px;
    box-sizing: border-box;
}

.page-blog__article-sub-title {
    font-size: 22px;
    color: #FF8C1A; /* Primary color */
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__article-item p {
    font-size: 16px;
    color: #FFF3E6; /* Text Main */
    margin-bottom: 10px;
}

.page-blog__article-item p:last-child {
    margin-bottom: 0;
}

/* CTA Wrapper for conclusion section */
.page-blog__cta-wrapper {
    text-align: center;
    margin-top: 40px;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 50px 0;
    background-color: #0D0E12; /* Background */
}

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

details.page-blog__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #A84F0C; /* Border */
    overflow: hidden;
    background: #17191F; /* Card BG */
}
details.page-blog__faq-item summary.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
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(255, 255, 255, 0.05); /* Lighter hover for dark bg */
}
.page-blog__faq-qtext {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #FFF3E6; /* Text Main */
}
.page-blog__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #FFA53A; /* Auxiliary color */
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 20px 20px;
    background: #0D0E12; /* Background */
    border-radius: 0 0 5px 5px;
}
.page-blog__faq-answer p {
    color: #ccc;
    font-size: 15px;
}


/* Responsive Design */
@media (max-width: 1023px) {
    .page-blog__hero-content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-blog__main-title {
        font-size: clamp(26px, 5vw, 38px);
    }
    .page-blog__description {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 10px;
    }
    .page-blog__hero-section {
        padding-bottom: 30px;
    }
    .page-blog__main-title {
        font-size: clamp(24px, 6vw, 32px);
    }
    .page-blog__description {
        font-size: 16px;
    }
    .page-blog__cta-button,
    .page-blog__view-all-button,
    .page-blog__read-more {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__latest-articles,
    .page-blog__content-section,
    .page-blog__faq-section {
        padding: 30px 0;
    }

    .page-blog__section-title {
        font-size: clamp(22px, 5vw, 30px);
        margin-bottom: 25px;
    }

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

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

    .page-blog__article-title {
        font-size: 18px;
    }

    .page-blog__article-excerpt,
    .page-blog__article-item p,
    .page-blog__faq-answer p {
        font-size: 14px;
    }

    .page-blog__article-sub-title {
        font-size: 20px;
    }

    details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
    .page-blog__faq-qtext { font-size: 15px; }
    details.page-blog__faq-item .page-blog__faq-answer { padding: 0 15px 15px; }

    .page-blog__hero-section,
    .page-blog__latest-articles,
    .page-blog__content-section,
    .page-blog__faq-section {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* General image and container responsive rules */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-blog__container,
.page-blog__article-card,
.page-blog__article-item {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
}

@media (max-width: 768px) {
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-blog__hero-section,
    .page-blog__latest-articles,
    .page-blog__content-section,
    .page-blog__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px; /* Add padding for content */
        padding-right: 15px;
    }
    
    .page-blog__container {
        padding-left: 0;
        padding-right: 0;
    }
}