/* style/casino.css */
.page-casino {
  color: #ffffff; /* Sẽ được điều chỉnh dựa trên độ sáng của body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background được quản lý bởi shared.css */
}

/* Căn chỉnh cho nội dung đầu tiên để tránh bị che bởi header cố định */
.page-casino__hero-section {
  padding-top: 80px; /* Điều chỉnh nếu header cao hơn */
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

.page-casino__hero-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.page-casino__hero-image {
  width: 100%;
  margin: 0;
}

.page-casino__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

.page-casino__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #1a1a1a; /* Màu nền tối cho phần sản phẩm */
}

.page-casino__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Trước 4 cái chiếm 4 cột, sau 2 cái chiếm 2 cột */
  gap: 20px;
}

.page-casino__products-grid {
  display: grid;
  gap: 20px;
}

.page-casino__products-grid--small {
  grid-template-columns: repeat(4, 1fr);
}

.page-casino__products-grid--large {
  grid-template-columns: repeat(2, 1fr);
}

.page-casino__product-card {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a2a; /* Nền tối hơn cho card sản phẩm */
  border: 3px solid #ffd700; /* Viền vàng kim */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 1 / 1; /* Đảm bảo hình vuông trên desktop */
}

.page-casino__product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.page-casino__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.page-casino__product-card-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page-casino__product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-casino__dark-section {
  background: #003366; /* Màu chủ đạo đậm */
  color: #ffffff;
  padding: 80px 0;
}

.page-casino__introduction-section {
  padding-top: 120px; /* Điều chỉnh để tránh bị che bởi header cố định */
  background: #003366;
  color: #ffffff;
  padding-bottom: 80px;
}

.page-casino__main-title {
  font-size: 3.2em;
  color: #FFA500; /* Màu cam nổi bật */
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.2;
}

.page-casino__section-title {
  font-size: 2.5em;
  color: #FFA500; /* Màu cam nổi bật */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-casino__text-block {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 20px auto;
}

.page-casino__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-casino__btn-primary,
.page-casino__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1.1em;
  text-align: center;
}

.page-casino__btn-primary {
  background: #FFA500;
  color: #003366;
  border: 2px solid #FFA500;
}

.page-casino__btn-primary:hover {
  background: #ff8c00;
  border-color: #ff8c00;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-casino__btn-secondary {
  background: transparent;
  color: #FFA500;
  border: 2px solid #FFA500;
}

.page-casino__btn-secondary:hover {
  background: #FFA500;
  color: #003366;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-casino__quick-access-section {
  background: #121212;
  color: #ffffff;
  padding: 80px 0;
}

.page-casino__links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.page-casino__link-card {
  background: #2a2a2a;
  border-radius: 10px;
  padding: 30px;
  text-decoration: none;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #3a3a3a;
}

.page-casino__link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  border-color: #FFA500;
}

.page-casino__link-card h3 {
  font-size: 1.6em;
  color: #FFA500;
  margin-bottom: 10px;
}

.page-casino__link-card p {
  font-size: 1em;
  color: #f0f0f0;
  line-height: 1.5;
}

.page-casino__top-games-section {
  padding: 80px 0;
  background: #003366;
  color: #ffffff;
}

.page-casino__game-category {
  margin-bottom: 60px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05); /* Nền hơi trong suốt */
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-casino__game-title {
  font-size: 2em;
  color: #FFA500;
  margin-bottom: 20px;
  text-align: center;
}

.page-casino__game-content {
  display: flex;
  align-items: center;
  gap: 30px;
}

.page-casino__game-content p {
  flex: 1;
  font-size: 1.05em;
  line-height: 1.7;
  text-align: left;
}

.page-casino__game-image {
  width: 350px;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 2px solid #FFA500;
}

.page-casino__btn-small {
  display: inline-block;
  padding: 10px 20px;
  background: #FFA500;
  color: #003366;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
  transition: background 0.3s ease;
}

.page-casino__btn-small:hover {
  background: #ff8c00;
}

.page-casino__offers-section {
  padding: 80px 0;
  background: #121212;
  color: #ffffff;
}

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

.page-casino__offer-card {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #3a3a3a;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.page-casino__offer-card:hover {
  transform: translateY(-8px);
  border-color: #FFA500;
}

.page-casino__offer-image {
  width: 100%;
  max-width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid #FFA500;
}

.page-casino__offer-title {
  font-size: 1.8em;
  color: #FFA500;
  margin-bottom: 15px;
}

.page-casino__offer-description {
  font-size: 1em;
  color: #f0f0f0;
  line-height: 1.6;
  margin-bottom: 25px;
}

.page-casino__btn-offer {
  display: inline-block;
  padding: 12px 25px;
  background: #003366;
  color: #ffffff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
}

.page-casino__btn-offer:hover {
  background: #FFA500;
  color: #003366;
  transform: translateY(-2px);
}

.page-casino__security-support-section {
  padding: 80px 0;
  background: #003366;
  color: #ffffff;
}

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

.page-casino__feature-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-casino__feature-title {
  font-size: 1.5em;
  color: #FFA500;
  margin-bottom: 15px;
}

.page-casino__feature-item p {
  font-size: 0.95em;
  line-height: 1.6;
}

.page-casino__faq-section {
  padding: 80px 0;
  background: #121212;
  color: #ffffff;
}

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

.page-casino__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-casino__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;
}

.page-casino__faq-item.active .page-casino__faq-answer {
  max-height: 2000px !important; /* Sử dụng !important và giá trị đủ lớn */
  padding: 20px 15px !important;
  opacity: 1;
  background: #2a2a2a; /* Nền tối cho câu trả lời */
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}

.page-casino__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #003366; /* Nền màu chủ đạo cho câu hỏi */
  border: 1px solid #004488;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-casino__faq-question:hover {
  background: #004080;
  border-color: #0055aa;
}

.page-casino__faq-question:active {
  background: #002244;
}

.page-casino__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: #ffffff;
}

.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFA500;
  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-casino__faq-item.active .page-casino__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Để biểu tượng '+' xoay thành 'x' hoặc '-' */
}

.page-casino__latest-news-section {
  padding: 80px 0;
  background: #003366;
  color: #ffffff;
}

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

.page-casino__news-card {
  background: #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #3a3a3a;
}

.page-casino__news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  border-color: #FFA500;
}

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

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

.page-casino__news-content {
  padding: 25px;
}

.page-casino__news-title {
  font-size: 1.4em;
  color: #FFA500;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-casino__news-excerpt {
  font-size: 0.95em;
  color: #f0f0f0;
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-casino__news-date {
  font-size: 0.85em;
  color: #aaaaaa;
}

.page-casino__view-all-button {
  text-align: center;
  margin-top: 50px;
}

/* Responsive design */
@media (max-width: 1024px) {
  .page-casino__products-container {
    grid-template-columns: 1fr; /* Mobile: two grids vertically */
  }
  
  .page-casino__products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-casino__main-title {
    font-size: 2.5em;
  }

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

  .page-casino__game-content {
    flex-direction: column;
    text-align: center;
  }

  .page-casino__game-image {
    width: 100%;
    max-width: 400px;
    height: auto;
  }

  .page-casino__game-content p {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-casino__hero-section {
    padding-top: 100px; /* Adjust for mobile header */
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  .page-casino__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-casino__products-section,
  .page-casino__introduction-section,
  .page-casino__quick-access-section,
  .page-casino__top-games-section,
  .page-casino__offers-section,
  .page-casino__security-support-section,
  .page-casino__faq-section,
  .page-casino__latest-news-section {
    padding: 40px 0;
  }

  .page-casino__container {
    padding: 20px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-casino__main-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-casino__section-title {
    font-size: 1.5em;
    margin-bottom: 30px;
  }

  .page-casino__text-block {
    font-size: 0.95em;
  }

  .page-casino__cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-casino__btn-primary,
  .page-casino__btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
  }
  
  .page-casino__products-container {
    grid-template-columns: 1fr; /* Mobile: two grids vertically */
    gap: 15px;
  }
  
  /* 🚨 Trước 4 hình - bố cục 4 ô vuông (2x2) */
  .page-casino__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .page-casino__products-grid--small .page-casino__product-card {
    aspect-ratio: 1 / 1; /* Hình vuông */
  }
  
  .page-casino__products-grid--small .page-casino__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Hình vuông */
  }
  
  /* 🚨 Sau 2 hình lớn - mỗi hình một hàng, hình vuông */
  .page-casino__products-grid--large {
    grid-template-columns: 1fr; /* Mỗi card một hàng riêng */
    gap: 15px;
  }
  
  .page-casino__products-grid--large .page-casino__product-card {
    aspect-ratio: 1 / 1; /* Hình vuông */
  }
  
  .page-casino__products-grid--large .page-casino__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Hình vuông */
  }

  .page-casino__link-card {
    padding: 20px;
  }

  .page-casino__link-card h3 {
    font-size: 1.3em;
  }

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

  .page-casino__game-image {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .page-casino__offer-grid {
    grid-template-columns: 1fr;
  }

  .page-casino__offer-card {
    padding: 20px;
  }

  .page-casino__offer-title {
    font-size: 1.4em;
  }

  .page-casino__security-features {
    grid-template-columns: 1fr;
  }

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

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

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

  .page-casino__news-grid {
    grid-template-columns: 1fr;
  }

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

  /* Tất cả hình ảnh phải thích ứng với màn hình di động */
  .page-casino img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-casino__section,
  .page-casino__card,
  .page-casino__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}