/* style/news.css */

/* Base styles for the news page */
.page-news {
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding for visual separation */
}

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

.page-news__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -80px; /* Overlap slightly with image for design, adjust as needed */
  background: #111111; /* Card BG */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  z-index: 1;
  border: 1px solid #3A2A12; /* Border */
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: bold;
  color: #F2C14E; /* Main Color */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.1em;
  color: #FFF6D6;
  margin-bottom: 30px;
}

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

/* Section Titles */
.page-news__section-title,
.page-news__cta-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  color: #F2C14E;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* News Grid */
.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-news__news-card {
  background: #111111;
  border: 1px solid #3A2A12;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

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

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

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

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

.page-news__card-title a:hover {
  color: #FFD36B;
}

.page-news__card-meta {
  font-size: 0.9em;
  color: #FFF6D6;
  opacity: 0.8;
  margin-bottom: 15px;
}

.page-news__card-description {
  font-size: 1em;
  color: #FFF6D6;
  margin-bottom: 20px;
}

.page-news__card-link {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s ease;
  text-align: center;
  max-width: 150px;
  align-self: flex-start;
}

.page-news__card-link:hover {
  opacity: 0.9;
}

/* View All Button */
.page-news__view-all {
  text-align: center;
  margin-top: 20px;
}

/* CTA Section */
.page-news__cta-section {
  background: #111111;
  padding: 80px 20px;
  text-align: center;
  border-top: 1px solid #3A2A12;
}

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

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

/* Primary Button */
.page-news__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-news__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Secondary Button (for 'Xem tất cả tin tức') */
.page-news__btn-secondary {
  display: inline-block;
  background: transparent;
  color: #F2C14E;
  padding: 15px 30px;
  border: 2px solid #F2C14E;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.page-news__btn-secondary:hover {
  background-color: #F2C14E;
  color: #111111;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-image {
    max-height: 400px;
  }
  .page-news__hero-content {
    margin-top: -60px;
    padding: 30px 20px;
  }
}

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

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

  .page-news__hero-image {
    max-height: 300px;
  }
  .page-news__hero-content {
    margin-top: -40px;
    padding: 25px 15px;
  }

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

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

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

  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

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

  .page-news__news-card,
  .page-news__cta-section,
  .page-news__latest-news-section,
  .page-news__insights-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"],
  .page-news__card-link {
    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 {
    flex-direction: column !important;
    gap: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

/* Ensure all content area images meet minimum size */
.page-news__latest-news-section img,
.page-news__insights-section img {
  min-width: 200px;
  min-height: 200px;
}