/* style/news.css */

/* Variables for colors */
:root {
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-button-gradient-start: #2AD16F;
  --color-button-gradient-end: #13994A;
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

/* Base styles for the page content */
.page-news {
  background-color: var(--color-background); /* #08160F */
  color: var(--color-text-main); /* #F2FFF6 for contrast on dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-news h1, .page-news h2, .page-news h3, .page-news h4, .page-news h5, .page-news h6 {
  color: var(--color-text-main);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 0.8em;
}

.page-news p {
  margin-bottom: 1em;
  color: var(--color-text-secondary);
}

.page-news a {
  color: var(--color-secondary);
  text-decoration: none;
}

.page-news a:hover {
  text-decoration: underline;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--color-deep-green); /* Darker background for hero */
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-news__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  z-index: 1;
}

.page-news__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--color-text-main);
}

.page-news__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--color-text-secondary);
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
  color: #ffffff;
  font-size: 1.1em;
  font-weight: bold;
  text-transform: uppercase;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-news__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* General Section Styles */
.page-news__section {
  padding: 60px 0;
  background-color: var(--color-background);
  color: var(--color-text-main);
}

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

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--color-text-secondary);
}

/* Featured Topics Grid */
.page-news__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-news__card {
  background-color: var(--color-card-bg); /* #11271B */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

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

.page-news__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__card-title {
  font-size: 1.5em;
  padding: 15px 20px 10px;
  color: var(--color-text-main);
}

.page-news__card-title a {
  color: inherit;
  text-decoration: none;
}

.page-news__card-title a:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

.page-news__card-text {
  padding: 0 20px 15px;
  font-size: 0.95em;
  color: var(--color-text-secondary);
}

.page-news__card-link {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 20px 20px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-news__card-link:hover {
  background-color: var(--color-secondary);
  text-decoration: none;
}

/* Benefits Section */
.page-news__benefit-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.page-news__benefit-item {
  background-color: var(--color-card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-size: 1.05em;
  position: relative;
  padding-left: 45px;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.page-news__benefit-item::before {
  content: '✅';
  position: absolute;
  left: 15px;
  top: 25px;
  font-size: 1.2em;
}

/* Access Guide Section */
.page-news__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__step-item {
  background-color: var(--color-card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  text-align: center;
  border: 1px solid var(--color-border);
}

.page-news__step-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: var(--color-text-main);
}

.page-news__step-text {
  color: var(--color-text-secondary);
}

.page-news__cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

.page-news__cta-button--wide {
  min-width: 280px;
}

.page-news__cta-button--secondary {
  background: var(--color-card-bg);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}

.page-news__cta-button--secondary:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-news__faq-list {
  margin-top: 40px;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--color-text-main);
  cursor: pointer;
  background-color: var(--color-deep-green);
  border-bottom: 1px solid var(--color-border);
}

.page-news__faq-item[open] .page-news__faq-question {
  border-bottom: 1px solid var(--color-border);
}

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

.page-news__faq-question::marker {
  display: none;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: var(--color-text-secondary);
}

/* Conclusion Section */
.page-news__conclusion {
  text-align: center;
  padding-bottom: 80px;
}

.page-news__conclusion .page-news__cta-button--primary {
  background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }

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

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

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

  .page-news__hero-section {
    padding-bottom: 40px;
  }

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

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

  .page-news__description {
    font-size: 1em;
  }

  .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-left: 15px;
    padding-right: 15px;
  }

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

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

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

  .page-news__grid,
  .page-news__benefit-list,
  .page-news__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__card {
    margin: 0 15px;
  }

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

  .page-news__benefit-item {
    padding: 20px 20px 20px 45px;
    margin: 0 15px;
  }

  .page-news__benefit-item::before {
    top: 20px;
  }

  .page-news__step-item {
    margin: 0 15px;
  }

  .page-news__cta-row {
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
    padding: 0 15px;
  }

  .page-news__cta-button--wide, .page-news__cta-button--secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__faq-item {
    margin: 0 15px 15px;
  }

  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

  .page-news__faq-answer {
    padding: 15px 20px;
  }

  /* Mobile image and container responsiveness */
  .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,
  .page-news__hero-image-wrapper,
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container,
  .page-news__hero-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-news__hero-section, .page-news__featured-topics, .page-news__benefits, .page-news__access-guide, .page-news__faq-section, .page-news__conclusion {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important;
  }

  .page-news__video-section {
    padding-top: 10px !important; /* body đã xử lý --header-offset, tránh trùng lặp */
  }
}

/* Ensure no small images or filters */
.page-news img:not(.no-filter) {
  filter: none; /* Tắt mọi bộ lọc tiềm năng */
}

/* Content area image size enforcement */
.page-news__content-area img,
.page-news__card img {
  min-width: 200px;
  min-height: 200px;
}

/* Specific overrides to prevent small images in content sections */
.page-news__card-image {
  min-width: 200px;
  min-height: 200px;
}

/* Image sizing for HTML width/height attributes */
.page-news__hero-image {
    width: 1200px; /* Display width */
    height: 675px; /* Display height */
}
.page-news__card-image {
    width: 400px; /* Display width */
    height: 225px; /* Display height */
}