/* style/blog.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #EA7C07; /* Login color */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-color-light: #FFFFFF;
    --border-color: #e0e0e0;
}

.page-blog {
    font-family: 'Arial', sans-serif;
    color: var(--text-color-dark); /* Default text color for light body background */
    background-color: var(--background-color-light);
    line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-color-light);
    color: var(--text-color-dark);
}

.page-blog__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-blog__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

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

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-blog__main-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--primary-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__hero-description {
    font-size: 18px;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__cta-button:hover {
    background: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary {
    background: var(--primary-color);
    color: var(--text-color-light);
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    background: #1e87b7;
}

.page-blog__btn-secondary {
    background: var(--background-color-light);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
}

/* Articles Section */
.page-blog__articles-section {
    padding: 80px 0;
    background-color: var(--background-color-light);
    color: var(--text-color-dark);
}

.page-blog__section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-blog__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: #555;
}

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

.page-blog__article-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

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

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

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

.page-blog__article-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-blog__article-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.page-blog__article-summary {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    min-height: 90px; /* Ensure consistent height for summaries */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limit to 4 lines */
    -webkit-box-orient: vertical;
}

.page-blog__read-more {
    display: inline-block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Slightly off-white for contrast */
    color: var(--text-color-dark);
}

.page-blog__faq-list {
    margin-top: 40px;
}

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

details.page-blog__faq-item summary.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    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: #f5f5f5;
}

.page-blog__faq-qtext {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: var(--primary-color);
}

.page-blog__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 30px;
    text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 25px 25px;
    background: #fcfcfc;
    border-radius: 0 0 8px 8px;
}

.page-blog__faq-answer p {
    margin: 0;
    font-size: 16px;
    color: #555;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: 36px;
    }

    .page-blog__hero-description {
        font-size: 16px;
    }

    .page-blog__section-title {
        font-size: 32px;
    }

    .page-blog__section-description {
        font-size: 16px;
    }

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

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__main-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .page-blog__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__section-title {
        font-size: 28px;
    }

    .page-blog__section-description {
        font-size: 15px;
        margin-bottom: 40px;
    }

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

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

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

    .page-blog__article-summary {
        font-size: 14px;
        min-height: 70px;
        -webkit-line-clamp: 3;
    }

    .page-blog__read-more {
        padding: 8px 15px;
        font-size: 14px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
    }

    .page-blog__faq-qtext {
        font-size: 16px;
    }

    .page-blog__faq-toggle {
        font-size: 24px;
        width: 24px;
    }

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

    .page-blog__faq-answer p {
        font-size: 15px;
    }

    /* Mobile image adaptation */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !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;
        gap: 10px;
    }

    .page-blog__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 24px;
    }

    .page-blog__hero-description {
        font-size: 14px;
    }

    .page-blog__section-title {
        font-size: 24px;
    }

    .page-blog__article-title {
        font-size: 16px;
    }
    .page-blog__article-image {
        height: 180px;
    }
}