/* style/slot-games.css */
:root {
  --primary-color: #FFD700; /* Vàng kim */
  --secondary-color: #1A1A1A; /* Đen sâu */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark-section: #1A1A1A; /* Nền tối cho các section */
  --bg-light-section: #f8f8f8; /* Nền sáng cho các section */
  --border-color: #333333;
}

.page-slot-games {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Mặc định chữ sáng vì body là nền tối */
  background-color: var(--bg-dark); /* Kế thừa từ shared.css, thường là nền tối */
}

.page-slot-games .text-primary {
  color: var(--primary-color);
}

/* 🚨 Desktop video section styles (must be strictly adhered to) */
.page-slot-games__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  /* 🚨 Must add desktop padding-top, ensure content is not obscured by fixed navigation bar */
  padding-top: 10px; /* Desktop: Adjust based on actual navigation bar height */
  background: var(--bg-dark-section);
}

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

/* 🚨 Video click link style (must be strictly adhered to) */
.page-slot-games__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-slot-games__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-slot-games__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio - 🚨 PageSpeed optimization: fixed aspect ratio to avoid layout shift (CLS) */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-slot-games__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* Prevent video controls from blocking click events */
}

/* 🚨 Video click hint overlay style (optional, enhances user experience) */
.page-slot-games__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-slot-games__video-link:hover .page-slot-games__video-overlay {
  opacity: 1;
}

.page-slot-games__video-click-hint {
  color: var(--text-light);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: rgba(255, 215, 0, 0.8); /* Sử dụng màu vàng kim */
  border-radius: 5px;
  white-space: nowrap;
}

/* 🚨 Play Now button style (must be strictly adhered to, centered below video) */
.page-slot-games__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-slot-games__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color); /* Vàng kim */
  color: var(--secondary-color); /* Đen sâu */
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-slot-games__play-now-button:hover {
  background: #e6c200; /* Vàng kim đậm hơn */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

.page-slot-games__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.page-slot-games__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px; /* Adjust padding-top to avoid header overlap */
  box-sizing: border-box;
}

/* Title Section */
.page-slot-games__title-section {
  text-align: center;
  padding-top: 60px; /* Ensure content is below fixed header */
  background-color: var(--bg-dark-section);
}

.page-slot-games__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.2;
}

.page-slot-games__title-description {
  font-size: 18px;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.page-slot-games__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-slot-games__cta-button {
  display: inline-block;
  padding: 15px 35px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  white-space: nowrap;
  word-wrap: break-word;
  box-sizing: border-box;
}

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

.page-slot-games__btn-primary:hover {
  background: #e6c200;
  color: var(--secondary-color);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  transform: translateY(-2px);
}

.page-slot-games__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-slot-games__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  transform: translateY(-2px);
}

/* Features Section */
.page-slot-games__features-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--bg-dark-section);
  text-align: center;
}

.page-slot-games__section-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 50px;
  color: var(--primary-color);
  text-align: center;
}

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

.page-slot-games__feature-item {
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  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;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
}

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

.page-slot-games__feature-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-slot-games__feature-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-slot-games__feature-description {
  font-size: 16px;
  line-height: 1.7;
  color: #ccc;
}

/* Guide Section */
.page-slot-games__guide-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--bg-light-section);
  color: var(--text-dark);
}

.page-slot-games__guide-section .page-slot-games__section-title {
  color: var(--secondary-color);
}

.page-slot-games__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.page-slot-games__step-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-slot-games__step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--secondary-color);
  font-size: 32px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-slot-games__step-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-slot-games__step-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-slot-games__step-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  margin-top: auto; /* Push image to bottom if content above varies */
  object-fit: cover;
}

.page-slot-games__guide-cta {
  text-align: center;
  margin-top: 60px;
}

/* FAQ Section */
.page-slot-games__faq-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--bg-dark-section);
  color: var(--text-light);
}

.page-slot-games__faq-section .page-slot-games__section-title {
  color: var(--primary-color);
}

.page-slot-games__faq-list {
  margin-top: 40px;
}

/* FAQ container style */
.page-slot-games__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* FAQ default state - answer hidden */
.page-slot-games__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height to ensure it expands */
.page-slot-games__faq-item.active .page-slot-games__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to accommodate any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08); /* Slightly lighter background for expanded answer */
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}

/* Question style */
.page-slot-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for question background */
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-slot-games__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
}

.page-slot-games__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Question title style */
.page-slot-games__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
  color: var(--text-light);
}

/* Toggle icon */
.page-slot-games__faq-toggle {
  font-size: 24px;
  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; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-slot-games__faq-item.active .page-slot-games__faq-toggle {
  color: var(--text-light);
  transform: rotate(45deg); /* Change to X or rotate for active state */
}

/* Brand Section */
.page-slot-games__brand-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--bg-light-section);
  color: var(--text-dark);
}

.page-slot-games__brand-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 50px;
  color: var(--secondary-color);
  text-align: center;
}

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

.page-slot-games__brand-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-slot-games__brand-subtitle {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-slot-games__brand-item p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Blog Section */
.page-slot-games__blog-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--bg-dark-section);
  color: var(--text-light);
}

.page-slot-games__blog-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 50px;
  color: var(--primary-color);
  text-align: center;
}

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

.page-slot-games__blog-item {
  background: rgba(255, 255, 255, 0.05);
  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;
}

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

.page-slot-games__blog-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px;
}

.page-slot-games__blog-item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-slot-games__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-slot-games__blog-item-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 15px;
}

.page-slot-games__blog-item-date {
  font-size: 14px;
  color: #888;
}

/* 🚨 Mobile responsive design (must be strictly adhered to) */
@media (max-width: 768px) {
  .page-slot-games {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-slot-games__video-section {
    /* 🚨 Mobile must reset padding-top, overriding desktop style */
    padding-top: 10px !important; /* Mobile: Adjust based on actual mobile navigation bar height */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
    /* 🚨 Mobile must ensure no overflow */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-slot-games__video-container {
    /* 🚨 Mobile must ensure no overflow */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  
  /* 🚨 Video link mobile adaptation (must be strictly adhered to) */
  .page-slot-games__video-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-slot-games__video-wrapper {
    /* 🚨 Mobile must ensure no overflow */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    overflow: hidden !important;
  }
  
  .page-slot-games__video {
    /* 🚨 Mobile must ensure video does not overflow container */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    object-fit: contain; /* Use contain on mobile to ensure video is fully displayed without overflow */
  }
  
  /* 🚨 Play Now button mobile responsive adaptation (must be strictly adhered to, centered below video) */
  .page-slot-games__video-cta {
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-slot-games__play-now-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  /* 🚨 Video click hint overlay mobile adaptation */
  .page-slot-games__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

  .page-slot-games__main-title {
    font-size: 32px;
  }

  .page-slot-games__title-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-slot-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-slot-games__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-slot-games__section-title,
  .page-slot-games__brand-title,
  .page-slot-games__blog-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-slot-games__content-area {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-slot-games__feature-item,
  .page-slot-games__step-item,
  .page-slot-games__brand-item,
  .page-slot-games__blog-item {
    padding: 20px;
    border-radius: 8px;
  }

  .page-slot-games__feature-icon {
    width: 80px;
    height: 80px;
  }

  .page-slot-games__feature-title {
    font-size: 20px;
  }

  .page-slot-games__step-number {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .page-slot-games__step-title {
    font-size: 20px;
  }

  .page-slot-games__guide-cta {
    margin-top: 40px;
  }

  /* FAQ mobile adaptation */
  .page-slot-games__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-slot-games__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-slot-games__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-slot-games__faq-answer {
    padding: 0 15px;
  }
  
  .page-slot-games__faq-item.active .page-slot-games__faq-answer {
    padding: 15px !important;
  }

  .page-slot-games__brand-subtitle {
    font-size: 20px;
  }

  .page-slot-games__blog-item-image {
    height: 150px;
  }

  .page-slot-games__blog-item-title {
    font-size: 18px;
  }

  .page-slot-games__blog-item-excerpt {
    font-size: 14px;
  }

  .page-slot-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-slot-games__section,
  .page-slot-games__card,
  .page-slot-games__container,
  .page-slot-games__video-section,
  .page-slot-games__video-container,
  .page-slot-games__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}