/* style/blog.css */

/* Base styles for the blog page, assuming body has a dark background from shared.css */
.page-blog {
    color: #ffffff; /* Light text for general content on dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    box-sizing: border-box;
    background-color: #0d0d0d; /* Dark background for hero section */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    margin-bottom: 30px; /* Space between image and text */
}

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

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

.page-blog__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.15rem;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.page-blog__section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #26A9E0; /* Brand color for titles */
}

.page-blog__section-description {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 40px;
    color: #f0f0f0;
}

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 60px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background */
    color: #ffffff;
}

.page-blog__latest-articles .page-blog__section-description {
    color: #cccccc;
}

.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: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__article-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #26A9E0; /* Brand color for article titles */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-meta {
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-bottom: 15px;
}

.page-blog__article-summary {
    font-size: 1rem;
    color: #cccccc;
    margin-bottom: 20px;
}

.page-blog__read-more {
    display: flex;
    align-items: center;
    color: #26A9E0;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #5ac4f8; /* Lighter shade on hover */
}

.page-blog__read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-blog__read-more:hover i {
    transform: translateX(5px);
}

.page-blog__view-all-button {
    text-align: center;
}

/* Promotions CTA Section */
.page-blog__promotions-cta-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-blog__promotions-cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.page-blog__promotions-cta-section .page-blog__section-title {
    color: #ffffff;
}

.page-blog__promotions-cta-section .page-blog__section-description {
    color: #f0f0f0;
    max-width: 800px;
}

.page-blog__promotions-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-top: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
}

.page-blog__faq-section .page-blog__section-title {
    color: #26A9E0;
}

.page-blog__faq-section .page-blog__section-description {
    color: #666666; /* Darker text for light background */
}

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

.page-blog__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
    list-style: none; /* For <summary> tag */
}

.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: #f0f0f0;
    border-bottom: none;
}

.page-blog__faq-question:hover {
    background-color: #f0f0f0;
}

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−"; /* Changes to minus when open */
}

.page-blog__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1rem;
    color: #555555;
    line-height: 1.6;
}

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

/* Button styles */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
    text-align: center;
}

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

.page-blog__btn-primary:hover {
    background-color: #1d8acb; /* Darker blue on hover */
    box-shadow: 0 4px 10px rgba(38, 169, 224, 0.4);
}

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

.page-blog__btn-secondary:hover {
    background-color: #f0f8ff; /* Light blue tint on hover */
    color: #1d8acb;
    border-color: #1d8acb;
    box-shadow: 0 4px 10px rgba(38, 169, 224, 0.2);
}

/* Dark background color for sections */
.page-blog__dark-bg {
    background-color: #26A9E0; /* Brand color as background */
    color: #ffffff;
}
.page-blog__dark-bg .page-blog__section-description {
    color: #f0f0f0;
}
.page-blog__dark-bg .page-blog__btn-secondary {
    background-color: #ffffff;
    color: #26A9E0;
    border-color: #ffffff;
}
.page-blog__dark-bg .page-blog__btn-secondary:hover {
    background-color: #f0f8ff;
    color: #1d8acb;
    border-color: #f0f8ff;
}
.page-blog__dark-bg .page-blog__btn-primary {
    background-color: #EA7C07; /* Login color for primary button on dark bg */
    color: #ffffff;
}
.page-blog__dark-bg .page-blog__btn-primary:hover {
    background-color: #c96a06;
    box-shadow: 0 4px 10px rgba(234, 124, 7, 0.4);
}

/* Light background color for sections */
.page-blog__light-bg {
    background-color: #ffffff;
    color: #333333;
}
.page-blog__light-bg .page-blog__section-title {
    color: #26A9E0;
}
.page-blog__light-bg .page-blog__section-description {
    color: #666666;
}

/* --- General Image and Container Responsiveness --- */
.page-blog img {
    filter: none; /* No CSS filter on images */
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-blog__hero-description {
        font-size: 1rem;
    }
    .page-blog__section-title {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    }
}

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

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles header offset, this is decorative */
    }

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

    .page-blog__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__latest-articles,
    .page-blog__promotions-cta-section,
    .page-blog__faq-section {
        padding: 40px 0;
    }

    /* Ensure all content containers are responsive */
    .page-blog__container,
    .page-blog__hero-image-wrapper,
    .page-blog__promotions-cta-content {
        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__articles-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-blog__article-image {
        height: auto !important; /* Ensure image scales */
        min-height: 200px; /* Maintain minimum height */
    }

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

    .page-blog__article-summary {
        font-size: 0.95rem;
    }

    .page-blog__promotions-image {
        margin-top: 30px;
    }

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

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

    /* Mobile image responsiveness - Mandatory */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min size for content images */
        min-height: 200px !important;
    }

    /* Mobile button responsiveness - Mandatory */
    .page-blog__cta-button,
    .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; /* Allow buttons to wrap */
        gap: 10px;
    }

    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
    }
}

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