/* style/news.css */

/* --- General Page Styles --- */
.page-news {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF; /* Explicitly setting for clarity, though shared.css might handle body */
  line-height: 1.6;
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding-bottom: 60px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #f8f8f8;
}

.page-news__hero-image-wrapper {
  width: 100%;
  overflow: hidden;
}

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

.page-news__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 40px 20px 0;
  box-sizing: border-box;
}

.page-news__main-title {
  font-size: clamp(2.2em, 4vw, 3em); /* Responsive font size, avoid huge fixed values */
  color: #26A9E0;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555555;
}

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

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

.page-news__btn-primary {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
  background-color: #1e87c0;
  border-color: #1e87c0;
}

.page-news__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87c0;
  border-color: #1e87c0;
}

.page-news a[href="https://ads.win2026vn.com/redirect?plink_id=pl_1776948210166_0gd2uxmhq"].page-news__btn-primary {
  background-color: #EA7C07; /* Login/Register specific color */
  border-color: #EA7C07;
  color: #FFFFFF;
}

.page-news a[href="https://ads.win2026vn.com/redirect?plink_id=pl_1776948210166_0gd2uxmhq"].page-news__btn-primary:hover {
  background-color: #d46c00;
  border-color: #d46c00;
}

.page-news a[href="https://ads.win2026vn.com/redirect?plink_id=pl_1776948210166_0gd2uxmhq"].page-news__btn-secondary {
  color: #EA7C07; /* Login/Register specific color */
  border-color: #EA7C07;
}

.page-news a[href="https://ads.win2026vn.com/redirect?plink_id=pl_1776948210166_0gd2uxmhq"].page-news__btn-secondary:hover {
  background-color: #fdf2e8;
  color: #d46c00;
  border-color: #d46c00;
}

/* --- Articles Section --- */
.page-news__articles-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-news__article-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  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 6px 20px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-news__article-date {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 10px;
}

.page-news__article-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
}

.page-news__article-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #26A9E0;
}

.page-news__article-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Pushes button to bottom */
}

.page-news__read-more-btn {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more-btn:hover {
  color: #1e87c0;
  text-decoration: underline;
}

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

/* --- CTA Section (Dark Background) --- */
.page-news__cta-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Brand primary color for dark background */
  color: #FFFFFF; /* White text for contrast */
  text-align: center;
}

.page-news__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-news__cta-title {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFFFFF;
}

.page-news__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto;
  color: #f0f0f0;
}

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

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

  .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

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

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .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;
    padding: 12px 20px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-news__articles-section {
    padding: 40px 0;
  }

  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-news__article-image-wrapper {
    height: 180px; /* Adjust height for mobile */
  }

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

  .page-news__cta-section {
    padding: 50px 0;
  }

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

  .page-news__cta-description {
    font-size: 1em;
  }

  .page-news__cta-buttons-bottom {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  /* Image responsive enforcement */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__hero-image-wrapper,
  .page-news__article-image-wrapper,
  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow */
  }
  
  /* All content containers should have padding on mobile */
  .page-news__hero-section .page-news__hero-content,
  .page-news__articles-section .page-news__container,
  .page-news__cta-section .page-news__cta-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Specific contrast fixes if needed, though initial choices should be good */
.page-news__dark-bg {
  background: #26A9E0;
  color: #ffffff; /* Forced white text */
}
.page-news__dark-bg .page-news__cta-title,
.page-news__dark-bg .page-news__cta-description {
  color: #ffffff;
}