/* style/news.css */
:root {
  --primary-color: #007BFF;
  --secondary-color: #28A745;
  --accent-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a;
  --card-bg-light: #ffffff;
  --card-bg-dark: rgba(255, 255, 255, 0.1);
  --border-color: #e0e0e0;
}

.page-news {
  color: var(--text-light); /* Trang tin tức trên nền tối, chữ sáng */
  background-color: var(--bg-dark);
  padding-top: 120px; /* Dành cho fixed header trên desktop */
}

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

/* Hero Banner Section */
.page-news__hero-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.8), rgba(40, 167, 69, 0.8));
  color: var(--text-light);
  overflow: hidden;
  min-height: 450px;
}

.page-news__hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

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

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
  color: var(--text-light);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.6;
  color: var(--text-light);
}

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

.page-news__hero-cta-button:hover {
  background: #FFC107;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Sections */
.page-news__articles-section,
.page-news__latest-blog-section,
.page-news__faq-section {
  padding: 60px 0;
}

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

.page-news__section-description {
  font-size: 1.1em;
  color: #cccccc;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

.page-news__article-card,
.page-news__blog-card {
  background: var(--card-bg-dark);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__article-card:hover,
.page-news__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.page-news__article-image-wrapper,
.page-news__blog-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.page-news__article-image,
.page-news__blog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-image,
.page-news__blog-card:hover .page-news__blog-image {
  transform: scale(1.05);
}

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

.page-news__article-title,
.page-news__blog-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

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

.page-news__article-title a:hover,
.page-news__blog-title a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-news__article-excerpt,
.page-news__blog-excerpt {
  font-size: 1em;
  color: #b0b0b0;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-button,
.page-news__blog-button {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-button:hover,
.page-news__blog-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-news__blog-date {
  font-size: 0.9em;
  color: #888888;
  margin-top: 10px;
  margin-bottom: 15px;
}

/* FAQ Section */
.page-news__faq-section {
  background: var(--bg-dark);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px 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 25px;
  opacity: 0;
  color: #e0e0e0;
  line-height: 1.7;
  font-size: 1em;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Đảm bảo đủ cao cho mọi nội dung */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 8px 8px;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-news__faq-question:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-news__faq-question:active {
  background: rgba(255, 255, 255, 0.15);
}

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

.page-news__faq-toggle {
  font-size: 28px;
  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: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.5em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__articles-grid,
  .page-news__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
  .page-news__article-content,
  .page-news__blog-content {
    padding: 20px;
  }
  .page-news__faq-question h3 {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: 100px !important; /* Dành cho fixed header trên mobile */
  }
  .page-news__hero-banner {
    padding: 40px 15px;
    min-height: 350px;
  }
  .page-news__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-news__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-news__hero-cta-button {
    padding: 12px 30px;
    font-size: 1em;
  }
  .page-news__articles-section,
  .page-news__latest-blog-section,
  .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
    padding: 0 15px;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__articles-grid,
  .page-news__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-image-wrapper,
  .page-news__blog-image {
    height: 180px;
  }
  .page-news__article-content,
  .page-news__blog-content {
    padding: 15px;
  }
  .page-news__article-title,
  .page-news__blog-title {
    font-size: 1.3em;
    margin-bottom: 10px;
  }
  .page-news__article-excerpt,
  .page-news__blog-excerpt {
    font-size: 0.9em;
    margin-bottom: 15px;
  }
  .page-news__read-more-button,
  .page-news__blog-button {
    padding: 8px 15px;
    font-size: 0.9em;
  }
  .page-news__faq-question {
    padding: 15px 20px;
    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 20px;
    font-size: 0.95em;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__articles-section,
  .page-news__latest-blog-section,
  .page-news__faq-section,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__hero-cta-button {
    padding: 10px 25px;
    font-size: 0.9em;
  }
  .page-news__section-title {
    font-size: 1.6em;
  }
  .page-news__article-title,
  .page-news__blog-title {
    font-size: 1.2em;
  }
  .page-news__faq-question h3 {
    font-size: 0.95em;
  }
  .page-news__faq-toggle {
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
}