/* style/news.css */

/* Variables and Base Styles for .page-news scope */
.page-news {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1E90FF; /* Deep Sky Blue */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212;
  --bg-light: #f8f9fa;
  --card-bg-dark: rgba(255, 255, 255, 0.08); /* Slightly transparent white on dark background */
  --card-bg-light: #ffffff;

  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Inherited from body if not set, but explicit for clarity */
}

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

/* Headings */
.page-news h1,
.page-news h2,
.page-news h3,
.page-news h4 {
  color: var(--primary-color); /* Headings use primary color */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news h1 {
  font-size: 3.2em;
  text-align: center;
  color: var(--text-light); /* H1 can be white for better contrast on dark background */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.page-news h2 {
  font-size: 2.5em;
  text-align: center;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 30px;
}

.page-news h3 {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-news p {
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-news ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-news li {
  margin-bottom: 8px;
  color: var(--text-light);
}

/* Links and Buttons */
.page-news a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  margin: 10px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping for desktop */
}

.page-news__cta-button--primary {
  background: var(--primary-color);
  color: var(--text-dark); /* Gold background, dark text for contrast */
}

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

.page-news__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--text-light); /* Blue background, light text for contrast */
}

.page-news__cta-button--secondary:hover {
  background: #1a7ad9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Image styles - ensuring no small icons and responsive */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

/* Video Section */
.page-news__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Desktop: Adjust based on fixed header height */
  box-sizing: border-box;
}

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

.page-news__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-news__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* Prevent video controls from blocking click event on parent <a> */
}

.page-news__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-news__video-link:hover .page-news__video-overlay {
  opacity: 1;
}

.page-news__video-click-hint {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  background: rgba(0, 123, 255, 0.8);
  border-radius: 5px;
  white-space: nowrap;
}

.page-news__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-news__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-dark); /* Gold background, dark text for contrast */
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.page-news__play-now-button:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* H1 Title Section */
.page-news__title-section {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.2), rgba(255, 215, 0, 0.1)); /* Subtle gradient */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

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

.page-news__main-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--text-light);
}

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

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

/* Blog List Section */
.page-news__blog-section {
  padding: 80px 20px;
  background-color: var(--bg-dark); /* Ensure consistent dark background */
  box-sizing: border-box;
}

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

.page-news__blog-title {
  margin-bottom: 40px;
}

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

.page-news__blog-item {
  background: var(--card-bg-dark); /* Dark card background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-news__blog-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text-light);
  text-decoration: none;
}

.page-news__blog-item-image {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-news__blog-item-title {
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
  line-height: 1.3;
}

.page-news__blog-item-excerpt {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__blog-item-date {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.5);
  align-self: flex-end;
  margin-top: auto;
}

/* Brand Introduction Section */
.page-news__brand-section {
  padding: 80px 20px;
  background-color: var(--secondary-color); /* Blue background for this section */
  color: var(--text-light); /* Light text on blue background */
  box-sizing: border-box;
}

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

.page-news__brand-title {
  color: var(--text-light); /* White title on blue background */
  margin-bottom: 50px;
}

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

.page-news__brand-item {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on blue background */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__brand-item h3 {
  color: var(--primary-color);
  font-size: 1.6em;
  margin-bottom: 15px;
}

.page-news__brand-item p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.page-news__brand-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-news__brand-item li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  color: rgba(255, 255, 255, 0.9);
}

.page-news__brand-item li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.page-news__brand-item-image {
  margin-top: 20px;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 20px;
  background-color: var(--bg-dark); /* Dark background */
  box-sizing: border-box;
}

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

.page-news__faq-main-title {
  margin-bottom: 40px;
  color: var(--primary-color);
}

.page-news__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background: var(--card-bg-dark);
}

/* 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 25px;
  opacity: 0;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background for answer */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* FAQ展开状态 - 🚨 Sử dụng!important và max-height đủ lớn để đả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 25px !important;
  opacity: 1;
}

/* Question styles */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--card-bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  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: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* Question title styles */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 tag from blocking click event */
}

/* Toggle icon */
.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: 20px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-news h1 {
    font-size: 2.8em;
  }
  .page-news h2 {
    font-size: 2em;
  }
  .page-news h3 {
    font-size: 1.5em;
  }
  .page-news__blog-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__brand-content {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  /* Global overrides for mobile to ensure no overflow */
  .page-news__video-section,
  .page-news__title-section,
  .page-news__blog-section,
  .page-news__brand-section,
  .page-news__faq-section {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* 🚨 Mobile must reset padding-top, overriding desktop styles */
  .page-news__video-section {
    padding-top: 10px !important; /* Mobile: Adjust based on fixed header height */
    padding-bottom: 40px;
  }

  .page-news h1 {
    font-size: 2.2em;
  }
  .page-news h2 {
    font-size: 1.8em;
  }
  .page-news h3 {
    font-size: 1.3em;
  }
  .page-news p {
    font-size: 0.95em;
  }

  /* Video Section Mobile */
  .page-news__video-container,
  .page-news__video-link,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-news__video {
    object-fit: contain;
  }
  .page-news__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }
  .page-news__video-cta {
    margin-top: 20px;
  }
  .page-news__play-now-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* H1 Section Mobile */
  .page-news__title-section {
    padding: 60px 15px;
  }
  .page-news__main-title {
    font-size: 2em;
  }
  .page-news__title-description {
    font-size: 1em;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 25px;
    font-size: 1em;
  }

  /* Blog List Section Mobile */
  .page-news__blog-section {
    padding: 60px 15px;
  }
  .page-news__blog-item-image {
    height: 180px;
  }
  .page-news__blog-item-title {
    font-size: 1.2em;
  }
  .page-news__blog-item-excerpt {
    font-size: 0.9em;
  }

  /* Brand Section Mobile */
  .page-news__brand-section {
    padding: 60px 15px;
  }
  .page-news__brand-item h3 {
    font-size: 1.4em;
  }
  .page-news__brand-item-image {
    height: 200px;
  }

  /* FAQ Section Mobile */
  .page-news__faq-section {
    padding: 60px 15px;
  }
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question h3 {
    font-size: 1.1em;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 15px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }
}

@media (max-width: 480px) {
  .page-news h1 {
    font-size: 1.8em;
  }
  .page-news h2 {
    font-size: 1.5em;
  }
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__title-description {
    font-size: 0.9em;
  }
  .page-news__blog-list {
    grid-template-columns: 1fr;
  }
  .page-news__brand-content {
    grid-template-columns: 1fr;
  }
  .page-news__faq-question h3 {
    font-size: 1em;
  }
}