/* style/cockfighting.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --dark-background: #0a0a0a;
  --light-text: #ffffff;
  --dark-text: #333333;
  --register-button-bg: #C30808;
  --login-button-bg: #C30808;
  --button-text-color: #FFFF00;
}

.page-cockfighting {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--light-text); /* Default text color for dark body background */
  background-color: var(--dark-background);
}

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

/* Hero Section */
.page-cockfighting__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding-top: var(--header-offset, 120px); /* Assuming shared.css doesn't set body padding-top */
  text-align: center;
  overflow: hidden;
}

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

.page-cockfighting__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
}

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

.page-cockfighting__hero-description {
  font-size: 1.3em;
  color: var(--secondary-color);
  margin-bottom: 30px;
}

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

/* General Section Styling */
.page-cockfighting__section-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

.page-cockfighting__section-intro {
  font-size: 1.1em;
  color: var(--light-text);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

/* Advantages Section */
.page-cockfighting__advantages-section {
  padding: 60px 0;
}

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

.page-cockfighting__advantage-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-cockfighting__advantage-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
}

.page-cockfighting__advantage-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--primary-color);
  padding: 10px;
}

.page-cockfighting__advantage-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-cockfighting__advantage-description {
  color: var(--light-text);
  font-size: 1em;
}

/* Types Section */
.page-cockfighting__types-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-cockfighting__types-section .page-cockfighting__section-title,
.page-cockfighting__types-section .page-cockfighting__section-intro {
  color: var(--dark-text);
}

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

.page-cockfighting__type-card {
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: var(--dark-text);
}

.page-cockfighting__type-card:hover {
  transform: translateY(-10px);
}

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

.page-cockfighting__type-title {
  font-size: 1.4em;
  color: var(--primary-color);
  padding: 15px 20px 5px;
}

.page-cockfighting__type-description {
  font-size: 0.95em;
  color: var(--dark-text);
  padding: 0 20px 20px;
}

/* Guide Section */
.page-cockfighting__guide-section {
  padding: 60px 0;
}

.page-cockfighting__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-cockfighting__step-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  padding-top: 60px;
}

.page-cockfighting__step-number {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary-color);
  color: var(--secondary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  border: 3px solid var(--secondary-color);
}

.page-cockfighting__step-title {
  font-size: 1.4em;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-cockfighting__step-description {
  color: var(--light-text);
  font-size: 0.95em;
}

.page-cockfighting__guide-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 50px auto 0 auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Promotions Section */
.page-cockfighting__promotions-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-cockfighting__promotions-section .page-cockfighting__section-title,
.page-cockfighting__promotions-section .page-cockfighting__section-intro {
  color: var(--dark-text);
}

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

.page-cockfighting__promo-card {
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: var(--dark-text);
}

.page-cockfighting__promo-card:hover {
  transform: translateY(-10px);
}

.page-cockfighting__promo-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-cockfighting__promo-title {
  font-size: 1.3em;
  color: var(--primary-color);
  padding: 15px 20px 5px;
}

.page-cockfighting__promo-description {
  font-size: 0.9em;
  color: var(--dark-text);
  padding: 0 20px 20px;
}

.page-cockfighting__cta-buttons--center {
  text-align: center;
}

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

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

.page-cockfighting__faq-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-cockfighting__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--secondary-color);
  cursor: pointer;
  background: var(--primary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-cockfighting__faq-question:hover {
  background: #005a2e;
}

.page-cockfighting__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

.page-cockfighting__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--light-text);
}

.page-cockfighting__faq-item.active .page-cockfighting__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 20px;
}

.page-cockfighting__faq-answer p {
  margin: 0;
  padding-bottom: 10px;
  color: var(--light-text);
}

/* Call to Action Section */
.page-cockfighting__cta-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
  text-align: center;
}

.page-cockfighting__cta-section .page-cockfighting__section-title,
.page-cockfighting__cta-section .page-cockfighting__section-intro {
  color: var(--dark-text);
}

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

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

.page-cockfighting__btn-primary {
  background-color: var(--register-button-bg); /* Custom color for register */
  color: var(--button-text-color); /* Custom color for register/login text */
  border: 2px solid var(--register-button-bg);
}

.page-cockfighting__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-cockfighting__btn-secondary {
  background-color: var(--login-button-bg); /* Custom color for login */
  color: var(--button-text-color); /* Custom color for register/login text */
  border: 2px solid var(--login-button-bg);
}

.page-cockfighting__btn-secondary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-cockfighting__link {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-cockfighting__link:hover {
  color: #005a2e;
}

/* Utility classes for background colors */
.page-cockfighting__dark-bg {
  background-color: var(--dark-background);
  color: var(--light-text);
}

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

/* Image responsiveness */
.page-cockfighting img:not(.page-cockfighting__advantage-icon) {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-cockfighting__advantage-icon {
  /* Specific styling for small icons, ensuring they are not too small */
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-cockfighting__hero-title {
    font-size: 3em;
  }

  .page-cockfighting__hero-description {
    font-size: 1.2em;
  }

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

  .page-cockfighting__advantages-grid,
  .page-cockfighting__types-grid,
  .page-cockfighting__promo-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-cockfighting__hero-section {
    min-height: 400px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
  }

  .page-cockfighting__hero-content {
    padding: 15px;
  }

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

  .page-cockfighting__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

  /* LOGO 轮播区域 - N/A for this page, but general image rules apply */
  /* If there were a logo carousel, .page-cockfighting__logo-item would be handled here */

  /* 游戏展示区域 (Types Section, Promo Section) */
  .page-cockfighting__types-grid,
  .page-cockfighting__promo-grid,
  .page-cockfighting__advantages-grid,
  .page-cockfighting__guide-steps {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

  .page-cockfighting__type-image,
  .page-cockfighting__promo-image {
    height: 180px;
  }

  /* 通用图片与容器 */
  .page-cockfighting img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }

  /* Exception for .page-cockfighting__advantage-icon - maintain size */
  .page-cockfighting__advantage-icon {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    box-sizing: border-box;
  }

  .page-cockfighting__container {
    padding: 20px 15px;
  }

  .page-cockfighting__section-title {
    font-size: 1.8em;
    padding-top: 20px;
  }

  .page-cockfighting__section-intro {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  /* 按钮与按钮容器 */
  .page-cockfighting__btn-primary,
  .page-cockfighting__btn-secondary,
  .page-cockfighting a[class*="button"],
  .page-cockfighting 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: 12px 15px !important;
  }

  .page-cockfighting__hero-buttons,
  .page-cockfighting__cta-buttons {
    flex-direction: column;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  /* 其他内容模块 (FAQ) */
  .page-cockfighting__faq-question {
    padding: 15px;
    font-size: 1em;
  }

  .page-cockfighting__faq-answer {
    padding: 0 15px;
  }

  .page-cockfighting__faq-item.active .page-cockfighting__faq-answer {
    padding: 15px;
  }

  .page-cockfighting__advantage-card,
  .page-cockfighting__type-card,
  .page-cockfighting__promo-card,
  .page-cockfighting__step-item {
    padding: 20px;
  }

  .page-cockfighting__step-item {
    padding-top: 50px;
  }

  .page-cockfighting__step-number {
    width: 40px;
    height: 40px;
    font-size: 1.5em;
  }
}