/* style/blog.css */

/* Base styles for dark background */
.page-blog {
    color: #ffffff; /* Light text for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Body handles the actual background */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding, body handles header offset */
    text-align: center;
    background-color: #121212; /* Explicit background for the section to ensure contrast */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 20px;
}

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

.page-blog__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 2.8em); /* Responsive H1 font size */
    color: #26A9E0; /* Brand color */
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
}

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

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for button responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
}

.page-blog__btn-primary {
    background-color: #26A9E0; /* Brand color */
    color: #ffffff;
    border: 2px solid #26A9E0;
}

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

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

.page-blog__btn-secondary:hover {
    background-color: #c76706;
    border-color: #c76706;
}

/* Posts Section */
.page-blog__posts-section {
    padding: 60px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
}

.page-blog__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: #26A9E0;
    text-align: center;
    margin-bottom: 15px;
}

.page-blog__section-subtitle {
    font-size: 1.1em;
    color: #cccccc;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__post-card {
    background-color: #262626; /* Darker card background */
    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;
    display: flex;
    flex-direction: column;
}

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

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.page-blog__post-title {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-title:hover {
    color: #26A9E0; /* Brand color on hover */
}

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

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

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

/* Featured Section */
.page-blog__featured-section {
    padding: 60px 0;
    background-color: #121212; /* Back to body background color */
}

.page-blog__featured-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    background-color: #262626; /* Darker background for the content block */
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__featured-text {
    flex: 1;
}

.page-blog__featured-text p {
    font-size: 1.05em;
    color: #f0f0f0;
    margin-bottom: 20px;
}

.page-blog__featured-image-wrapper {
    flex: 1;
    max-width: 50%;
    overflow: hidden;
    border-radius: 8px;
}

.page-blog__featured-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

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

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

.page-blog__faq-item {
    background-color: #262626;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensure content doesn't spill out */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    background-color: #2e2e2e; /* Slightly darker for question header */
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker for details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

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

.page-blog__faq-qtext {
    flex-grow: 1;
    color: #26A9E0; /* Brand color for question text */
}

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(0deg); /* Change to minus sign */
    content: '\2212'; /* Unicode for minus sign */
}


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

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

    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust H1 for mobile */
    }

    .page-blog__description {
        font-size: 1em;
    }

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 15px;
        font-size: 0.95em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-blog__posts-section,
    .page-blog__featured-section,
    .page-blog__faq-section {
        padding: 40px 0;
    }

    .page-blog__container {
        padding: 0 15px; /* Add horizontal padding for mobile containers */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .page-blog__post-image {
        height: 180px; /* Adjust image height for mobile cards */
    }

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

    .page-blog__featured-content {
        flex-direction: column; /* Stack content on mobile */
        padding: 20px;
        gap: 20px;
    }

    .page-blog__featured-image-wrapper {
        max-width: 100%; /* Full width for image on mobile */
    }

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

    .page-blog__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95em;
    }

    /* Image responsive forcing */
    .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;
    }
    /* Video responsiveness - not present on this page, but as per general rules */
    .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; /* Small top padding for video section on mobile */
    }
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}