/* style/cockfighting.css */

/* --- Base Styles --- */
.page-cockfighting {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text color for light body background */
    background-color: #ffffff; /* Explicitly set for content area if shared.css doesn't */
}

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

.page-cockfighting__section {
    padding: 60px 0;
    text-align: center;
}

.page-cockfighting__section-title {
    font-size: 2.5em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-cockfighting__text-block {
    max-width: 900px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
    line-height: 1.8;
}

/* --- Color Contrast Classes --- */
.page-cockfighting__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

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

/* --- Card Styles --- */
.page-cockfighting__card {
    background: #ffffff;
    color: #333333;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure uniform height in grids */
    display: flex;
    flex-direction: column;
}

.page-cockfighting__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-cockfighting__card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
    display: block; /* Required for image responsiveness */
}

.page-cockfighting__card-title {
    font-size: 1.5em;
    color: #017439;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-cockfighting__card-title a.page-cockfighting__card-link {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-cockfighting__card-title a.page-cockfighting__card-link:hover {
    color: #005f2c;
    text-decoration: underline;
}

.page-cockfighting__card p {
    font-size: 1em;
    color: #555555;
    flex-grow: 1; /* Allow paragraph to take available space */
}

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

.page-cockfighting__card.page-cockfighting__dark-bg .page-cockfighting__card-title {
    color: #ffffff;
}

.page-cockfighting__card.page-cockfighting__dark-bg .page-cockfighting__card-title a.page-cockfighting__card-link {
    color: #ffff00; /* Yellow for links on dark background */
}

.page-cockfighting__card.page-cockfighting__dark-bg .page-cockfighting__card-title a.page-cockfighting__card-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.page-cockfighting__card.page-cockfighting__dark-bg p {
    color: #f0f0f0;
}


/* --- Button Styles --- */
.page-cockfighting__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.page-cockfighting__btn-primary {
    background: #017439;
    color: #ffffff;
}

.page-cockfighting__btn-primary:hover {
    background: #005f2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-cockfighting__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-cockfighting__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-cockfighting__btn-register {
    background: #C30808; /* Custom color for register */
    color: #FFFF00; /* Custom font color for register */
    margin-right: 15px;
}

.page-cockfighting__btn-register:hover {
    background: #a00606;
}

.page-cockfighting__btn-login {
    background: #C30808; /* Custom color for login */
    color: #FFFF00; /* Custom font color for login */
}

.page-cockfighting__btn-login:hover {
    background: #a00606;
}

/* --- 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, #e0ffe0, #ffffff); /* Light gradient background */
}

.page-cockfighting__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.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 8px 20px rgba(0, 0, 0, 0.15);
}

.page-cockfighting__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 30px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -80px; /* Overlap with image */
}

.page-cockfighting__hero-title {
    font-size: 3.2em;
    color: #017439;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 800;
}

.page-cockfighting__hero-description {
    font-size: 1.2em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* --- Module 1: Introduction --- */
.page-cockfighting__introduction .page-cockfighting__feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* --- Module 2: Quick Links --- */
.page-cockfighting__quick-links {
    background-color: #017439;
    color: #ffffff;
}

.page-cockfighting__quick-links .page-cockfighting__section-title {
    color: #ffffff;
}

.page-cockfighting__quick-links .page-cockfighting__text-block {
    color: #f0f0f0;
}

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

.page-cockfighting__link-item {
    display: block;
    padding: 15px 20px;
    background: #005f2c;
    color: #ffff00; /* Custom font color for links on dark background */
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-cockfighting__link-item:hover {
    background: #004c23;
    transform: translateY(-3px);
}

/* --- Module 3: Game Details --- */
.page-cockfighting__game-details .page-cockfighting__game-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* --- Module 4: Promotions --- */
.page-cockfighting__promotions {
    background-color: #017439;
    color: #ffffff;
}

.page-cockfighting__promotions .page-cockfighting__section-title {
    color: #ffffff;
}

.page-cockfighting__promotions .page-cockfighting__text-block {
    color: #f0f0f0;
}

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

.page-cockfighting__card-promo {
    background: #005f2c; /* Slightly lighter dark green for promo cards */
    color: #ffffff;
    border: none;
}
.page-cockfighting__card-promo .page-cockfighting__card-title {
    color: #ffff00; /* Yellow for titles on dark promo cards */
}
.page-cockfighting__card-promo p {
    color: #f0f0f0;
}


/* --- Module 5: Security & Support --- */
.page-cockfighting__security-support .page-cockfighting__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

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

/* --- Module 6: FAQ --- */
.page-cockfighting__faq-section {
    background-color: #f8f8f8;
}

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

/* FAQ容器样式 */
.page-cockfighting__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* 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 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-cockfighting__faq-item.active .page-cockfighting__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333; /* Ensure text color on answer background */
}

/* 问题样式 */
.page-cockfighting__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-cockfighting__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* 问题标题样式 */
.page-cockfighting__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: #333333; /* Ensure question title color */
}

/* 切换图标 */
.page-cockfighting__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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-cockfighting__faq-item.active .page-cockfighting__faq-toggle {
  color: #333;
  transform: rotate(180deg); /* Rotate for minus sign effect */
}


/* --- Module 7: Blog Content --- */
.page-cockfighting__blog-section {
    background-color: #017439;
    color: #ffffff;
}

.page-cockfighting__blog-section .page-cockfighting__section-title {
    color: #ffffff;
}

.page-cockfighting__blog-section .page-cockfighting__text-block {
    color: #f0f0f0;
}

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

.page-cockfighting__card-blog {
    background: #005f2c; /* Slightly lighter dark green for blog cards */
    color: #ffffff;
    border: none;
}

.page-cockfighting__card-blog .page-cockfighting__card-title {
    color: #ffff00;
}

.page-cockfighting__card-blog .page-cockfighting__card-title a {
    color: #ffff00;
}

.page-cockfighting__card-blog .page-cockfighting__card-title a:hover {
    color: #ffffff;
}

.page-cockfighting__blog-date {
    font-size: 0.9em;
    color: #cccccc;
    margin-bottom: 10px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-cockfighting__hero-title {
        font-size: 2.5em;
    }
    .page-cockfighting__hero-description {
        font-size: 1.1em;
    }
    .page-cockfighting__section-title {
        font-size: 2em;
    }
    .page-cockfighting__text-block {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    /* --- General Mobile Styles --- */
    .page-cockfighting {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-cockfighting__container {
        padding: 15px;
    }
    .page-cockfighting__section {
        padding: 40px 0;
    }
    .page-cockfighting__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-cockfighting__text-block {
        margin-bottom: 25px;
    }

    /* --- HERO Section Mobile --- */
    .page-cockfighting__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-cockfighting__hero-image img {
        border-radius: 8px;
    }
    .page-cockfighting__hero-content {
        padding: 20px;
        margin-top: -60px; /* Adjust overlap */
    }
    .page-cockfighting__hero-title {
        font-size: 2em;
    }
    .page-cockfighting__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-cockfighting__hero-cta-group {
        flex-direction: column;
        gap: 15px;
    }

    /* --- Image Responsive Adaptation (MUST BE STRICTLY FOLLOWED) --- */
    .page-cockfighting img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-cockfighting__section,
    .page-cockfighting__card,
    .page-cockfighting__container,
    .page-cockfighting__feature-cards,
    .page-cockfighting__link-grid,
    .page-cockfighting__game-types,
    .page-cockfighting__promo-grid,
    .page-cockfighting__info-grid,
    .page-cockfighting__blog-grid,
    .page-cockfighting__hero-container { /* Include all containers that might hold images or cause overflow */
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px; /* Add padding to prevent content from touching edges */
      padding-right: 15px;
    }
    
    /* Remove padding from containers if they are already within a section with padding */
    .page-cockfighting__section .page-cockfighting__container {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* --- Button Responsive Adaptation (MUST BE STRICTLY FOLLOWED) --- */
    .page-cockfighting__cta-button,
    .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-left: 15px !important; /* Ensure padding on buttons */
      padding-right: 15px !important;
    }
    
    /* Button containers mobile adaptation */
    .page-cockfighting__hero-cta-group,
    .page-cockfighting__contact-buttons {
      flex-direction: column !important; /* Stack buttons vertically */
      gap: 15px !important;
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }

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

@media (max-width: 480px) {
    .page-cockfighting__hero-title {
        font-size: 1.8em;
    }
    .page-cockfighting__cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .page-cockfighting__section-title {
        font-size: 1.5em;
    }
}