/* style/news.css */
/* BEM naming convention: page-news__element-name */

.page-news {
    color: #ffffff; /* Default text color for dark body background */
    background-color: #0a0a0a; /* Ensure consistency with body background if needed, but shared.css sets body */
    padding-top: 0;
}

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

.page-news__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #FFB81C; /* Gold color for section titles */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

/* Hero Banner Section */
.page-news__hero-banner {
    background: linear-gradient(135deg, #E44D26, #FFB81C); /* Brand colors for gradient */
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-news__hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

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

.page-news__hero-description {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For responsive buttons */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: #E44D26; /* Main brand color */
    color: #ffffff;
    border: 2px solid #E44D26;
    margin-right: 15px;
}

.page-news__btn-primary:hover {
    background: #ff6a3d;
    border-color: #ff6a3d;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: transparent;
    color: #FFB81C; /* Gold brand color */
    border: 2px solid #FFB81C;
}

.page-news__btn-secondary:hover {
    background: #FFB81C;
    color: #0a0a0a; /* Dark text for gold background */
    transform: translateY(-2px);
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background */
}

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

.page-news__article-card {
    background-color: #2a2a2a; /* Card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-news__article-title {
    font-size: 22px;
    font-weight: 600;
    color: #FFB81C; /* Gold for article titles */
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__article-date {
    font-size: 14px;
    color: #888888;
}

.page-news__view-more {
    text-align: center;
}

/* Featured News Section */
.page-news__featured-news {
    padding: 80px 0;
    background-color: #0a0a0a;
}

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

.page-news__featured-main {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__featured-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

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

.page-news__featured-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-width: 100%;
}

.page-news__featured-content {
    padding: 25px;
}

.page-news__featured-title {
    font-size: 28px;
    font-weight: 700;
    color: #FFB81C;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__featured-excerpt {
    font-size: 18px;
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.page-news__featured-date {
    font-size: 15px;
    color: #888888;
}

.page-news__featured-sidebar {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
}

.page-news__sidebar-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__sidebar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.page-news__sidebar-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__sidebar-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-width: 100%;
}

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

.page-news__sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: #E44D26; /* Orange for sidebar titles */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__sidebar-date {
    font-size: 14px;
    color: #888888;
}

/* Call to Action Section */
.page-news__call-to-action {
    background: linear-gradient(45deg, #E44D26, #FFB81C); /* Gradient background */
    padding: 80px 0;
    text-align: center;
}

.page-news__cta-title {
    font-size: 38px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.page-news__cta-description {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #1a1a1a;
}

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

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #2a2a2a; /* Darker background for FAQ item */
}

/* FAQ默认状态 - 答案隐藏 */
.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 15px;
  opacity: 0;
  color: #cccccc;
}

/* FAQ展开状态 - ⚠️ Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* ⚠️ Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: #3a3a3a; /* Slightly lighter background when active */
  border-radius: 0 0 5px 5px;
}

/* Vấn đề phong cách */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #3a3a3a;
  border-color: #4a4a4a;
}

.page-news__faq-question:active {
  background: #4a4a4a;
}

/* Phong cách tiêu đề câu hỏi */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
  color: #ffffff; /* White text for question */
}

/* Biểu tượng chuyển đổi */
.page-news__faq-toggle {
  font-size: 28px; /* Tăng kích thước để dễ nhìn hơn trên nền tối */
  font-weight: bold;
  line-height: 1;
  color: #FFB81C; /* Gold color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Tăng kích thước */
  height: 32px; /* Tăng kích thước */
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #E44D26; /* Orange color when active */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng dấu trừ */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 40px;
    }

    .page-news__hero-description {
        font-size: 18px;
    }

    .page-news__section-title {
        font-size: 30px;
    }

    .page-news__featured-grid {
        grid-template-columns: 1fr;
    }

    .page-news__featured-sidebar {
        grid-template-rows: repeat(auto-fit, minmax(200px, 1fr));
    }

    .page-news__cta-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__hero-banner {
        padding: 40px 0;
    }

    .page-news__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        display: block;
        margin: 0 0 15px 0 !important; /* Stack buttons */
        padding: 12px 20px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }

    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .page-news__latest-articles,
    .page-news__featured-news,
    .page-news__call-to-action,
    .page-news__faq-section {
        padding: 50px 0;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__cta-title {
        font-size: 28px;
    }

    .page-news__cta-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* FAQ Mobile */
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-news__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        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;
    }

    /* Image responsive for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-news__article-card,
    .page-news__featured-main,
    .page-news__sidebar-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: auto;
        margin-right: auto;
    }
}