.page-tin-tuc {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #FFFFFF;
}

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

.page-tin-tuc__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

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

.page-tin-tuc__highlight {
  color: #017439;
  font-weight: bold;
}

.page-tin-tuc__text-block--white {
  color: #ffffff;
}

.page-tin-tuc__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #017439;
  line-height: 1.2;
}

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

/* Hero Section */
.page-tin-tuc__hero-section {
  position: relative;
  padding-top: 10px; /* Aligned with fixed header offset */
  margin-bottom: 40px;
  text-align: center;
  overflow: hidden;
}

.page-tin-tuc__hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.page-tin-tuc__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-tin-tuc__hero-content {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  transform: translateY(-50%); /* Pull up from below image */
  margin-top: -100px; /* Adjust based on desired overlap */
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.page-tin-tuc__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 800;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Introduction Section */
.page-tin-tuc__introduction-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-tin-tuc__text-block {
  margin-bottom: 20px;
  font-size: 1.1em;
  line-height: 1.8;
  text-align: justify;
}

/* Guide Box Section */
.page-tin-tuc__guide-box {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-tin-tuc__guide-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.page-tin-tuc__guide-card {
  flex: 0 0 calc(20% - 16px); /* 5 cards per row, accounting for gap */
  max-width: calc(20% - 16px);
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block; /* Ensure it behaves like a block for flex positioning */
  text-decoration: none;
  color: inherit;
  position: relative;
}

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

.page-tin-tuc__guide-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 250 / 350;
}

/* Specific vertical alignment for 5 guide cards */
.page-tin-tuc__guide-card--pos-1, .page-tin-tuc__guide-card--pos-5 {
  margin-top: 50px;
}

.page-tin-tuc__guide-card--pos-2, .page-tin-tuc__guide-card--pos-4 {
  margin-top: 25px;
}

/* Home Content Box (Featured Article) */
.page-tin-tuc__home-content-box {
  max-width: 90%;
  margin: 0 auto 40px auto;
  padding: 30px;
  border: 5px solid #017439;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(1, 116, 57, 0.5);
  height: 700px; /* Fixed height for desktop */
  overflow: hidden; /* Ensure content inside inner scrolls */
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__home-content-inner {
  height: 100%; /* Occupy full height of parent */
  overflow-y: auto; /* Enable scrolling */
  padding-right: 15px; /* Space for scrollbar */
  box-sizing: border-box;
}

.page-tin-tuc__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-tin-tuc__home-content-inner::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.page-tin-tuc__home-content-inner::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.page-tin-tuc__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.page-tin-tuc__content-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
  border-radius: 8px;
}

/* News Section (Grid) */
.page-tin-tuc__news-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

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

.page-tin-tuc__news-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  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 6px 16px rgba(0, 0, 0, 0.15);
}

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

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

.page-tin-tuc__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-tin-tuc__card-title a {
  color: #017439;
  text-decoration: none;
}

.page-tin-tuc__card-title a:hover {
  text-decoration: underline;
}

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

.page-tin-tuc__card-description {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-tin-tuc__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Buttons */
.page-tin-tuc__btn-primary,
.page-tin-tuc__btn-secondary,
.page-tin-tuc__btn-tertiary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-tin-tuc__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00;
  border: 2px solid #C30808;
}

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

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

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

.page-tin-tuc__btn-tertiary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
  font-size: 0.95em;
  padding: 10px 20px;
}

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

/* Footer Content (inside main) */
.page-tin-tuc__footer-content {
  padding: 30px 20px;
  text-align: center;
}

.page-tin-tuc__copyright {
  font-size: 0.9em;
  color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tin-tuc__container {
    padding: 15px;
  }

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

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

  .page-tin-tuc__main-title {
    font-size: clamp(1.8em, 3.5vw, 3em);
  }

  .page-tin-tuc__hero-description {
    font-size: 1.1em;
  }

  .page-tin-tuc__guide-card {
    flex: 0 0 calc(33.333% - 13.333px); /* 3 cards per row */
    max-width: calc(33.333% - 13.333px);
  }

  .page-tin-tuc__guide-card--pos-1, .page-tin-tuc__guide-card--pos-5 {
    margin-top: 0;
  }

  .page-tin-tuc__guide-card--pos-2, .page-tin-tuc__guide-card--pos-4 {
    margin-top: 0;
  }

  .page-tin-tuc__news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .page-tin-tuc__home-content-box {
    max-width: 95%;
    padding: 25px;
  }

  .page-tin-tuc__card-image {
    height: 180px;
  }

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

  .page-tin-tuc__btn-primary,
  .page-tin-tuc__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
  }
}

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

  .page-tin-tuc__container,
  .page-tin-tuc__hero-section,
  .page-tin-tuc__introduction-section,
  .page-tin-tuc__guide-box,
  .page-tin-tuc__home-content-box,
  .page-tin-tuc__news-section,
  .page-tin-tuc__cta-section,
  .page-tin-tuc__footer-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

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

  .page-tin-tuc__hero-content {
    padding: 20px 10px;
    margin-top: -60px;
  }

  .page-tin-tuc__main-title {
    font-size: clamp(1.5em, 5vw, 2.5em);
    margin-bottom: 15px;
  }

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

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

  /* Guide Cards - Mobile specific layout */
  .page-tin-tuc__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Base for 2 or 3 columns */
    gap: 10px;
  }

  .page-tin-tuc__guide-card {
    padding-top: 0 !important; /* Reset specific padding-top */
    flex: auto; /* Allow grid to manage sizing */
    max-width: 100%;
  }

  .page-tin-tuc__guide-card--pos-1, .page-tin-tuc__guide-card--pos-2 {
    grid-column: span 3; /* First two cards span 3 columns each (half width) */
  }

  .page-tin-tuc__guide-card--pos-3, .page-tin-tuc__guide-card--pos-4, .page-tin-tuc__guide-card--pos-5 {
    grid-column: span 2; /* Next three cards span 2 columns each (third width) */
  }

  .page-tin-tuc__guide-card img {
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 250 / 350;
  }

  /* Home Content Box - Mobile */
  .page-tin-tuc__home-content-box {
    height: auto !important; /* Auto height on mobile */
    overflow: visible !important; /* No scroll on mobile */
    padding: 20px;
    border-width: 3px;
  }

  .page-tin-tuc__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0; /* No scrollbar space needed */
  }

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

  /* News Grid - Mobile */
  .page-tin-tuc__news-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
  }

  .page-tin-tuc__card-image {
    height: 150px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

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

  .page-tin-tuc__card-date, .page-tin-tuc__card-description {
    font-size: 0.9em;
  }

  /* Buttons - Mobile */
  .page-tin-tuc__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
  }

  .page-tin-tuc__btn-primary,
  .page-tin-tuc__btn-secondary,
  .page-tin-tuc__btn-tertiary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 15px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General Image adaptation */
  .page-tin-tuc img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}