/* style/news.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --bg-dark: #26A9E0;
    --border-color: #e0e0e0;
    --accent-login: #EA7C07;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--secondary-color); /* Default light background from shared.css */
}

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

.page-news__dark-bg {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-news__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from parent section */
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit; /* Inherit color from parent section */
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-login); /* Using #EA7C07 for login/register CTA */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    background: darken(var(--accent-login), 10%); /* Darken for hover effect */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    overflow: hidden;
}

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

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

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

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

.page-news__hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--text-light);
}

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

/* Latest News Section */
.page-news__latest-news {
    padding: 80px 20px;
}

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

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

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

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

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

.page-news__card-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__card-title a:hover {
    color: darken(var(--primary-color), 10%);
}

.page-news__card-excerpt {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 15px;
}

.page-news__news-date {
    display: block;
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
}

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

.page-news__read-more-link:hover {
    color: darken(var(--primary-color), 10%);
}

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

/* Categories Section */
.page-news__categories {
    padding: 80px 20px;
}

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

.page-news__category-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    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-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-light);
}

.page-news__category-desc {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.8);
}

/* Featured Article Section */
.page-news__featured-article {
    padding: 80px 20px;
}

.page-news__featured-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-news__featured-image {
    flex: 1;
    max-width: 50%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.page-news__featured-text {
    flex: 1;
    max-width: 50%;
}

.page-news__featured-title {
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 20px;
}

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

.page-news__featured-title a:hover {
    color: darken(var(--primary-color), 10%);
}

.page-news__featured-excerpt {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 20px;
}

.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-item.active .page-news__faq-question {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    border-radius: 5px 5px 0 0;
}

.page-news__faq-question:hover {
    background: var(--bg-light);
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    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: #666;
    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(--primary-color);
    transform: rotate(45deg); /* Change to X or rotate for active state */
}

.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.3s ease;
    padding: 0 15px;
    opacity: 0;
    background: var(--bg-light);
    color: var(--text-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important;
    padding: 20px 15px !important;
    opacity: 1;
    border-radius: 0 0 5px 5px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-content h1 {
        font-size: 3em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__featured-content {
        flex-direction: column;
    }
    .page-news__featured-image,
    .page-news__featured-text {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding: 15px;
    }

    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }

    .page-news__hero-content h1 {
        font-size: 2.2em;
    }

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

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

    .page-news__section-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

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

    .page-news__latest-news, .page-news__categories, .page-news__featured-article, .page-news__faq-section {
        padding: 50px 15px;
    }

    .page-news__news-grid, .page-news__category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__news-card {
        margin-bottom: 20px;
    }

    .page-news__news-thumbnail {
        height: 180px;
    }

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

    .page-news__featured-title {
        font-size: 1.5em;
    }

    .page-news__featured-excerpt {
        font-size: 0.95em;
    }

    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-news__hero-image,
    .page-news__latest-news .page-news__container,
    .page-news__categories .page-news__container,
    .page-news__featured-article .page-news__container,
    .page-news__faq-section .page-news__container,
    .page-news__news-card,
    .page-news__category-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }

    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-news__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-news__faq-answer {
        padding: 0 15px;
    }
    
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
}