/* Base styles for the news page */
.page-tin-tuc {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light background */
  line-height: 1.6;
  background-color: #ffffff; /* Explicitly setting for clarity, though shared.css likely handles body */
}

.page-tin-tuc__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.page-tin-tuc__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
  background-color: #f0f0f0; /* Light background for the section */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-tin-tuc__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  max-height: 600px; /* Limit hero image height */
}

.page-tin-tuc__hero-content {
  padding: 40px 20px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.page-tin-tuc__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #017439; /* Brand color for H1 */
  margin-bottom: 15px;
}

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

.page-tin-tuc__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Ensure wrapping on smaller screens */
}

.page-tin-tuc__btn-primary,
.page-tin-tuc__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
}

.page-tin-tuc__btn-primary {
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
  border: 2px solid #017439;
}

.page-tin-tuc__btn-primary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

.page-tin-tuc__btn-secondary {
  background-color: #C30808; /* Custom color for secondary CTA (e.g., Register) */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-tin-tuc__btn-secondary:hover {
  background-color: #a00606;
  border-color: #a00606;
  color: #fff; /* Hover color for text */
}

/* General Section Styles */
.page-tin-tuc__latest-news-section,
.page-tin-tuc__in-depth-articles-section,
.page-tin-tuc__faq-section {
  padding: 60px 0;
}

.page-tin-tuc__dark-bg {
  background-color: #017439; /* Primary brand color for dark sections */
  color: #ffffff;
}

.page-tin-tuc__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-tin-tuc__section-title {
  font-size: 2.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from section (dark/light bg) */
}

.page-tin-tuc__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: inherit;
}

/* News Grid / Card Styles */
.page-tin-tuc__news-grid,
.page-tin-tuc__in-depth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-tin-tuc__news-card,
.page-tin-tuc__in-depth-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;
  height: 100%; /* Ensure cards in a row have equal height */
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__news-card:hover,
.page-tin-tuc__in-depth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-tin-tuc__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-tin-tuc__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

.page-tin-tuc__card-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to grow to fill space */
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__card-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #017439; /* Brand color for card titles */
}

.page-tin-tuc__card-meta {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 15px;
}

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

.page-tin-tuc__btn-readmore {
  display: inline-block;
  padding: 8px 15px;
  background-color: #f0f0f0;
  color: #017439;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  align-self: flex-start; /* Align to start */
  transition: background-color 0.3s ease;
}

.page-tin-tuc__btn-readmore:hover {
  background-color: #e0e0e0;
}

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

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

.page-tin-tuc__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-tin-tuc__category-item {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.15); /* Light translucent background */
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-tin-tuc__category-item:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: #ffffff;
}

/* Call to Action Section */
.page-tin-tuc__cta-section {
  padding: 80px 0;
  text-align: center;
}

/* FAQ Section */
.page-tin-tuc__faq-list {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.page-tin-tuc__faq-item {
  border-bottom: 1px solid #e0e0e0;
}

.page-tin-tuc__faq-item:last-child {
  border-bottom: none;
}

.page-tin-tuc__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: #017439; /* Brand color for FAQ questions */
  cursor: pointer;
  background-color: #f9f9f9;
}

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

.page-tin-tuc__faq-question::marker {
  display: none;
}

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

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

.page-tin-tuc__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: #555555;
}

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

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

  /* Hero Section */
  .page-tin-tuc__hero-section {
    padding-top: 10px;
  }

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

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

  .page-tin-tuc__description {
    font-size: 1em;
  }

  .page-tin-tuc__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically on mobile */
    gap: 15px;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }

  .page-tin-tuc__btn-primary,
  .page-tin-tuc__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  /* General Section Styles */
  .page-tin-tuc__latest-news-section,
  .page-tin-tuc__in-depth-articles-section,
  .page-tin-tuc__categories-section,
  .page-tin-tuc__cta-section,
  .page-tin-tuc__faq-section {
    padding: 40px 0;
  }

  .page-tin-tuc__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  /* News Grid / Card Styles */
  .page-tin-tuc__news-grid,
  .page-tin-tuc__in-depth-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
  }

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

  /* Categories Section */
  .page-tin-tuc__category-list {
    flex-direction: column !important; /* Stack categories vertically */
    gap: 10px;
    align-items: center;
  }

  .page-tin-tuc__category-item {
    width: 100%;
    text-align: center;
    max-width: 300px; /* Limit width for individual items */
  }

  /* FAQ Section */
  .page-tin-tuc__faq-list {
    padding: 0;
    border: none;
    border-radius: 0;
  }

  .page-tin-tuc__faq-item {
    border-bottom: none;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  .page-tin-tuc__faq-question {
    padding: 15px;
    font-size: 1em;
  }

  .page-tin-tuc__faq-answer {
    padding: 0 15px 15px 15px;
  }

  /* Universal image and container handling for mobile */
  .page-tin-tuc img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-tin-tuc__section,
  .page-tin-tuc__card,
  .page-tin-tuc__container,
  .page-tin-tuc__hero-content,
  .page-tin-tuc__news-card,
  .page-tin-tuc__in-depth-card,
  .page-tin-tuc__category-item,
  .page-tin-tuc__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Override specific padding for elements that handle it internally */
  .page-tin-tuc__container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-tin-tuc__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}