/* style/news.css */

/* Biến CSS */
:root {
  --rr88-gold: #FFD700;
  --rr88-red: #8B0000;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #1a1a1a;
  --bg-light: #f0f0f0;
  --card-bg-dark-rgba: rgba(255, 255, 255, 0.1);
  --card-bg-light: #ffffff;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Body background is dark, so text is light */
  background-color: var(--bg-dark);
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: var(--rr88-gold);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 600px;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.page-news__hero-title {
  font-size: 3.5em;
  color: var(--rr88-gold);
  margin-bottom: 20px;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-news__hero-description {
  font-size: 1.3em;
  color: var(--text-light);
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Buttons */
.page-news__btn-primary {
  display: inline-block;
  background-color: var(--rr88-gold);
  color: var(--bg-dark);
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-news__btn-primary:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

.page-news__btn-centered {
  display: block;
  margin: 40px auto 0 auto;
  text-align: center;
}

/* General Section Styles */
.page-news__featured-news, .page-news__casino-game-news, .page-news__guides-manuals, .page-news__faq-section {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 60px 0;
}

.page-news__sports-updates, .page-news__promotions-offers, .page-news__video-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 60px 0;
}

.page-news__featured-news .page-news__section-description, .page-news__casino-game-news .page-news__section-description, .page-news__guides-manuals .page-news__section-description, .page-news__faq-section .page-news__section-description {
  color: var(--text-dark);
}

/* Cards Grid */
.page-news__cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__card {
  background-color: var(--card-bg-light);
  color: var(--text-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-news__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

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

.page-news__card-title {
  font-size: 1.5em;
  color: var(--rr88-red);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__card-title a {
  color: var(--rr88-red);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: var(--rr88-gold);
}

.page-news__card-text {
  font-size: 1em;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__card-link {
  display: inline-block;
  color: var(--rr88-gold);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__card-link:hover {
  color: var(--rr88-red);
}

/* Article Preview Grid */
.page-news__content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__article-preview {
  background-color: var(--card-bg-dark-rgba);
  color: var(--text-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-news__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 1.4em;
  color: var(--rr88-gold);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__article-title a {
  color: var(--rr88-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: var(--text-light);
}

.page-news__article-text {
  font-size: 0.95em;
  color: #ccc;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__article-link {
  display: inline-block;
  color: var(--rr88-gold);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__article-link:hover {
  color: var(--rr88-red);
}

/* Video Section */
.page-news__video-section .page-news__section-description {
  color: var(--text-light);
}

.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 10px;
  margin: 40px auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  cursor: pointer;
}

/* FAQ Section */
.page-news__faq-section .page-news__section-title {
  color: var(--rr88-red);
}

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

.page-news__faq-item {
  background-color: var(--card-bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--rr88-red);
  cursor: pointer;
  background-color: #fcfcfc;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #f5f5f5;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  transition: transform 0.3s ease;
  color: var(--rr88-gold);
}

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

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  color: var(--text-dark);
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large */
  padding: 15px 25px 25px 25px;
}

.page-news__faq-answer p {
  margin: 0;
  color: var(--text-dark);
}

.page-news__faq-answer a {
  color: var(--rr88-red);
  text-decoration: none;
  font-weight: bold;
}

.page-news__faq-answer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__hero-description {
    font-size: 1.15em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__hero-section {
    min-height: 450px;
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure space below fixed header */
  }
  .page-news__hero-title {
    font-size: 2.5em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__btn-primary {
    padding: 12px 25px;
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-news__cards-grid, .page-news__content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__card-image, .page-news__article-image {
    height: 200px;
  }
  .page-news__card-title, .page-news__article-title {
    font-size: 1.3em;
  }
  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-news__faq-answer {
    padding: 0 20px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px 20px 20px;
  }

  /* Mobile image, video, and button responsiveness */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__video-wrapper,
  .page-news__btn-primary,
  .page-news__cta-button,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news video, .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-section .page-news__container {
    padding-left: 0;
    padding-right: 0;
  }

  .page-news__video-wrapper {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }

  .page-news__btn-primary, .page-news a[class*="button"], .page-news 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-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}