/* style/cockfighting.css */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
}

/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-cockfighting {
  font-family: Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--background-color);
  line-height: 1.6;
}

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

/* Hero Section */
.page-cockfighting__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body已承担顶距，此处仅小顶距 */
  background-color: var(--deep-green-color);
  overflow: hidden;
}

.page-cockfighting__video-container {
  width: 100%;
  max-width: 1920px; /* Full width for video */
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  /* Aspect ratio 16:9 for video */
  padding-bottom: 56.25%; /* 9/16 = 0.5625 */
  height: 0;
  overflow: hidden;
}

.page-cockfighting__hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7); /* Darken video slightly for text contrast */
  cursor: pointer;
}

.page-cockfighting__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  z-index: 1;
  color: var(--text-main);
  margin-top: -150px; /* Pull content up slightly over the video */
  position: relative;
}

.page-cockfighting__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--gold-color);
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-cockfighting__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.page-cockfighting__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: #ffffff; /* White text for button */
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-cockfighting__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 20px var(--glow-color);
}

.page-cockfighting__btn-primary--center {
  margin: 40px auto 0 auto;
  display: block;
  max-width: 300px;
}

/* Section Titles */
.page-cockfighting__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 50px;
  color: var(--gold-color);
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.4);
}

/* Introduction Section */
.page-cockfighting__introduction {
  padding: 80px 0;
  background-color: var(--card-bg);
  position: relative;
}

.page-cockfighting__introduction .page-cockfighting__container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
}

.page-cockfighting__introduction .page-cockfighting__text-block {
  flex: 1;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-cockfighting__introduction .page-cockfighting__text-block p {
  margin-bottom: 20px;
}

.page-cockfighting__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  filter: none; /* Ensure no filter changes color */
}

.page-cockfighting__image--right {
  flex: 0 0 500px; /* Fixed width for desktop */
  width: 500px;
  height: 375px; /* Maintain 4:3 aspect ratio */
}

/* Features Section */
.page-cockfighting__features {
  padding: 80px 0;
  background-color: var(--background-color);
  color: var(--text-main);
}

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

.page-cockfighting__card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.page-cockfighting__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(87, 227, 141, 0.5);
}

.page-cockfighting__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: none; /* Ensure no filter changes color */
}

.page-cockfighting__card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-main);
}

/* How-To-Play Section */
.page-cockfighting__how-to-play {
  padding: 80px 0;
  background-color: var(--deep-green-color);
}

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

.page-cockfighting__step-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

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

.page-cockfighting__step-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--gold-color);
}

.page-cockfighting__step-item p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* FAQ Section */
.page-cockfighting__faq-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

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

.page-cockfighting__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  color: var(--text-secondary);
}

.page-cockfighting__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-main);
  position: relative;
  transition: background-color 0.3s ease;
}

.page-cockfighting__faq-item summary:hover {
  background-color: rgba(var(--primary-color), 0.1);
}

.page-cockfighting__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-cockfighting__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gold-color);
  transition: transform 0.3s ease;
}

.page-cockfighting__faq-item[open] .page-cockfighting__faq-toggle {
  transform: rotate(45deg); /* Change + to X or - */
}

.page-cockfighting__faq-answer {
  padding: 0 30px 20px 30px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* CTA Section */
.page-cockfighting__cta-section {
  padding: 80px 0;
  background-color: var(--deep-green-color);
  text-align: center;
}

.page-cockfighting__cta-container {
  max-width: 800px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-cockfighting__introduction .page-cockfighting__container {
    flex-direction: column;
  }
  .page-cockfighting__image--right {
    flex: none;
    width: 100%;
    height: auto;
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .page-cockfighting__container {
    padding: 0 15px;
  }

  .page-cockfighting__hero-section {
    padding-bottom: 40px;
  }

  .page-cockfighting__hero-content {
    padding: 20px 15px;
    margin-top: -80px;
  }

  .page-cockfighting__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .page-cockfighting__description {
    font-size: 1rem;
  }

  .page-cockfighting__btn-primary {
    padding: 12px 25px;
    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__btn-primary--center {
    margin-left: auto;
    margin-right: auto;
    max-width: 300px !important;
  }

  .page-cockfighting__section-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 30px;
  }

  .page-cockfighting__introduction, .page-cockfighting__features, .page-cockfighting__how-to-play, .page-cockfighting__faq-section, .page-cockfighting__cta-section {
    padding: 40px 0;
  }

  .page-cockfighting__feature-grid, .page-cockfighting__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-cockfighting__card, .page-cockfighting__step-item, .page-cockfighting__faq-item {
    padding: 20px;
  }

  .page-cockfighting__card-image {
    height: 180px;
  }

  .page-cockfighting__card-title {
    font-size: 1.3rem;
  }

  .page-cockfighting__step-title {
    font-size: 1.4rem;
  }

  .page-cockfighting__faq-item summary {
    font-size: 1.1rem;
    padding: 15px 20px;
  }

  .page-cockfighting__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }

  /* Mobile image and video responsiveness */
  .page-cockfighting img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-cockfighting video,
  .page-cockfighting__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-cockfighting__section,
  .page-cockfighting__card,
  .page-cockfighting__container,
  .page-cockfighting__video-section,
  .page-cockfighting__video-container,
  .page-cockfighting__video-wrapper,
  .page-cockfighting__cta-buttons,
  .page-cockfighting__button-group,
  .page-cockfighting__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-cockfighting__video-section {
    padding-top: 10px !important;
  }

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