/* style/news.css */
/* body đã có padding-top: var(--header-offset) từ shared.css, không lặp lại ở đây */

.page-news {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #F5F7FA; /* Custom background color */
}

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

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

.page-news__hero-content {
  max-width: 900px;
  margin-top: 40px; /* Spacing between image and text */
  padding: 0 20px;
  box-sizing: border-box;
}

.page-news__main-title {
  font-size: clamp(28px, 3.5vw, 48px); /* Responsive H1 font size */
  font-weight: bold;
  line-height: 1.2;
  color: #E53935; /* Brand color for H1 */
  margin-bottom: 20px;
}

.page-news__hero-description {
  font-size: 18px;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 30px;
}

.page-news__latest-news-section {
  padding: 60px 0;
  background-color: #F5F7FA; /* Custom background color */
}

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

.page-news__section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: bold;
  color: #333333;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-news__news-card {
  background-color: #FFFFFF; /* Card background color */
  border: 1px solid #E0E0E0; /* Border color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-news__card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-news__card-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
}

.page-news__card-content {
  padding: 20px;
}

.page-news__card-title {
  font-size: 20px;
  font-weight: bold;
  color: #333333; /* Main text color */
  margin-bottom: 10px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.page-news__card-link:hover .page-news__card-title {
  color: #E53935; /* Brand color on hover */
}

.page-news__card-date {
  font-size: 14px;
  color: #666666;
  margin-bottom: 15px;
  display: block;
}

.page-news__card-excerpt {
  font-size: 16px;
  color: #333333;
  line-height: 1.6;
}

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

.page-news__view-all-button {
  display: inline-block;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.page-news__view-all-button:hover {
  opacity: 0.9;
}

.page-news__cta-section {
  background-color: #E53935; /* Dark section background */
  padding: 60px 0;
  color: #ffffff; /* White text for dark background */
  text-align: center;
}

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

.page-news__cta-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.page-news__cta-text-wrapper {
  max-width: 800px;
}

.page-news__cta-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box; /* Ensure padding is included in width */
  max-width: 100%; /* For mobile responsiveness */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  border: 2px solid transparent; /* Consistent border for hover effect */
}

.page-news__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary {
  background-color: #ffffff; /* White background for secondary button */
  color: #E53935; /* Brand color text */
  border: 2px solid #E53935; /* Brand color border */
}

.page-news__btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: #f5f5f5; /* Slight background change on hover */
}

/* Responsive design */
@media (max-width: 1024px) {
  .page-news__hero-content {
    margin-top: 30px;
  }
  .page-news__main-title {
    font-size: clamp(26px, 4vw, 42px);
  }
  .page-news__hero-description {
    font-size: 17px;
  }
  .page-news__section-title {
    font-size: clamp(22px, 3.5vw, 32px);
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__card-image {
    height: 200px;
  }
  .page-news__cta-title {
    font-size: clamp(22px, 3.5vw, 36px);
  }
  .page-news__cta-description {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 10px 0 40px 0;
  }
  .page-news__hero-content {
    margin-top: 20px;
  }
  .page-news__main-title {
    font-size: clamp(24px, 6vw, 38px);
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__latest-news-section,
  .page-news__cta-section {
    padding: 40px 0;
  }
  .page-news__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__section-title {
    font-size: clamp(20px, 5vw, 28px);
    margin-bottom: 30px;
  }
  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__card-image {
    height: 180px;
  }
  .page-news__card-title {
    font-size: 18px;
  }
  .page-news__card-excerpt {
    font-size: 15px;
  }
  .page-news__view-all-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-news__cta-content {
    gap: 20px;
  }
  .page-news__cta-title {
    font-size: clamp(20px, 5vw, 32px);
  }
  .page-news__cta-description {
    font-size: 16px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Mobile image and video responsiveness (required) */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-section,
  .page-news__latest-news-section,
  .page-news__cta-section,
  .page-news__news-card,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }
  /* Remove specific padding for sections that already have it from .page-news__container */
  .page-news__latest-news-section,
  .page-news__cta-section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-news__hero-section {
    padding-left: 0;
    padding-right: 0;
    padding-top: 10px !important; /* Small top padding */
  }
  .page-news__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
}