/* style/news.css */
/* body đã có padding-top: var(--header-offset); nên không cần thêm vào đây */

/* General styles for the news page */
.page-news {
  background-color: #08160F; /* Custom background color */
  color: #F2FFF6; /* Main text color for dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding: 10px 20px 60px; /* Small top padding, more bottom padding */
  text-align: center;
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 30px; /* Space between image and content */
  border-radius: 10px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.page-news__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw, 3rem); /* Responsive font size */
  color: #F2FFF6; /* Main text color */
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 30px;
}

/* Section general styles */
.page-news__section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: #F2FFF6; /* Main text color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for button responsiveness */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: #ffffff; /* White text for primary button */
  border: none;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background: #11271B; /* Card BG for secondary button */
  color: #2AD16F; /* Green text for secondary button */
  border: 2px solid #2E7A4E; /* Border color */
}

.page-news__btn-secondary:hover {
  background: #0A4B2C; /* Deep Green hover */
  color: #F2FFF6; /* Main text color hover */
  border-color: #57E38D; /* Glow color hover */
}

.page-news__cta-container {
  text-align: center;
  margin-top: 50px;
}

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

.page-news__article-card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px 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(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for consistent card images */
  overflow: hidden;
}

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

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

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

.page-news__article-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1;
}

.page-news__article-title a {
  color: #F2FFF6; /* Main text color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #57E38D; /* Glow color */
}

.page-news__article-meta {
  font-size: 0.9rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 20px;
}

.page-news__read-more {
  color: #2AD16F; /* Primary green color */
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start; /* Align to bottom-left */
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #57E38D; /* Glow color */
  text-decoration: underline;
}

/* Categories Grid */
.page-news__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-news__category-card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #F2FFF6; /* Main text color */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-news__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(87, 227, 141, 0.4); /* Glow on hover */
}

.page-news__category-image {
  width: 100%;
  height: 180px; /* Fixed height for category images */
  object-fit: cover;
  display: block;
}

.page-news__category-title {
  font-size: 1.4rem;
  padding: 20px;
  margin: 0;
  color: #F2FFF6;
}

/* In-depth Analysis Section */
.page-news__in-depth-analysis .page-news__content-block {
  background-color: #11271B; /* Card BG */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-news__analysis-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 30px;
  display: block;
}

.page-news__in-depth-analysis p {
  font-size: 1.1rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 20px;
  max-width: 900px;
  text-align: justify;
}

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

.page-news__faq-item {
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: bold;
  color: #F2FFF6; /* Main text color */
  cursor: pointer;
  background-color: #0A4B2C; /* Deep Green for question background */
  transition: background-color 0.3s ease;
  list-style: none; /* Hide default marker for <summary> */
}

.page-news__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for <summary> in Webkit */
}

.page-news__faq-question:hover {
  background-color: #13994A; /* Slightly lighter green on hover */
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 24px;
  text-align: center;
}

.page-news__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #A7D9B8; /* Secondary text color */
}

.page-news__faq-item[open] .page-news__faq-question {
  background-color: #13994A; /* Keep hover color when open */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-section {
    padding-bottom: 40px;
  }
  .page-news__main-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
  .page-news__description {
    font-size: 1rem;
  }
  .page-news__section {
    padding: 40px 20px;
  }
  .page-news__section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Hero Section */
  .page-news__hero-section {
    padding: 10px 15px 30px; /* Small top padding for mobile */
  }
  .page-news__hero-image-wrapper {
    margin-bottom: 20px;
  }
  .page-news__hero-content {
    padding: 0 15px;
  }
  .page-news__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }
  .page-news__description {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  /* Sections */
  .page-news__section {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 30px;
  }

  /* Articles Grid */
  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-image-wrapper {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 1.2rem;
  }
  .page-news__article-excerpt {
    font-size: 0.9rem;
  }

  /* Categories Grid */
  .page-news__categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__category-image {
    height: 150px;
  }
  .page-news__category-title {
    font-size: 1.2rem;
  }

  /* In-depth Analysis */
  .page-news__in-depth-analysis .page-news__content-block {
    padding: 30px 20px;
  }
  .page-news__analysis-image {
    margin-bottom: 20px;
  }
  .page-news__in-depth-analysis p {
    font-size: 1rem;
  }

  /* FAQ */
  .page-news__faq-list {
    padding: 0 10px;
  }
  .page-news__faq-question {
    font-size: 1.05rem;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px;
  }

  /* Mobile image, video, button adaptations (MUST BE !important) */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-news__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .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; /* Ensure buttons take full width */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px; /* Add padding to button content */
    margin-bottom: 10px; /* Stack buttons */
  }
  
  .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-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
  }
}