/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text on light background */
    background-color: #ffffff; /* Explicitly set for clarity */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Brand primary color */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #26A9E0;
    border-radius: 2px;
}

.page-news__section-title--light {
    color: #ffffff;
}

.page-news__section-title--light::after {
    background-color: #ffffff;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure spacing from fixed header */
    background-color: #26A9E0; /* Primary brand color background */
    color: #ffffff; /* White text for contrast */
    overflow: hidden;
}

.page-news__hero-content {
    max-width: 600px;
    text-align: left;
    z-index: 1;
    padding-right: 40px;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-news__btn-primary {
    display: inline-block;
    background-color: #EA7C07; /* Login button color */
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
}

.page-news__btn-primary:hover {
    background-color: #d86c06;
}

.page-news__hero-image-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-left: 40px;
}

.page-news__hero-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Recent Articles Section */
.page-news__recent-articles {
    padding: 60px 0;
    background-color: #f8f9fa; /* Light background for contrast */
}

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

.page-news__news-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.page-news__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.page-news__card-title a:hover {
    color: #1a7bb5;
}

.page-news__card-text {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__card-meta {
    font-size: 0.85em;
    color: #888888;
    margin-bottom: 15px;
}

.page-news__read-more {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #26A9E0;
    padding-bottom: 3px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.page-news__read-more:hover {
    border-color: #1a7bb5;
    color: #1a7bb5;
}

/* Featured Updates Section */
.page-news__featured-updates {
    background-color: #26A9E0; /* Primary brand color */
    padding: 60px 0;
    color: #ffffff;
}

.page-news__updates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.page-news__update-item {
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__update-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__update-image {
    width: 40%;
    height: auto;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

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

.page-news__update-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-news__update-text {
    font-size: 0.95em;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__btn-secondary {
    display: inline-block;
    background-color: #ffffff;
    color: #26A9E0;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid #ffffff;
}

.page-news__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #1a7bb5;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.page-news__faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #eeeeee;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px;
}

.page-news__faq-answer p {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__hero-content {
        padding-right: 20px;
    }
    .page-news__hero-image-wrapper {
        margin-left: 20px;
    }
    .page-news__updates-grid {
        grid-template-columns: 1fr;
    }
    .page-news__update-item {
        flex-direction: column;
    }
    .page-news__update-image {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__container {
        padding: 15px;
    }
    .page-news__hero-section {
        flex-direction: column;
        padding: 40px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
        text-align: center;
    }
    .page-news__hero-content {
        padding-right: 0;
        max-width: 100%;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__hero-image-wrapper {
        margin-left: 0;
        margin-top: 30px;
        width: 100%;
    }
    .page-news__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__news-card {
        margin-bottom: 20px;
    }
    .page-news__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__featured-updates {
        padding: 40px 0;
    }
    .page-news__updates-grid {
        gap: 20px;
    }
    .page-news__update-item {
        flex-direction: column;
    }
    .page-news__update-image {
        width: 100%;
        height: auto;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__update-content {
        padding: 20px;
    }
    .page-news__update-title {
        font-size: 1.4em;
    }

    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px;
    }

    /* Ensure all content containers are responsive */
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Buttons responsive */
    .page-news__btn-primary,
    .page-news__btn-secondary {
        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-news__cta-buttons,
    .page-news__button-group,
    .page-news__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-news__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__card-title {
        font-size: 1.3em;
    }
    .page-news__update-title {
        font-size: 1.2em;
    }
}