/* ------------------------------------------ */
/* Tổng quan về kiểu dáng và biến CSS */
/* ------------------------------------------ */
:root {
  --page-news-primary-color: #F2C14E;
  --page-news-secondary-color: #FFD36B;
  --page-news-card-bg: #111111;
  --page-news-background: #0A0A0A;
  --page-news-text-main: #FFF6D6;
  --page-news-border-color: #3A2A12;
  --page-news-glow-color: #FFD36B;
  --page-news-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--page-news-text-main); /* Sử dụng màu chữ sáng trên nền tối */
  background-color: var(--page-news-background);
}

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

.page-news__section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  text-align: center;
  color: var(--page-news-secondary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__section-description {
  font-size: 18px;
  text-align: center;
  color: var(--page-news-text-main);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-news__btn-primary {
  background: var(--page-news-button-gradient);
  color: #ffffff;
  border: none;
}

.page-news__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 211, 107, 0.4);
}

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

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

.page-news__dark-section {
  background-color: var(--page-news-background);
  padding: 60px 0;
}

.page-news p {
  line-height: 1.8;
  margin-bottom: 15px;
}

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

/* ------------------------------------------ */
/* Hero Section */
/* ------------------------------------------ */
.page-news__hero-section {
  position: relative;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
}

.page-news__hero-image {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  margin-bottom: 30px;
}

.page-news__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-news__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.page-news__main-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  color: var(--page-news-secondary-color);
  margin-bottom: 20px;
  line-height: 1.1;
}

.page-news__description {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--page-news-text-main);
  margin-bottom: 30px;
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__hero-content .page-news__btn-primary {
  margin-top: 20px;
}

/* ------------------------------------------ */
/* Latest Articles Section */
/* ------------------------------------------ */
.page-news__latest-articles {
  padding-top: 80px;
  padding-bottom: 80px;
}

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

.page-news__article-card {
  background-color: var(--page-news-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-news__card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--page-news-secondary-color);
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
}

.page-news__card-title:hover {
  color: var(--page-news-primary-color);
}

.page-news__card-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
}

.page-news__card-excerpt {
  font-size: 16px;
  color: var(--page-news-text-main);
  margin-bottom: 20px;
  line-height: 1.6;
}

.page-news__read-more {
  font-size: 16px;
  font-weight: 600;
  color: var(--page-news-primary-color);
  text-decoration: none;
  display: inline-block;
  margin-top: auto;
}

.page-news__read-more:hover {
  text-decoration: underline;
}

.page-news__view-all-button {
  text-align: center;
  margin-top: 60px;
}

/* ------------------------------------------ */
/* About News Section */
/* ------------------------------------------ */
.page-news__about-news {
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-news__about-news .page-news__content-area {
  max-width: 900px;
}

.page-news__about-news .page-news__article-body p {
  color: var(--page-news-text-main);
  font-size: 17px;
  text-align: justify;
}

/* ------------------------------------------ */
/* FAQ Section */
/* ------------------------------------------ */
.page-news__faq-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-news__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  background-color: var(--page-news-card-bg);
  overflow: hidden;
  border: 1px solid var(--page-news-border-color);
}

details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--page-news-secondary-color);
}

details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}

details.page-news__faq-item summary.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--page-news-primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 25px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 8px 8px;
  color: var(--page-news-text-main);
}

/* ------------------------------------------ */
/* CTA Section */
/* ------------------------------------------ */
.page-news__cta-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: #0d0d0d;
}

.page-news__cta-section .page-news__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.page-news__cta-content {
  flex: 1;
  text-align: left;
}

.page-news__cta-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--page-news-secondary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__cta-description {
  font-size: 18px;
  color: var(--page-news-text-main);
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-news__cta-buttons {
  display: flex;
  gap: 20px;
}

.page-news__cta-image {
  flex-shrink: 0;
  width: 500px;
  height: auto;
}

.page-news__cta-image img {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------ */
/* Responsive Styles */
/* ------------------------------------------ */

/* Desktop/Tablet Transition (1024px) */
@media (max-width: 1024px) {
  .page-news__hero-image {
    height: 400px;
  }

  .page-news__main-title {
    font-size: clamp(32px, 4.5vw, 50px);
  }

  .page-news__description {
    font-size: clamp(16px, 2vw, 20px);
  }

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

  .page-news__article-image {
    height: 180px;
  }

  .page-news__card-title {
    font-size: 20px;
  }

  .page-news__cta-section .page-news__container {
    flex-direction: column;
    text-align: center;
  }

  .page-news__cta-content {
    text-align: center;
  }

  .page-news__cta-buttons {
    justify-content: center;
  }

  .page-news__cta-image {
    width: 100%;
    max-width: 500px;
    margin-top: 40px;
  }
}

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

  .page-news__section-title {
    font-size: clamp(24px, 7vw, 36px);
    margin-bottom: 15px;
  }

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    font-size: 15px !important;
    margin-bottom: 10px;
  }

  /* HERO 主图区域 */
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 40px;
  }

  .page-news__hero-image {
    height: 250px;
    margin-bottom: 20px;
  }

  .page-news__hero-image img {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important;
  }

  .page-news__main-title {
    font-size: clamp(28px, 8vw, 40px);
    margin-bottom: 15px;
  }

  .page-news__description {
    font-size: 15px;
    margin-bottom: 25px;
  }

  /* 产品展示图区域 (News page does not have this, but rule is included for completeness) */
  .page-news__products-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* 2 cols for mobile */
    overflow-x: hidden !important;
  }

  .page-news__products-grid .page-news__product-card:nth-child(n+5) {
    display: none; /* Hide 5th and 6th if only 4 fit */
  }

  /* Article Grid */
  .page-news__article-grid {
    grid-template-columns: 1fr !important;
    gap: 25px;
  }

  .page-news__article-card {
    margin-bottom: 0;
  }

  .page-news__article-image {
    height: 180px;
  }

  .page-news__card-title {
    font-size: 19px;
  }

  .page-news__card-excerpt {
    font-size: 15px;
  }

  .page-news__about-news .page-news__article-body p {
    font-size: 16px;
  }

  /* FAQ Section */
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px 20px;
  }

  .page-news__faq-qtext {
    font-size: 16px;
  }

  .page-news__faq-toggle {
    font-size: 24px;
    width: 24px;
  }

  details.page-news__faq-item .page-news__faq-answer {
    padding: 0 20px 20px;
  }

  /* CTA Section */
  .page-news__cta-section .page-news__container {
    flex-direction: column;
    text-align: center;
    padding: 0 15px;
  }

  .page-news__cta-title {
    font-size: clamp(24px, 7vw, 36px);
  }

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

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

  .page-news__cta-image {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 30px;
    padding: 0 15px;
  }

  .page-news__cta-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 通用图片与容器 */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__content-area,
  .page-news__text-block,
  .page-news__card,
  .page-news__section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-news__cta-button,
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-news__cta-buttons {
    flex-direction: column;
  }
}