/* style/tin-tuc.css */

/* Base styles for the page */
.page-tin-tuc {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text for light body background */
  line-height: 1.6;
  background-color: #f5f5f5; /* Light grey background for the main content area */
}

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

/* Hero Section */
.page-tin-tuc__hero-section {
  padding-top: 10px; /* Fixed header spacing - approx 10px top padding */
  padding-bottom: 60px;
  background-color: #26A9E0; /* Brand primary color background */
  color: #ffffff; /* White text for dark background */
  text-align: center;
}

.page-tin-tuc__main-title {
  font-size: clamp(2em, 3.5vw, 3.2em); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

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

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

/* General button styles */
.page-tin-tuc__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%; /* Ensure buttons adapt to container width */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-tin-tuc__btn--primary {
  background-color: #EA7C07; /* Custom login color */
  color: #ffffff;
  border: 2px solid transparent;
}

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

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

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

.page-tin-tuc__btn--white {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid transparent;
}

.page-tin-tuc__btn--white:hover {
  background-color: #f0f0f0;
}

.page-tin-tuc__btn--outline-white {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-tin-tuc__btn--outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Latest News Section */
.page-tin-tuc__latest-news-section {
  padding: 60px 0;
  background-color: #ffffff; /* White background for news list */
}

.page-tin-tuc__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand primary color for titles */
}

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

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

.page-tin-tuc__article-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-tin-tuc__article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-tin-tuc__article-content {
  padding: 20px;
}

.page-tin-tuc__article-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333333;
  line-height: 1.4;
}

.page-tin-tuc__article-excerpt {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 15px;
}

.page-tin-tuc__article-date {
  font-size: 0.85em;
  color: #999999;
  display: block;
}

.page-tin-tuc__view-all-wrapper {
  text-align: center;
}

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

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

.page-tin-tuc__cta-section .page-tin-tuc__section-title {
  color: #ffffff;
  margin-bottom: 20px;
}

.page-tin-tuc__cta-section .page-tin-tuc__description {
  color: #f0f0f0;
  margin-bottom: 40px;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-tin-tuc__container {
    padding: 0 15px;
  }

  /* 1. Top section title + dual CTA */
  .page-tin-tuc__hero-section {
    padding-top: 10px !important; /* Enforce small top padding */
    padding-bottom: 40px;
  }

  .page-tin-tuc__main-title {
    font-size: 2em; /* Smaller H1 for mobile */
  }

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

  /* 4. Buttons and button containers */
  .page-tin-tuc__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important; /* Ensure flex items wrap */
  }

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

  /* 2. Single column long text container - applies to article grid and general content */
  .page-tin-tuc__latest-news-section,
  .page-tin-tuc__cta-section {
    padding: 40px 0;
  }

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

  .page-tin-tuc__section-description {
    font-size: 0.95em;
  }

  .page-tin-tuc__articles-grid {
    grid-template-columns: 1fr; /* Single column for articles */
    gap: 25px;
  }

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

  /* 3. General images */
  .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__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 5. Registration tutorial & FAQ - General content blocks responsiveness */
  .page-tin-tuc h3 {
    font-size: 1.1em;
  }
  .page-tin-tuc p {
    font-size: 0.95em;
  }
}