/* style/news.css */

/* Biến CSS */
:root {
    --primary-color: #1A2B3C;
    --secondary-color: #FFD700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
}

/* Đảm bảo nội dung trang không bị che bởi header cố định */
.page-news {
    padding-top: 120px; /* Điều chỉnh dựa trên chiều cao header cố định */
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Arial', sans-serif;
}

@media (max-width: 768px) {
    .page-news {
        padding-top: 100px !important; /* Điều chỉnh cho thiết bị di động */
    }
}

/* Hero Section */
.page-news__hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a506b 100%);
    color: var(--text-light);
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

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

.page-news__btn-primary:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.page-news__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* General Container & Section Title */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    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: var(--secondary-color);
    border-radius: 2px;
}

/* Featured Articles */
.page-news__featured-articles {
    background-color: var(--bg-white);
    padding-bottom: 60px;
}

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

.page-news__article-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

.page-news__article-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.page-news__article-date {
    font-size: 14px;
    color: #999;
    display: block;
}

/* Latest News */
.page-news__latest-news {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-news__news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.page-news__news-item {
    display: flex;
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-news__news-image {
    width: 250px;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.page-news__news-content {
    padding: 20px;
    flex-grow: 1;
}

.page-news__news-link {
    text-decoration: none;
    color: inherit;
}

.page-news__news-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.4;
}

.page-news__news-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.page-news__news-meta {
    font-size: 13px;
    color: #888;
    display: block;
}

.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.page-news__pagination-link:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

.page-news__pagination-link--active {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.page-news__pagination-link--active:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    cursor: default;
}

/* Brand Section */
.page-news__brand-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0;
}

.page-news__brand-content {
    font-size: 16px;
    line-height: 1.8;
}

.page-news__brand-content p {
    margin-bottom: 15px;
    color: #e0e0e0;
}

.page-news__brand-subtitle {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-news__advantage-list {
    list-style: none;
    padding: 0;
    margin-left: 20px;
}

.page-news__advantage-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 30px;
    color: var(--text-light);
}

.page-news__advantage-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: var(--bg-light);
    padding: 60px 0;
}

.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 8px rgba(0, 0, 0, 0.08);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  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;
  border-color: #d0d0d0;
}

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

.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 {
  transform: rotate(45deg); /* Thay đổi thành dấu X hoặc xoay */
  color: var(--secondary-color);
}

.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: #fdfdfd;
  color: var(--text-dark);
  border-top: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__news-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: 100px !important;
    }
    .page-news__hero-section {
        padding: 40px 15px;
    }
    .page-news__main-title {
        font-size: 36px;
    }
    .page-news__hero-description {
        font-size: 16px;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__cta-button {
        width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
    }
    .page-news__container {
        padding: 30px 15px;
    }
    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-news__article-grid {
        grid-template-columns: 1fr;
    }
    .page-news__news-item {
        flex-direction: column;
    }
    .page-news__news-image {
        width: 100%;
        height: 200px;
    }
    .page-news__news-content {
        padding: 15px;
    }
    .page-news__news-title {
        font-size: 18px;
    }
    .page-news__news-excerpt {
        font-size: 14px;
    }
    .page-news__brand-subtitle {
        font-size: 24px;
    }
    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
    }
    .page-news__faq-answer {
        padding: 15px !important;
    }
    .page-news__pagination-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    /* Image responsive */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__hero-section,
    .page-news__featured-articles,
    .page-news__latest-news,
    .page-news__brand-section,
    .page-news__faq-section,
    .page-news__container,
    .page-news__article-card,
    .page-news__news-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__article-image,
    .page-news__news-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 30px;
    }
    .page-news__section-title {
        font-size: 24px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__news-title {
        font-size: 16px;
    }
    .page-news__brand-subtitle {
        font-size: 22px;
    }
    .page-news__hero-description {
        font-size: 15px;
    }
}