/* style/tin-tuc.css */

/* Base styles for the page content */
.page-tin-tuc {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Main text color for light background */
  background-color: #F5F7FA; /* Body background color */
}

.page-tin-tuc__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

/* --- Hero Section --- */
.page-tin-tuc__hero-section {
  background: #F5F7FA; /* Light background as per body */
  padding-bottom: 60px;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  text-align: center;
}

.page-tin-tuc__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px 16px;
  box-sizing: border-box;
}

.page-tin-tuc__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  text-align: left;
  color: #333333; /* Dark text for light background */
}

.page-tin-tuc__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #E53935; /* Brand color for main title */
}

.page-tin-tuc__hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #333333;
}

.page-tin-tuc__cta-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-tin-tuc__btn-primary,
.page-tin-tuc__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  text-align: center;
}

.page-tin-tuc__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Custom button gradient */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-tin-tuc__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-tin-tuc__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-tin-tuc__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-tin-tuc__btn-secondary--white-border {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.page-tin-tuc__btn-secondary--white-border:hover {
  background: #ffffff;
  color: #E53935;
  border-color: #ffffff;
}

.page-tin-tuc__hero-image {
  flex: 1 1 45%;
  min-width: 300px;
  text-align: center;
}

.page-tin-tuc__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block; /* Ensure no extra space below image */
}

/* --- News List Section --- */
.page-tin-tuc__news-list-section {
  background-color: #ffffff;
  padding: 60px 0;
}

.page-tin-tuc__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 40px;
}

.page-tin-tuc__section-title--white {
  color: #ffffff;
}

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

.page-tin-tuc__news-card {
  background-color: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-tin-tuc__news-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-tin-tuc__news-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crop image to fit */
  display: block;
}

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

.page-tin-tuc__news-date {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 10px;
}

.page-tin-tuc__news-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-tin-tuc__news-card-title a {
  color: #E53935;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-tin-tuc__news-card-title a:hover {
  color: #FF5A4F;
  text-decoration: underline;
}

.page-tin-tuc__news-card-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-tin-tuc__read-more-btn {
  display: inline-block;
  margin-top: auto; /* Push to bottom */
  color: #E53935;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-tin-tuc__read-more-btn:hover {
  color: #FF5A4F;
  text-decoration: underline;
}

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

/* --- CTA Section (Dark Background) --- */
.page-tin-tuc__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-tin-tuc__dark-section {
  background: #E53935; /* Brand primary color for dark section */
  color: #ffffff; /* White text for contrast */
}

.page-tin-tuc__cta-text {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #ffffff;
}

.page-tin-tuc__cta-text--white {
  color: #ffffff;
}

/* Ensure buttons in CTA section also wrap */
.page-tin-tuc__cta-section .page-tin-tuc__cta-group {
  justify-content: center;
}

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

  /* Hero Section */
  .page-tin-tuc__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 40px;
  }

  .page-tin-tuc__hero-container {
    flex-direction: column;
    padding: 20px 15px;
    gap: 30px;
  }

  .page-tin-tuc__hero-content {
    text-align: center;
    min-width: unset;
    flex: 1 1 100%;
  }

  .page-tin-tuc__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-tin-tuc__hero-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-tin-tuc__cta-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    width: 100%; /* Full width for the button group */
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to button group */
  }

  .page-tin-tuc__btn-primary,
  .page-tin-tuc__btn-secondary,
  .page-tin-tuc a[class*="button"],
  .page-tin-tuc a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-tin-tuc__hero-image {
    min-width: unset;
    flex: 1 1 100%;
    width: 100%; /* Ensure image container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to image container */
  }

  .page-tin-tuc__hero-side-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* News List Section */
  .page-tin-tuc__news-list-section {
    padding: 40px 0;
  }

  .page-tin-tuc__container {
    padding: 0 15px !important; /* Add padding to content container */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-tin-tuc__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 30px;
  }

  .page-tin-tuc__news-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

  .page-tin-tuc__news-card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Allow height to adjust */
  }

  .page-tin-tuc__news-image-wrapper {
    height: auto; /* Adjust wrapper height */
  }

  /* CTA Section */
  .page-tin-tuc__cta-section {
    padding: 60px 0;
  }

  .page-tin-tuc__cta-text {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  /* General image and container rules for mobile */
  .page-tin-tuc img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-tin-tuc__section,
  .page-tin-tuc__card,
  .page-tin-tuc__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Additional responsive for slightly larger mobile/tablet (up to 1024px) */
@media (max-width: 1024px) {
  .page-tin-tuc__hero-container {
    flex-direction: column;
    text-align: center;
  }
  .page-tin-tuc__hero-content {
    text-align: center;
  }
  .page-tin-tuc__cta-group {
    justify-content: center;
  }
  .page-tin-tuc__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}