/* Base styles for the cockfighting page */
.page-cockfighting {
  font-family: 'Arial', sans-serif;
  color: #333333;
  background-color: #f8f8f8;
}

/* Ensure body padding-top is handled by shared.css for header offset */
/* .page-cockfighting__hero-section should have minimal top padding */
.page-cockfighting__hero-section {
  position: relative;
  padding-top: 10px; /* Minimal top padding, shared.css handles body padding for header */
  padding-bottom: 50px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #017439, #005f2e);
}

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

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

.page-cockfighting__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
}

.page-cockfighting__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFF00;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-cockfighting__intro-text {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-cockfighting__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* General section styles */
.page-cockfighting__section {
  padding: 60px 0;
  text-align: center;
}

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

.page-cockfighting__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #017439;
}

.page-cockfighting__section-description {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 40px;
  color: #555555;
}

.page-cockfighting__white-text {
  color: #ffffff;
}

.page-cockfighting__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-cockfighting__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-cockfighting__dark-section {
  background: #017439;
  color: #ffffff;
}

.page-cockfighting__center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-cockfighting__center-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Card styles */
.page-cockfighting__feature-card,
.page-cockfighting__type-card,
.page-cockfighting__step-card,
.page-cockfighting__promo-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards in a grid have equal height */
}

.page-cockfighting__feature-card:hover,
.page-cockfighting__type-card:hover,
.page-cockfighting__step-card:hover,
.page-cockfighting__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-cockfighting__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 15px;
  color: #017439;
}

.page-cockfighting__card-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #555555;
  flex-grow: 1;
}

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

.page-cockfighting__feature-icon {
  width: 100%;
  height: auto;
  max-width: 250px;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: cover;
}

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

.page-cockfighting__type-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-cockfighting__type-card .page-cockfighting__card-title {
  color: #017439;
}

/* How-to-play Steps */
.page-cockfighting__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-cockfighting__step-card {
  padding-bottom: 20px;
}

.page-cockfighting__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #017439;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Promotions */
.page-cockfighting__promotions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.page-cockfighting__promo-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 20px;
  background: #ffffff;
}

.page-cockfighting__promo-image {
  width: 40%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  flex-shrink: 0;
}

.page-cockfighting__promo-content {
  flex-grow: 1;
}

.page-cockfighting__promo-content .page-cockfighting__card-title {
  margin-top: 0;
}

/* Tips Section */
.page-cockfighting__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  text-align: left;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-cockfighting__tip-item {
  background: #ffffff;
  padding: 25px;
  border-left: 5px solid #017439;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-cockfighting__tip-item .page-cockfighting__card-title {
  margin-top: 0;
  font-size: 1.25rem;
  color: #017439;
}

.page-cockfighting__tip-item .page-cockfighting__card-text {
  color: #555555;
}

/* Buttons */
.page-cockfighting__btn-primary,
.page-cockfighting__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-cockfighting__btn-primary {
  background-color: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808;
}

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

.page-cockfighting__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #FFFF00;
}

.page-cockfighting__btn-secondary:hover {
  background-color: #FFFF00;
  color: #C30808;
  transform: translateY(-2px);
}

/* FAQ Section */
details.page-cockfighting__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-cockfighting__faq-item summary.page-cockfighting__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-cockfighting__faq-item summary.page-cockfighting__faq-question::-webkit-details-marker {
  display: none;
}
details.page-cockfighting__faq-item summary.page-cockfighting__faq-question:hover {
  background: #f5f5f5;
}
.page-cockfighting__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-cockfighting__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #017439;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-cockfighting__faq-item .page-cockfighting__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  text-align: left;
}

details.page-cockfighting__faq-item .page-cockfighting__faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
  color: #555555;
  line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-cockfighting__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
  }
  .page-cockfighting__section-title {
    font-size: 2rem;
  }
  .page-cockfighting__intro-text,
  .page-cockfighting__section-description {
    font-size: 1rem;
  }
  .page-cockfighting__promotions-grid {
    grid-template-columns: 1fr;
  }
  .page-cockfighting__promo-card {
    flex-direction: column;
    text-align: center;
  }
  .page-cockfighting__promo-image {
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
    height: 250px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-cockfighting__hero-section {
    padding-top: 10px;
    padding-bottom: 30px;
  }
  .page-cockfighting__hero-image img {
    object-fit: contain !important; /* Mobile: prevent cropping */
    aspect-ratio: unset !important;
    height: auto !important;
  }
  .page-cockfighting__hero-content {
    padding: 30px 15px;
  }
  .page-cockfighting__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.3;
  }
  .page-cockfighting__intro-text {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .page-cockfighting__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  /* General content sections */
  .page-cockfighting__section {
    padding: 40px 0;
  }
  .page-cockfighting__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-cockfighting__section-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
  .page-cockfighting__section-description {
    font-size: 0.9rem;
    margin-bottom: 30px;
  }

  /* Product/Feature Grids (General cards) */
  .page-cockfighting__features-grid,
  .page-cockfighting__types-grid,
  .page-cockfighting__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  /* Promotions Grid */
  .page-cockfighting__promotions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }
  .page-cockfighting__promo-card {
    padding: 15px;
  }
  .page-cockfighting__promo-image {
    height: 180px;
    margin-bottom: 15px;
  }
  .page-cockfighting__promo-content .page-cockfighting__card-title {
    font-size: 1.2rem;
  }
  .page-cockfighting__promo-content .page-cockfighting__card-text {
    font-size: 0.9rem;
  }

  /* Tips List */
  .page-cockfighting__tips-list {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
  }
  .page-cockfighting__tip-item {
    padding: 20px;
  }
  .page-cockfighting__tip-item .page-cockfighting__card-title {
    font-size: 1.1rem;
  }
  .page-cockfighting__tip-item .page-cockfighting__card-text {
    font-size: 0.9rem;
  }

  /* Universal Image rules for mobile */
  .page-cockfighting img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Buttons responsive */
  .page-cockfighting__btn-primary,
  .page-cockfighting__btn-secondary {
    padding: 12px 20px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-cockfighting__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  /* FAQ specific mobile styles */
  details.page-cockfighting__faq-item summary.page-cockfighting__faq-question {
    padding: 15px;
  }
  .page-cockfighting__faq-qtext {
    font-size: 15px;
  }
  .page-cockfighting__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }
  details.page-cockfighting__faq-item .page-cockfighting__faq-answer {
    padding: 0 15px 15px;
  }
  details.page-cockfighting__faq-item .page-cockfighting__faq-answer p {
    font-size: 0.9rem;
  }

  /* Ensure content area containers are full width and prevent overflow */
  .page-cockfighting__content-area,
  .page-cockfighting__text-block,
  .page-cockfighting__card,
  .page-cockfighting__container,
  .page-cockfighting__hero-section,
  .page-cockfighting__section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  /* For elements that might cause horizontal scroll, ensure overflow is handled */
  .page-cockfighting__promotions-grid, .page-cockfighting__features-grid, .page-cockfighting__types-grid, .page-cockfighting__steps-grid, .page-cockfighting__tips-list {
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
  }
}