/* style/tin-tuc.css */
.page-tin-tuc {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light body background */
  line-height: 1.6;
}

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

/* Title Section */
.page-tin-tuc__title-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 40px;
  background-color: #ffffff;
  text-align: center;
}

.page-tin-tuc__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  color: #017439;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.page-tin-tuc__description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto;
  color: #555555;
}

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

.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-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #333333; /* Default for light background */
}

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

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

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

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

.page-tin-tuc__news-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #017439;
}

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

.page-tin-tuc__news-date {
  font-size: 0.85em;
  color: #777777;
  margin-top: auto; /* Pushes date to bottom */
}

.page-tin-tuc__read-more {
  display: inline-block;
  margin-top: 10px;
  color: #017439;
  font-weight: 600;
  text-decoration: none;
}

/* CTA Card specific styles */
.page-tin-tuc__cta-card.page-tin-tuc__dark-bg {
  background-color: #017439; /* Brand color */
  color: #ffffff; /* White text for dark background */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-tin-tuc__cta-card .page-tin-tuc__news-image {
  display: none; /* Hide image for CTA card on desktop */
}

.page-tin-tuc__cta-card .page-tin-tuc__view-all-content {
  padding: 30px;
}

.page-tin-tuc__cta-card .page-tin-tuc__news-title {
  color: #ffffff;
  font-size: 1.5em;
}

.page-tin-tuc__cta-card .page-tin-tuc__news-excerpt {
  color: #f0f0f0;
}

.page-tin-tuc__cta-card .page-tin-tuc__view-all-button {
  background-color: #ffffff;
  color: #017439;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 700;
  margin-top: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-tin-tuc__cta-card .page-tin-tuc__view-all-button:hover {
  background-color: #f0f0f0;
}

/* Pagination */
.page-tin-tuc__pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 10px;
}

.page-tin-tuc__pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-decoration: none;
  color: #017439;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-tin-tuc__pagination-item.is-active,
.page-tin-tuc__pagination-item:hover {
  background-color: #017439;
  color: #ffffff;
  border-color: #017439;
}

/* CTA Section */
.page-tin-tuc__cta-section {
  padding: 80px 0;
  background-color: #017439; /* Main brand color */
  color: #ffffff; /* White text */
  text-align: center;
}

.page-tin-tuc__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-tin-tuc__cta-description {
  font-size: 1.1em;
  max-width: 900px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

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

.page-tin-tuc__btn-primary,
.page-tin-tuc__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-tin-tuc__btn-primary {
  background-color: #C30808; /* Custom color for register */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

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

.page-tin-tuc__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808; /* Custom border color for login */
}

.page-tin-tuc__btn-secondary:hover {
  background-color: #C30808;
  color: #ffffff;
}

/* FAQ Section */
.page-tin-tuc__faq-section {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

.page-tin-tuc__faq-main-title {
  text-align: center;
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 700;
  color: #017439;
  margin-bottom: 40px;
}

.page-tin-tuc__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-tin-tuc__faq-item {
  background-color: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-tin-tuc__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  list-style: none; /* Hide default marker for details summary */
  user-select: none;
}

.page-tin-tuc__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

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

.page-tin-tuc__faq-item[open] .page-tin-tuc__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

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

.page-tin-tuc__faq-answer p {
  margin: 0;
}

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

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

  .page-tin-tuc__title-section {
    padding-top: 10px !important;
    padding-bottom: 20px;
  }

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

  .page-tin-tuc__description {
    font-size: 1em;
    padding: 0 15px;
  }

  .page-tin-tuc__news-list-section {
    padding: 30px 0;
  }

  .page-tin-tuc__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tin-tuc__news-card {
    margin: 0 15px;
  }

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

  .page-tin-tuc__news-title {
    font-size: 1.1em;
  }

  .page-tin-tuc__news-excerpt {
    font-size: 0.9em;
  }

  .page-tin-tuc__cta-card .page-tin-tuc__news-title {
    font-size: 1.3em;
  }

  .page-tin-tuc__pagination {
    margin-top: 30px;
  }

  .page-tin-tuc__cta-section {
    padding: 40px 0;
  }

  .page-tin-tuc__cta-title {
    font-size: 1.6em;
    padding: 0 15px;
  }

  .page-tin-tuc__cta-description {
    font-size: 1em;
    padding: 0 15px;
  }

  .page-tin-tuc__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px;
  }

  .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;
    padding-right: 15px;
  }

  .page-tin-tuc__btn-container,
  .page-tin-tuc__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important; /* Ensure buttons wrap */
  }

  .page-tin-tuc__faq-section {
    padding: 30px 0;
  }

  .page-tin-tuc__faq-main-title {
    font-size: 1.6em;
    margin-bottom: 20px;
    padding: 0 15px;
  }

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

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

  /* General image and container rules 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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}