/* style/news.css */
:root {
  --primary-color: #0A2342;
  --secondary-color: #FFD700;
  --accent-color: #DC143C;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a;
  --bg-light: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.1);
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Dark body background, so light text */
  background-color: var(--bg-dark); /* Inherited from shared.css, explicitly setting for context */
  padding-top: 120px; /* Adjust for fixed header */
}

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

/* Hero Section */
.page-news__hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(10, 35, 66, 0.8) 100%), url('[GALLERY:blog:x88博彩,tin-tuc,nen-hero,1920x1080]') no-repeat center center/cover;
  padding: 80px 0;
  text-align: center;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0;
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button--primary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--secondary-color);
}

.page-news__cta-button--primary:hover {
  background: #e6c200;
  border-color: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--secondary {
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-news__cta-button--secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  text-align: center;
  margin-top: 60px;
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.page-news__section-subtitle {
  font-size: 1.1em;
  color: #ccc;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* News List Section */
.page-news__news-list-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

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

.page-news__article-card {
  background: var(--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;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.page-news__article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__article-content {
  padding: 20px;
}

.page-news__article-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-title:hover {
  text-decoration: underline;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  color: #ccc;
  margin-bottom: 15px;
  min-height: 75px; /* Ensure consistent card height */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-news__article-date {
  font-size: 0.85em;
  color: #888;
  display: block;
  text-align: right;
}

.page-news__pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-news__pagination-link:hover,
.page-news__pagination-link--active {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--primary-color);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--primary-color);
  color: var(--secondary-color);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__faq-question:hover {
  background: rgba(10, 35, 66, 0.8);
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
}

.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.2);
  color: #e0e0e0;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

/* Brand Section */
.page-news__brand-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

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

.page-news__brand-item {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__brand-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__brand-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-news__brand-item-title {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.page-news__brand-item-description {
  font-size: 1em;
  color: #ccc;
}

/* CTA Bottom Section */
.page-news__cta-bottom-section {
  background: linear-gradient(90deg, var(--primary-color) 0%, #0A2342 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--text-light);
  border-radius: 15px 15px 0 0;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.3);
  margin-top: 60px;
}

.page-news__cta-bottom-title {
  font-size: 2.8em;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__cta-bottom-description {
  font-size: 1.2em;
  color: #e0e0e0;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 2.8em;
  }

  .page-news__section-title {
    font-size: 2.2em;
  }

  .page-news__cta-bottom-title {
    font-size: 2.4em;
  }

  .page-news__article-title {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: 100px !important; /* Mobile fixed header adjustment */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__hero-section {
    padding: 60px 0;
    border-radius: 0 0 10px 10px;
  }

  .page-news__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-news__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important; /* Ensure buttons are full width */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: 2em;
    margin-top: 40px;
    margin-bottom: 15px;
  }

  .page-news__section-subtitle {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-news__news-list-section {
    padding: 40px 0;
  }

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

  .page-news__article-image {
    height: 180px;
  }

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

  .page-news__article-excerpt {
    font-size: 0.9em;
    min-height: auto;
  }

  .page-news__pagination {
    margin-top: 40px;
  }

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

  .page-news__faq-question {
    padding: 15px;
  }

  .page-news__faq-question h3 {
    font-size: 1em;
  }

  .page-news__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }

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

  .page-news__brand-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__brand-item {
    padding: 25px;
  }

  .page-news__brand-item-title {
    font-size: 1.5em;
  }

  .page-news__brand-image {
    height: 150px;
  }

  .page-news__cta-bottom-section {
    padding: 60px 0;
    border-radius: 10px 10px 0 0;
    margin-top: 40px;
  }

  .page-news__cta-bottom-title {
    font-size: 2em;
  }

  .page-news__cta-bottom-description {
    font-size: 1em;
  }
  
  /* Ensure all images are responsive */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* Ensure all containers with images/content are responsive */
  .page-news__hero-section,
  .page-news__news-list-section,
  .page-news__faq-section,
  .page-news__brand-section,
  .page-news__cta-bottom-section,
  .page-news__article-card,
  .page-news__brand-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Specific container padding for mobile */
  .page-news__hero-container,
  .page-news__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__cta-bottom-title {
    font-size: 1.8em;
  }
  .page-news__cta-buttons {
    gap: 10px;
  }
  .page-news__pagination-link {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }
}