/* style/tin-tuc.css */

:root {
  --loto66-primary: #FF8C1A;
  --loto66-secondary: #FFA53A;
  --loto66-bg-dark: #0D0E12;
  --loto66-card-bg: #17191F;
  --loto66-text-light: #FFF3E6;
  --loto66-border: #A84F0C;
  --loto66-glow: #FFB04D;
  --loto66-deep-orange: #D96800;
}

.page-tin-tuc {
  background-color: var(--loto66-bg-dark);
  color: var(--loto66-text-light);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

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

/* Hero Title Section */
.page-tin-tuc__hero-title-section {
  padding-top: 10px; /* Small top padding, relying on body padding-top from shared.css */
  padding-bottom: 40px;
  text-align: center;
  background-color: var(--loto66-bg-dark);
  color: var(--loto66-text-light);
}

.page-tin-tuc__main-title {
  font-size: clamp(2em, 4vw, 3.2em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: var(--loto66-text-light);
}

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

/* Latest News Section */
.page-tin-tuc__latest-news-section {
  padding: 60px 0;
  background-color: var(--loto66-bg-dark);
}

.page-tin-tuc__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--loto66-text-light);
}

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

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

.page-tin-tuc__news-card {
  background-color: var(--loto66-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__news-card:hover {
  transform: translateY(-5px);
  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; /* Allow content to grow and push date to bottom */
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__card-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--loto66-text-light);
  flex-grow: 1; /* Title takes available space */
}

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

.page-tin-tuc__card-date {
  font-size: 0.85em;
  color: var(--loto66-secondary);
  text-align: right;
}

.page-tin-tuc__button-container {
  text-align: center;
  margin-top: 50px;
}

/* CTA Section */
.page-tin-tuc__cta-section {
  background-color: var(--loto66-primary);
  padding: 60px 0;
  text-align: center;
  color: #ffffff;
}

.page-tin-tuc__cta-content {
  max-width: 900px;
}

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

.page-tin-tuc__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-tin-tuc__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

.page-tin-tuc__btn-primary {
  background: linear-gradient(180deg, var(--loto66-secondary) 0%, var(--loto66-deep-orange) 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-tin-tuc__btn-primary:hover {
  background: linear-gradient(180deg, var(--loto66-deep-orange) 0%, var(--loto66-secondary) 100%);
  box-shadow: 0 0 15px var(--loto66-glow);
}

.page-tin-tuc__btn-secondary {
  background: #ffffff;
  color: var(--loto66-primary);
  border: 2px solid var(--loto66-primary);
}

.page-tin-tuc__btn-secondary:hover {
  background: var(--loto66-primary);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* FAQ Section */
.page-tin-tuc__faq-section {
  padding: 60px 0;
  background-color: var(--loto66-bg-dark);
}

.page-tin-tuc__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-tin-tuc__faq-item {
  background-color: var(--loto66-card-bg);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-tin-tuc__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1em;
  color: var(--loto66-text-light);
  list-style: none; /* Hide default marker */
  outline: none;
}

.page-tin-tuc__faq-item summary::-webkit-details-marker, 
.page-tin-tuc__faq-item summary::marker {
  display: none;
}

.page-tin-tuc__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-tin-tuc__faq-qtext {
  flex-grow: 1;
  color: var(--loto66-text-light);
}

.page-tin-tuc__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--loto66-primary);
  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 25px 20px;
  color: #aaa;
  font-size: 0.95em;
}

.page-tin-tuc__faq-answer p {
  margin-bottom: 0;
  color: #aaa;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tin-tuc__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* Fixed Header Spacing (relying on shared.css for body padding) */
  .page-tin-tuc__hero-title-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

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

  .page-tin-tuc__subtitle {
    font-size: 1em;
    padding: 0 10px;
  }

  /* Latest News Section */
  .page-tin-tuc__latest-news-section {
    padding: 40px 0;
  }

  .page-tin-tuc__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    margin-bottom: 15px;
  }

  .page-tin-tuc__section-description {
    margin-bottom: 30px;
    padding: 0 10px;
  }

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

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

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

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

  .page-tin-tuc__button-container {
    margin-top: 30px;
    padding: 0 15px;
  }

  /* CTA Section */
  .page-tin-tuc__cta-section {
    padding: 40px 0;
  }

  .page-tin-tuc__cta-title {
    font-size: clamp(1.6em, 6.5vw, 2.2em);
    margin-bottom: 15px;
    padding: 0 10px;
  }

  .page-tin-tuc__cta-description {
    font-size: 1em;
    margin-bottom: 25px;
    padding: 0 10px;
  }

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

  .page-tin-tuc__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  /* FAQ Section */
  .page-tin-tuc__faq-section {
    padding: 40px 0;
  }

  .page-tin-tuc__faq-list {
    margin-top: 30px;
    padding: 0 15px;
  }

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

  .page-tin-tuc__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.9em;
  }

  /* General image and container responsiveness */
  .page-tin-tuc img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-tin-tuc__container,
  .page-tin-tuc__news-grid,
  .page-tin-tuc__news-card,
  .page-tin-tuc__cta-content,
  .page-tin-tuc__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}