/* style/news.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --login-button-color: #EA7C07;
    --border-color: #e0e0e0;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--secondary-color); /* Body background is white, so text should be dark */
}

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

.page-news__hero-banner {
    position: relative;
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #4ac0f2);
    color: var(--text-light);
    padding-top: calc(80px + var(--header-offset, 120px)); /* Ensure content is below fixed header */
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--text-light);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__hero-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-light);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--login-button-color); /* Use login button color for primary CTA */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.page-news__cta-button:hover {
    background: #e06c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button--secondary {
    background: var(--primary-color);
}

.page-news__cta-button--secondary:hover {
    background: #1e8dc7;
}

.page-news__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
    font-weight: bold;
}

.page-news__latest-articles {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

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

.page-news__article-card {
    background: var(--secondary-color);
    border-radius: 10px;
    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__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

.page-news__article-title a:hover {
    color: #1e8dc7;
    text-decoration: underline;
}

.page-news__article-excerpt {
    color: var(--text-dark);
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #1e8dc7;
    text-decoration: underline;
}

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

.page-news__categories {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__categories .page-news__section-title {
    color: var(--text-light);
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-news__category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-light);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__category-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.page-news__category-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

.page-news__category-name {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--text-light);
}

.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

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

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-dark);
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

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

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 20px;
    opacity: 0;
    background: #f9f9f9;
    color: var(--text-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important;
    padding: 20px !important;
    opacity: 1;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-banner {
        padding: 60px 0;
        padding-top: calc(60px + var(--header-offset, 120px)) !important;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-top: 20px;
    }
    .page-news__article-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-image {
        height: 200px;
    }
    .page-news__card-content {
        padding: 20px;
    }
    .page-news__article-title {
        font-size: 1.2em;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-news__category-grid {
        grid-template-columns: 1fr;
    }
    .page-news__category-card {
        padding: 15px;
    }
    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
    }
    .page-news__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__hero-banner,
    .page-news__latest-articles,
    .page-news__categories,
    .page-news__faq-section,
    .page-news__container,
    .page-news__article-card,
    .page-news__category-card,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-banner { padding-left: 0; padding-right: 0; } /* Hero banner full width */
    .page-news__container { padding-left: 15px; padding-right: 15px; } /* Adjust container padding */
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__cta-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}