/* style/news.css */

/* --- General Page Styles --- */
.page-news {
  font-family: Arial, sans-serif;
  color: var(--text-main-color, #FFF3E6); /* Use Text Main color, fallback to #FFF3E6 */
  background-color: var(--background-color, #0D0E12); /* Use Background color, fallback to #0D0E12 */
  line-height: 1.6;
  font-size: 16px;
}

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

.page-news__section {
  padding: 60px 0;
}

.page-news__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color, #FF8C1A);
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-main-color, #FFF3E6);
}

.page-news__description a {
  color: var(--secondary-color, #FFA53A);
  text-decoration: underline;
}

.page-news__description a:hover {
  color: var(--glow-color, #FFB04D);
}

.page-news .keyword {
  color: var(--secondary-color, #FFA53A);
  font-weight: bold;
}

/* --- Buttons --- */
.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
  width: 100%; /* Ensures button container takes full width on desktop */
  max-width: 100%;
  box-sizing: border-box;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  border: 2px solid transparent;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Custom button gradient */
  color: #ffffff;
  border-color: var(--border-color, #A84F0C);
}

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #FFB04D 0%, #FF8C1A 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 140, 26, 0.4);
}

.page-news__btn-secondary {
  background: transparent;
  color: var(--secondary-color, #FFA53A);
  border-color: var(--secondary-color, #FFA53A);
}

.page-news__btn-secondary:hover {
  background: var(--secondary-color, #FFA53A);
  color: #0D0E12;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 165, 58, 0.3);
}

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body handles header offset, small top padding for visual */
  overflow: hidden;
  box-sizing: border-box;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit height for aesthetic */
}

.page-news__hero-content-wrapper {
  width: 100%;
  position: relative; /* Relative to hero-section, not absolute over image */
  padding: 40px 20px 0; /* Padding for content below image */
  box-sizing: border-box;
  background-color: var(--background-color, #0D0E12); /* Ensure background for text */
  z-index: 1; /* Ensure text is above any potential background elements */
}

.page-news__hero-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.page-news__main-title {
  color: var(--primary-color, #FF8C1A);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  /* H1 font-size not hardcoded, let browser handle or use clamp if needed */
  /* clamp(2em, 5vw, 3.5em) could be used if needed, but not required by prompt */
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
  background-color: var(--background-color, #0D0E12);
  padding: 80px 0;
}

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

.page-news__article-card {
  background-color: var(--card-bg-color, #17191F);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-main-color, #FFF3E6);
}

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

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

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

.page-news__article-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: bold;
}

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

.page-news__article-title a:hover {
  color: var(--secondary-color, #FFA53A);
}

.page-news__article-meta {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 1em;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__article-excerpt a {
  color: var(--secondary-color, #FFA53A);
  text-decoration: underline;
}

.page-news__read-more {
  display: inline-block;
  color: var(--secondary-color, #FFA53A);
  text-decoration: none;
  font-weight: bold;
  margin-top: auto; /* Pushes button to bottom */
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: var(--glow-color, #FFB04D);
  text-decoration: underline;
}

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

/* --- Featured Video Section --- */
.page-news__featured-video {
  background-color: var(--background-color, #0D0E12);
  padding: 80px 0;
}

.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 40px auto 20px auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  width: 100%; /* Ensure it takes full width of container */
  box-sizing: border-box;
}

.page-news__video-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-news__video-caption {
  text-align: center;
  margin-top: 20px;
  font-size: 1.1em;
  color: var(--text-main-color, #FFF3E6);
}

.page-news__video-caption a {
  color: var(--secondary-color, #FFA53A);
  text-decoration: underline;
}

.page-news__video-caption a:hover {
  color: var(--glow-color, #FFB04D);
}

/* --- FAQ Section --- */
.page-news__faq-section {
  background-color: var(--background-color, #0D0E12);
  padding: 80px 0;
}

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

.page-news__faq-item {
  background-color: var(--card-bg-color, #17191F);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color, #A84F0C);
  color: var(--text-main-color, #FFF3E6);
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.2em;
  color: var(--primary-color, #FF8C1A);
  transition: background-color 0.3s ease;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-news__faq-item summary:hover {
  background-color: rgba(255, 140, 26, 0.1);
}

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-qtext a {
  color: var(--secondary-color, #FFA53A);
  text-decoration: underline;
}

.page-news__faq-qtext a:hover {
  color: var(--glow-color, #FFB04D);
}

.page-news__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--secondary-color, #FFA53A);
}

.page-news__faq-item[open] .page-news__faq-toggle {
  content: "−"; /* Change to minus when open */
}

.page-news__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: var(--text-main-color, #FFF3E6);
  line-height: 1.7;
}

.page-news__faq-answer p {
  margin-bottom: 10px;
}

/* --- Bottom CTA Section --- */
.page-news__cta-bottom {
  padding: 80px 0;
  background-color: var(--background-color, #0D0E12);
}

.page-news__cta-bottom .page-news__container {
  background-color: var(--card-bg-color, #17191F);
  border-radius: 15px;
  padding: 50px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #A84F0C);
}

.page-news__cta-bottom .page-news__section-title {
  color: var(--primary-color, #FF8C1A);
  margin-bottom: 20px;
}

.page-news__cta-bottom .page-news__description {
  color: var(--text-main-color, #FFF3E6);
  margin-bottom: 40px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__main-title {
    font-size: clamp(2em, 4vw, 3em); /* Apply clamp for H1 */
  }
  .page-news__article-image {
    height: 180px;
  }
}

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

  .page-news__hero-section {
    padding-top: 10px !important; /* body already handles offset */
    padding-bottom: 40px;
  }

  .page-news__hero-content-wrapper {
    padding-top: 30px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-news__description {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    padding: 0 15px; /* Add padding to prevent overflow */
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section {
    padding: 40px 0;
  }

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-news__article-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 15px;
  }

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

  .page-news__article-title {
    font-size: 1.2em;
  }

  .page-news__article-excerpt {
    font-size: 0.95em;
  }

  .page-news__view-all-button-container {
    margin-top: 40px;
    padding: 0 15px;
  }

  /* Video responsiveness */
  .page-news__video-wrapper {
    margin-top: 30px;
    padding: 0 15px; /* Add padding to prevent overflow */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .page-news__video-link {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-caption {
    font-size: 0.95em;
    padding: 0 15px;
  }

  .page-news__faq-list {
    padding: 0 15px;
  }

  .page-news__faq-item summary {
    font-size: 1.1em;
    padding: 15px;
  }

  .page-news__faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 0.95em;
  }

  .page-news__cta-bottom .page-news__container {
    padding: 40px 20px;
    margin: 0 15px; /* Add margin to prevent overflow */
  }

  .page-news__cta-bottom .page-news__section-title {
    font-size: 1.6em;
  }

  .page-news__cta-bottom .page-news__description {
    font-size: 0.95em;
  }

  /* Mobile image specific styles */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-news__video-section {
    padding-top: 10px !important; /* body đã đảm nhận --header-offset, tại đây cấm var(--header-offset) */
  }
}

@media (max-width: 480px) {
  .page-news__hero-section {
    padding-bottom: 30px;
  }

  .page-news__main-title {
    font-size: clamp(1.6em, 7vw, 2.2em);
  }

  .page-news__section-title {
    font-size: 1.5em;
  }
}