/* style/news.css */

/* Biến màu sắc */
:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #121212;
  --background-light: #f1f3f5;
  --card-background: #ffffff;
  --border-color: #e0e0e0;
}

/* Đảm bảo padding-top cho nội dung chính do header fixed */
.page-news {
  padding-top: 0; /* Đặt lại mặc định, sau đó các section sẽ tự điều chỉnh */
  color: var(--text-light); /* Body là nền tối, nên văn bản mặc định là sáng */
}

/* HERO Banner Section - Không phải là hero chính của trang chủ, chỉ là banner cho trang tin tức */
.page-news__hero-banner-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 180px; /* Desktop: Đảm bảo nội dung không bị che bởi fixed header */
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-news__hero-banner-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__hero-banner-image {
  width: 100%;
  height: auto;
  max-height: 450px; /* Chiều cao tối đa cho banner */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
}

.page-news__hero-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-news__hero-banner-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-news__hero-banner-description {
  font-size: 18px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

/* General Section Styles */
.page-news__introduction-section,
.page-news__game-service-updates-section,
.page-news__promotions-section,
.page-news__latest-blog-section,
.page-news__faq-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-news__light-bg {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-news__introduction-container,
.page-news__game-service-updates-container,
.page-news__promotions-container,
.page-news__latest-blog-container,
.page-news__faq-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-news__introduction-card,
.page-news__game-service-card,
.page-news__promotion-card,
.page-news__blog-card {
  background: rgba(255, 255, 255, 0.05); /* Nền tối, dùng màu sáng mờ */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 30px;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-news__introduction-title,
.page-news__game-service-updates-title,
.page-news__promotions-title,
.page-news__latest-blog-title,
.page-news__faq-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 40px;
}

.page-news__introduction-text,
.page-news__game-service-updates-description,
.page-news__promotions-description,
.page-news__latest-blog-description {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #f0f0f0;
  text-align: center;
}

.page-news__introduction-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 30px 0;
  object-fit: cover;
}

/* CTA Button Styles */
.page-news__cta-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

/* Game Service Updates Grid */
.page-news__game-service-updates-grid,
.page-news__promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-news__game-service-card-title,
.page-news__promotion-card-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-light);
  margin-top: 15px;
  margin-bottom: 10px;
  text-align: center;
}

.page-news__game-service-card-text,
.page-news__promotion-card-text {
  font-size: 16px;
  line-height: 1.6;
  color: #f0f0f0;
  text-align: center;
}

.page-news__game-service-image,
.page-news__promotion-image {
  width: 100%;
  height: 220px; /* Kích thước cố định cho hình ảnh thẻ */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

.page-news__game-service-card .page-news__cta-button,
.page-news__promotion-card .page-news__cta-button {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Latest Blog Section */
.page-news__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-news__blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.page-news__blog-card:hover {
  transform: translateY(-5px);
}

.page-news__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-news__blog-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__blog-card-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__blog-card-title a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__blog-card-title a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-news__blog-card-excerpt {
  font-size: 15px;
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__blog-date {
  font-size: 14px;
  color: #aaaaaa;
  text-align: right;
  margin-top: auto;
}

.page-news__view-all-button-wrapper {
  text-align: center;
  margin-top: 40px;
}

/* FAQ Section */
.page-news__faq-title {
  margin-bottom: 40px;
}

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.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 25px;
  opacity: 0;
  color: #cccccc;
  font-size: 16px;
  line-height: 1.7;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.page-news__faq-question:active {
  background: rgba(255, 255, 255, 0.15);
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-light);
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-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: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Thay đổi dấu + thành X hoặc - */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-banner-title {
    font-size: 36px;
  }
  .page-news__hero-banner-description {
    font-size: 16px;
  }
  .page-news__introduction-title,
  .page-news__game-service-updates-title,
  .page-news__promotions-title,
  .page-news__latest-blog-title,
  .page-news__faq-title {
    font-size: 30px;
  }
  .page-news__game-service-updates-grid,
  .page-news__promotions-grid,
  .page-news__blog-grid {
    gap: 20px;
  }
  .page-news__game-service-card-title,
  .page-news__promotion-card-title {
    font-size: 20px;
  }
  .page-news__blog-card-title {
    font-size: 18px;
  }
  .page-news__faq-question h3 {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-banner-section {
    padding-top: 140px !important; /* Mobile: Đảm bảo nội dung không bị che bởi fixed header */
    padding-bottom: 40px;
  }
  .page-news__hero-banner-image {
    max-height: 300px;
  }
  .page-news__hero-banner-title {
    font-size: 28px;
  }
  .page-news__hero-banner-description {
    font-size: 15px;
  }
  .page-news__introduction-section,
  .page-news__game-service-updates-section,
  .page-news__promotions-section,
  .page-news__latest-blog-section,
  .page-news__faq-section {
    padding: 40px 15px;
  }
  .page-news__introduction-title,
  .page-news__game-service-updates-title,
  .page-news__promotions-title,
  .page-news__latest-blog-title,
  .page-news__faq-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-news__introduction-text,
  .page-news__game-service-updates-description,
  .page-news__promotions-description,
  .page-news__latest-blog-description {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-news__game-service-updates-grid,
  .page-news__promotions-grid,
  .page-news__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__game-service-card,
  .page-news__promotion-card,
  .page-news__blog-card {
    padding: 20px;
  }
  .page-news__game-service-card-title,
  .page-news__promotion-card-title {
    font-size: 18px;
  }
  .page-news__game-service-card-text,
  .page-news__promotion-card-text {
    font-size: 14px;
  }
  .page-news__blog-image {
    height: 180px;
  }
  .page-news__blog-content {
    padding: 20px;
  }
  .page-news__blog-card-title {
    font-size: 16px;
  }
  .page-news__blog-card-excerpt {
    font-size: 14px;
  }
  .page-news__blog-date {
    font-size: 13px;
  }
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question h3 {
    font-size: 15px;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-news__faq-answer {
    padding: 0 20px;
    font-size: 15px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }

  /* Responsive image adjustments */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__hero-banner-section,
  .page-news__introduction-section,
  .page-news__game-service-updates-section,
  .page-news__promotions-section,
  .page-news__latest-blog-section,
  .page-news__faq-section,
  .page-news__introduction-container,
  .page-news__game-service-updates-container,
  .page-news__promotions-container,
  .page-news__latest-blog-container,
  .page-news__faq-container,
  .page-news__introduction-card,
  .page-news__game-service-card,
  .page-news__promotion-card,
  .page-news__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}