/* style/tin-tuc.css */
.page-tin-tuc {
  font-family: Arial, sans-serif;
  color: var(--text-main, #F3F8FF); /* Default text color for the page, assuming dark body background */
  background-color: transparent; /* Body background is handled by shared.css var(--deep-navy) */
}

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

/* Top Section */
.page-tin-tuc__top-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(17,59,122,0.8) 0%, rgba(29,95,209,0.8) 100%);
  border-bottom: 1px solid var(--divider, #1B3357);
}

.page-tin-tuc__main-title {
  font-size: 3em;
  font-weight: bold;
  color: var(--text-main, #F3F8FF);
  margin-bottom: 15px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-tin-tuc__description {
  font-size: 1.1em;
  color: var(--text-secondary, #AFC4E8);
  margin-bottom: 30px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-tin-tuc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  max-width: 100%; /* For button responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-tin-tuc__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-tin-tuc__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(43, 115, 246, 0.4);
}

.page-tin-tuc__btn-secondary {
  background: transparent;
  color: var(--text-main, #F3F8FF);
  border: 2px solid var(--border-color, #244D84);
}

.page-tin-tuc__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* News List Section */
.page-tin-tuc__news-list-section {
  padding: 60px 0;
  background-color: var(--deep-navy, #08162B); /* Ensure section background is dark */
}

.page-tin-tuc__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--text-main, #F3F8FF);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.page-tin-tuc__section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gold, #F2C14E);
  margin: 15px auto 0;
  border-radius: 2px;
}

.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: var(--card-bg, #10233F);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.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: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-tin-tuc__card-title {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--text-main, #F3F8FF);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-tin-tuc__card-meta {
  font-size: 0.9em;
  color: var(--text-secondary, #AFC4E8);
  margin-bottom: 15px;
}

.page-tin-tuc__card-excerpt {
  font-size: 1em;
  color: var(--text-secondary, #AFC4E8);
  line-height: 1.5;
  flex-grow: 1; /* Push the link to the bottom if present */
}

/* Call to Action Section */
.page-tin-tuc__call-to-action {
  padding: 80px 0;
  text-align: center;
  background: var(--deep-navy, #08162B);
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-tin-tuc__main-title {
    font-size: 2.5em;
  }
  .page-tin-tuc__section-title {
    font-size: 2em;
  }
  .page-tin-tuc__news-grid {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* 1. 顶区标题 + 双 CTA */
  .page-tin-tuc__top-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 30px;
  }

  .page-tin-tuc__main-title {
    font-size: 2em !important;
    margin-bottom: 10px;
    padding: 0 15px; /* Add padding to prevent text from touching screen edges */
  }

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

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

  .page-tin-tuc__btn {
    width: 100% !important; /* Full width for buttons */
    max-width: 100% !important;
    padding: 12px 15px; /* Adjust padding for mobile */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* 2. 单栏长文容器 (general container for text/cards) */
  .page-tin-tuc__container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-tin-tuc__news-list-section,
  .page-tin-tuc__call-to-action {
    padding: 40px 0;
  }

  .page-tin-tuc__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
    padding: 0 15px;
  }

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

  .page-tin-tuc__news-card {
    border-radius: 8px;
  }

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

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

  .page-tin-tuc__card-meta,
  .page-tin-tuc__card-excerpt {
    font-size: 0.9em;
  }

  /* 3. 通用图片与 figure */
  .page-tin-tuc img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* Ensure containers with images also adapt */
  .page-tin-tuc__news-card,
  .page-tin-tuc__card-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 4. 按钮与按钮容器 (already covered in top-section's cta-buttons) */
  /* This ensures all buttons within .page-tin-tuc are covered */
  .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__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-tin-tuc__cta-buttons.flex-direction-column { /* explicit class if needed for vertical stack */
    flex-direction: column;
  }


  /* 5. 注册教程与 FAQ 区块 (not directly present in this news page, but general rule for any potential content) */
  /* If any h3, figure, or p elements appear in a similar context, they would be handled here. */
  /* Since this is a news page, these rules are more general for text readability. */
  .page-tin-tuc h3 { /* General h3 in content */
    font-size: 1.2em;
    line-height: 1.4;
  }
  .page-tin-tuc p, .page-tin-tuc li { /* General paragraphs and list items */
    font-size: 1em;
    line-height: 1.6;
  }
}