/* style/cockfighting.css */

/* --- Base Styles --- */
.page-cockfighting {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #FFFFFF; /* Ensure consistency with body background */
}

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

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

.page-cockfighting__section-title {
    font-size: 36px;
    color: #017439; /* Primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-cockfighting__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #017439;
    border-radius: 2px;
}

.page-cockfighting__section-title--white {
    color: #FFFFFF;
}

.page-cockfighting__section-title--white::after {
    background-color: #FFFFFF;
}

.page-cockfighting__description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555555;
}

.page-cockfighting__description--white {
    color: #f0f0f0;
}

.page-cockfighting__keyword {
    font-weight: bold;
    color: #017439;
}

.page-cockfighting__dark-bg {
    background-color: #017439; /* Primary color as dark background */
    color: #FFFFFF;
}

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

/* --- Buttons --- */
.page-cockfighting__btn-primary,
.page-cockfighting__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

.page-cockfighting__btn-primary--yellow-text {
    color: #FFFF00;
}

.page-cockfighting__btn-secondary {
    background-color: transparent;
    color: #C30808; /* Text color for secondary button */
    border: 2px solid #C30808;
    margin-left: 15px;
}

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

.page-cockfighting__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-cockfighting__cta-center {
    text-align: center;
    margin-top: 40px;
}

/* --- 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, #017439, #FFFFFF); /* Blend primary and auxiliary */
}

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

.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: 8px;
    object-fit: cover;
}

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

.page-cockfighting__main-title {
    font-size: 48px;
    color: #FFFFFF;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- Content Grids & Cards --- */
.page-cockfighting__content-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.page-cockfighting__content-grid:nth-child(even) {
    flex-direction: row-reverse;
}

.page-cockfighting__text-block {
    flex: 1;
}

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

.page-cockfighting__image-wrapper {
    flex: 1;
    min-width: 300px; /* Ensure images don't shrink too much */
}

.page-cockfighting__image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-cockfighting__step-card {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark background */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%; /* Ensure equal height */
    display: flex;
    flex-direction: column;
}

.page-cockfighting__step-card:hover {
    transform: translateY(-5px);
}

.page-cockfighting__step-title {
    font-size: 22px;
    color: #FFFF00; /* Yellow text for titles on dark background */
    margin-bottom: 15px;
}

.page-cockfighting__step-card p {
    color: #f0f0f0;
    flex-grow: 1;
}

.page-cockfighting__step-card a {
    color: #FFFF00;
    text-decoration: underline;
}

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

.page-cockfighting__card {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    height: 100%; /* Ensure equal height */
    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-title {
    font-size: 22px;
    color: #017439;
    margin-bottom: 15px;
}

.page-cockfighting__card p {
    color: #555555;
    flex-grow: 1;
}

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

.page-cockfighting__advantage-card {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid #017439;
    height: 100%; /* Ensure equal height */
    display: flex;
    flex-direction: column;
}

.page-cockfighting__advantage-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.page-cockfighting__advantage-title {
    font-size: 20px;
    color: #017439;
    margin-bottom: 10px;
}

.page-cockfighting__advantage-card p {
    color: #555555;
    flex-grow: 1;
}

.page-cockfighting__list {
    list-style: disc;
    padding-left: 25px;
    margin: 0;
    color: #f0f0f0; /* For dark background */
}

.page-cockfighting__list li {
    margin-bottom: 10px;
}

.page-cockfighting__list li strong {
    color: #FFFF00; /* Yellow for strong text on dark background */
}

/* --- FAQ Section --- */
.page-cockfighting__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* 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 và đủ lớn max-height để đảm bảo mở rộng */
.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 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề kiểu dáng */
.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;
}

/* Tiêu đề câu hỏi kiểu dáng */
.page-cockfighting__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: #333333;
}

/* Chuyển đổi biểu tượng */
.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; /* Ngăn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-cockfighting__faq-item.active .page-cockfighting__faq-toggle {
  color: #017439; /* Màu chính cho biểu tượng đang hoạt động */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-cockfighting__main-title {
        font-size: 40px;
    }
    .page-cockfighting__section-title {
        font-size: 30px;
    }
    .page-cockfighting__content-grid {
        flex-direction: column;
    }
    .page-cockfighting__content-grid:nth-child(even) {
        flex-direction: column; /* Reset order for smaller screens */
    }
    .page-cockfighting__image-wrapper {
        order: -1; /* Image always on top for content grid */
    }
}

@media (max-width: 768px) {
    /* 🚨 Mobile Hero Section Padding */
    .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: 4px;
    }

    .page-cockfighting__main-title {
        font-size: 32px;
    }

    .page-cockfighting__description {
        font-size: 16px;
    }

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

    .page-cockfighting__btn-primary,
    .page-cockfighting__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important; /* Remove margin for stacked buttons */
        padding: 12px 20px;
        font-size: 16px;
    }

    .page-cockfighting__section {
        padding: 40px 0;
    }

    .page-cockfighting__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

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

    /* 🚨 Mobile Image Adaption */
    .page-cockfighting img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-cockfighting__section,
    .page-cockfighting__card,
    .page-cockfighting__container,
    .page-cockfighting__step-card,
    .page-cockfighting__advantage-card,
    .page-cockfighting__image-wrapper,
    .page-cockfighting__text-block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Override for specific elements if they have internal padding */
    .page-cockfighting__step-card,
    .page-cockfighting__card,
    .page-cockfighting__advantage-card {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .page-cockfighting__content-grid,
    .page-cockfighting__steps-grid,
    .page-cockfighting__cards-grid,
    .page-cockfighting__advantages-grid {
        gap: 20px;
    }

    /* 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;
    }
}

/* Ensure no image filters are used */
.page-cockfighting img {
    filter: none;
}

/* Content area images CSS dimensions lower bound */
.page-cockfighting__hero-section img,
.page-cockfighting__introduction .page-cockfighting__image-wrapper img,
.page-cockfighting__tips .page-cockfighting__image-wrapper img {
    min-width: 200px;
    min-height: 200px;
}

/* Ensure other images in content area also meet min size, if present */
.page-cockfighting__content-area img:not(.page-cockfighting__hero-image img):not(.page-cockfighting__image-wrapper img) {
    min-width: 200px;
    min-height: 200px;
}