/* style/blog.css */

/* Base styles for the page-blog scope */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-top: 0; /* body handles header offset */
}

/* 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 */
    background-color: #1a1a2e; /* Dark background for this section */
    overflow: hidden;
}

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

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

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
    position: relative;
}

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

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

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

/* Section common styles */
.page-blog__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: #f0f0f0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

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

/* Buttons */
.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, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons adapt */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

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

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

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

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

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background */
}

.page-blog__dark-section {
    background-color: #1a1a2e; /* Ensure dark background for text contrast */
    color: #ffffff;
}

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

.page-blog__article-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for card background */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

.page-blog__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-blog__article-title a {
    color: #26A9E0; /* Brand color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #ffffff;
}

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

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

.page-blog__read-more-link {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

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

/* Featured Articles Section */
.page-blog__featured-articles-section {
    padding: 80px 0;
    background-color: #111122; /* Slightly different dark background */
}

.page-blog__featured-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column by default */
    gap: 30px;
    margin-top: 40px;
}

.page-blog__featured-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column; /* Default to column for mobile */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__featured-image {
    width: 100%;
    height: 375px; /* Fixed height */
    object-fit: cover;
    display: block;
}

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

.page-blog__featured-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-blog__featured-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__featured-title a:hover {
    color: #ffffff;
}

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

.page-blog__featured-excerpt {
    font-size: 1em;
    color: #e0e0e0;
    margin-bottom: 25px;
    flex-grow: 1;
}

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

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

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

.page-blog__cta-buttons .page-blog__btn-primary {
    background-color: #EA7C07; /* Login custom color */
    border-color: #EA7C07;
    color: #ffffff;
}

.page-blog__cta-buttons .page-blog__btn-primary:hover {
    background-color: #c96a06;
    border-color: #c96a06;
}

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

.page-blog__cta-buttons .page-blog__btn-secondary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background */
    color: #ffffff;
}

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

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

.page-blog__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    color: #ffffff; /* Question text color */
    transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-blog__faq-qtext {
    flex-grow: 1;
    color: #ffffff; /* Question text color */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    width: 25px;
    text-align: center;
    color: #26A9E0; /* Toggle icon color */
}

.page-blog__faq-answer {
    padding: 0 20px 20px;
    font-size: 1em;
    color: #e0e0e0;
}

/* Media Queries for Responsiveness */
@media (min-width: 769px) {
    .page-blog__featured-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for desktop featured */
    }
}

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

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

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

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__section-title {
        font-size: 1.8em;
    }

    .page-blog__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

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

    .page-blog__article-image {
        height: auto; /* Allow image height to be auto on mobile */
    }

    .page-blog__cta-title {
        font-size: 2em;
    }

    .page-blog__cta-description {
        font-size: 1em;
    }

    .page-blog__faq-item summary {
        font-size: 1em;
        padding: 15px;
    }

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

    /* Mobile image and container overrides */
    .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,
    .page-blog__hero-image-wrapper,
    .page-blog__articles-grid,
    .page-blog__featured-grid,
    .page-blog__cta-buttons,
    .page-blog__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent content overflow */
    }

    /* Specific padding adjustments for sections */
    .page-blog__latest-articles-section,
    .page-blog__featured-articles-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding: 40px 0 !important;
    }
}