/* style/news.css */

:root {
    --primary-color: #0056B3;
    --secondary-color: #FFC107;
    --dark-bg-1: #0d0d0d; /* Giả định từ shared.css */
    --light-text: #ffffff;
    --dark-text: #333333;
    --light-grey-bg: #f1f3f5;
    --medium-grey-border: #e0e0e0;
}

.page-news {
    color: var(--dark-text);
    background: var(--light-grey-bg);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Phần Hero */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 180px; /* Desktop: Đảm bảo không bị header cố định che */
    background: linear-gradient(135deg, var(--primary-color), #003F80);
    color: var(--light-text);
    overflow: hidden;
}

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

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

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-news__cta-button:hover {
    background: #e6b000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Phần bài viết gần đây */
.page-news__latest-articles-section {
    padding: 60px 20px;
    background: var(--light-grey-bg);
    color: var(--dark-text);
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.page-news__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.page-news__featured-article-card {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__featured-article-image {
    width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 12px 0 0 12px;
}

.page-news__featured-article-content {
    width: 50%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-news__article-title {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

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

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

.page-news__article-summary {
    font-size: 1em;
    color: var(--dark-text);
    margin-bottom: 25px;
}

.page-news__read-more-button {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
}

.page-news__read-more-button:hover {
    background: #003F80;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.page-news__article-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    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 5px 20px rgba(0, 0, 0, 0.12);
}

.page-news__article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--medium-grey-border);
}

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

.page-news__article-card .page-news__article-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-news__article-card .page-news__article-meta {
    margin-bottom: 10px;
}

.page-news__article-card .page-news__article-summary {
    font-size: 0.95em;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Phần FAQ */
.page-news__faq-section {
    padding: 60px 20px;
    background: var(--primary-color);
    color: var(--light-text);
}

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

.page-news__faq-section .page-news__section-title::after {
    background: var(--secondary-color);
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.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: #004a99;
    color: rgba(255, 255, 255, 0.9);
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #0056B3;
    border: 1px solid #003F80;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: var(--light-text);
}

.page-news__faq-question:hover {
    background: #004a99;
    border-color: #00356b;
}

.page-news__faq-question:active {
    background: #003F80;
}

.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(--light-text);
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--secondary-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: 32px;
    height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: var(--secondary-color);
    transform: rotate(45deg); /* Để dấu '+' xoay thành 'x' hoặc '-' */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__featured-article-card {
        flex-direction: column;
    }
    .page-news__featured-article-image,
    .page-news__featured-article-content {
        width: 100%;
    }
    .page-news__featured-article-image {
        border-radius: 12px 12px 0 0;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-articles-section,
    .page-news__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-section {
        padding-top: 140px !important; /* Mobile: Đảm bảo không bị header cố định che */
        padding-bottom: 40px;
    }
    .page-news__main-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-news__featured-article-card {
        margin-bottom: 40px;
    }
    .page-news__featured-article-content {
        padding: 20px;
    }
    .page-news__article-title {
        font-size: 1.4em;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-content {
        padding: 15px;
    }
    .page-news__article-card .page-news__article-title {
        font-size: 1.1em;
    }
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
    }
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
}