/* style/cockfighting.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --dark-text-color: #333333;
  --light-text-color: #ffffff;
  --border-color: #e0e0e0;
  --bg-light: #f9f9f9;
}

.page-cockfighting {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-text-color); /* Default text color for light backgrounds */
  line-height: 1.7;
  background-color: var(--secondary-color); /* Matches body background */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.page-cockfighting__center-text {
  text-align: center;
}

.page-cockfighting__section-title {
  font-size: 38px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 45px;
  position: relative;
  padding-bottom: 15px;
  font-weight: 700;
}

.page-cockfighting__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 90px;
  height: 5px;
  background-color: var(--login-color);
  border-radius: 3px;
}

.page-cockfighting__text-block {
  font-size: 18px;
  margin-bottom: 25px;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-cockfighting__light-bg {
  background-color: var(--secondary-color);
  color: var(--dark-text-color);
  padding: 80px 0;
}

.page-cockfighting__dark-bg {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  padding: 80px 0;
}

.page-cockfighting__dark-bg .page-cockfighting__section-title {
  color: var(--light-text-color);
}

.page-cockfighting__dark-bg .page-cockfighting__section-title::after {
  background-color: var(--light-text-color);
}

.page-cockfighting__dark-bg .page-cockfighting__text-block {
  color: rgba(255, 255, 255, 0.9);
}

/* Hero Section */
.page-cockfighting__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background: linear-gradient(135deg, var(--primary-color) 0%, #4facfe 100%);
  overflow: hidden;
}

.page-cockfighting__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any background effects */
}

.page-cockfighting__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-cockfighting__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.page-cockfighting__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--light-text-color);
}

.page-cockfighting__hero-title {
  font-size: 52px;
  margin-bottom: 20px;
  font-weight: bold;
  color: var(--light-text-color);
  text-shadow: 2px 2px 10px rgba(0,0,0,0.4);
}

.page-cockfighting__hero-description {
  font-size: 22px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--light-text-color);
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.page-cockfighting__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-cockfighting__cta-button {
  display: inline-block;
  padding: 16px 45px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 19px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 220px;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
}

.page-cockfighting__cta-button--primary {
  background: var(--login-color); /* Login color for primary action */
  color: var(--light-text-color);
  border: 2px solid var(--login-color);
}

.page-cockfighting__cta-button--primary:hover {
  background: #d46c06;
  border-color: #d46c06;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

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

.page-cockfighting__cta-button--secondary:hover {
  background: var(--light-text-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* About Section / Features Grid */
.page-cockfighting__about-section {
  padding: 80px 0;
}

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

.page-cockfighting__feature-item {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 35px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-cockfighting__feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.page-cockfighting__feature-item img {
  width: 100%;
  max-width: 400px;
  height: 250px; /* Consistent height for feature images */
  border-radius: 8px;
  margin-bottom: 25px;
  object-fit: cover;
}

.page-cockfighting__feature-title {
  font-size: 26px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

/* How to Play Section */
.page-cockfighting__how-to-play-section {
  padding: 80px 0;
}

.page-cockfighting__step-by-step-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-cockfighting__step-item {
  background: var(--light-text-color);
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  text-align: center;
  border: 1px solid var(--border-color);
  color: var(--dark-text-color);
}

.page-cockfighting__dark-bg .page-cockfighting__step-item {
  background: rgba(255, 255, 255, 0.15);
  color: var(--light-text-color);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.page-cockfighting__dark-bg .page-cockfighting__step-item .page-cockfighting__step-title {
  color: var(--light-text-color);
}

.page-cockfighting__dark-bg .page-cockfighting__step-item p {
  color: rgba(255, 255, 255, 0.85);
}

.page-cockfighting__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 65px;
  height: 65px;
  background-color: var(--login-color);
  color: var(--light-text-color);
  border-radius: 50%;
  font-size: 34px;
  font-weight: bold;
  margin-bottom: 25px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

.page-cockfighting__step-title {
  font-size: 26px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-cockfighting__dark-bg .page-cockfighting__link-button {
  color: var(--light-text-color);
  border-color: var(--light-text-color);
}
.page-cockfighting__dark-bg .page-cockfighting__link-button:hover {
  background-color: var(--light-text-color);
  color: var(--primary-color);
}


/* Promotions Section */
.page-cockfighting__promotions-section {
  padding: 80px 0;
}

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

.page-cockfighting__card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-cockfighting__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.page-cockfighting__card img {
  width: 100%;
  height: 220px; /* Fixed height for card images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
}

.page-cockfighting__card-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
  flex-grow: 1; /* Allow title to take available space */
  font-weight: 600;
}

.page-cockfighting__card-link {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--light-text-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
}

.page-cockfighting__card-link:hover {
  background: #1e87b9;
  border-color: #1e87b9;
  transform: translateY(-2px);
}

.page-cockfighting__link-button {
  display: inline-block;
  padding: 12px 30px;
  background: transparent;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
}

.page-cockfighting__link-button:hover {
  background: var(--primary-color);
  color: var(--light-text-color);
  transform: translateY(-2px);
}


/* FAQ Section */
.page-cockfighting__faq-section {
  padding: 80px 0;
}

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

/* FAQ容器样式 */
.page-cockfighting__faq-item {
  margin-bottom: 18px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

/* FAQ默认状态 - 答案隐藏 */
.page-cockfighting__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;
  color: var(--dark-text-color);
  font-size: 17px;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height */
.page-cockfighting__faq-item.active .page-cockfighting__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: var(--bg-light); /* Nền sáng hơn cho câu trả lời */
  border-radius: 0 0 8px 8px;
}

/* Câu hỏi */
.page-cockfighting__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-cockfighting__faq-question:hover {
  background: var(--bg-light);
  border-color: #d0d0d0;
}

.page-cockfighting__faq-question:active {
  background: #eeeeee;
}

/* Tiêu đề câu hỏi */
.page-cockfighting__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
  color: var(--primary-color);
}

/* Biểu tượng chuyển đổi */
.page-cockfighting__faq-toggle {
  font-size: 30px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-cockfighting__faq-item.active .page-cockfighting__faq-toggle {
  color: var(--login-color);
  transform: rotate(45deg); /* Xoay cho dấu trừ */
}


/* Call to Action Section */
.page-cockfighting__call-to-action {
  padding: 80px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-cockfighting__hero-title {
    font-size: 44px;
  }
  .page-cockfighting__hero-description {
    font-size: 20px;
  }
  .page-cockfighting__section-title {
    font-size: 34px;
  }
  .page-cockfighting__text-block {
    font-size: 17px;
  }
  .page-cockfighting__feature-title, .page-cockfighting__step-title {
    font-size: 24px;
  }
  .page-cockfighting__card-title {
    font-size: 22px;
  }
  .page-cockfighting__faq-question h3 {
    font-size: 18px;
  }
  .page-cockfighting__faq-answer {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-cockfighting__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    padding-bottom: 50px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-cockfighting__hero-image img {
    border-radius: 8px;
  }

  .page-cockfighting__hero-title {
    font-size: 34px;
    margin-bottom: 15px;
  }

  .page-cockfighting__hero-description {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .page-cockfighting__hero-cta-group {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-cockfighting__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 25px;
    font-size: 17px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: unset;
  }

  .page-cockfighting__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-cockfighting__section-title {
    font-size: 30px;
    margin-bottom: 35px;
  }

  .page-cockfighting__text-block {
    font-size: 16px;
  }

  .page-cockfighting__about-section,
  .page-cockfighting__how-to-play-section,
  .page-cockfighting__promotions-section,
  .page-cockfighting__faq-section,
  .page-cockfighting__call-to-action {
    padding: 50px 0;
  }

  .page-cockfighting__feature-item,
  .page-cockfighting__step-item,
  .page-cockfighting__card {
    padding: 25px;
  }

  .page-cockfighting__feature-item img {
    height: 200px; /* Adjust height for mobile */
  }

  .page-cockfighting__card img {
     /* Adjust height for mobile */
  }

  .page-cockfighting__feature-title,
  .page-cockfighting__step-title {
    font-size: 22px;
  }
  
  .page-cockfighting__card-title {
    font-size: 20px;
  }

  .page-cockfighting img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* FAQ Mobile Adaptations */
  .page-cockfighting__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-cockfighting__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-cockfighting__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-cockfighting__faq-answer {
    padding: 0 15px;
  }
  
  .page-cockfighting__faq-item.active .page-cockfighting__faq-answer {
    padding: 15px !important;
  }
}