/* style/cockfighting.css */

/* --- Base Styles --- */
.page-cockfighting {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF);
}

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

.page-cockfighting__section {
    padding: 60px 0;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

.page-cockfighting__section:nth-of-type(even) {
    background-color: #ffffff;
}

.page-cockfighting__section-title {
    font-size: 38px;
    color: #017439; /* Primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

.page-cockfighting__subsection-title {
    font-size: 28px;
    color: #017439;
    margin-top: 40px;
    margin-bottom: 25px;
    text-align: center;
}

.page-cockfighting__text-block {
    font-size: 18px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px auto;
    color: #555555;
}

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

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

/* --- Buttons --- */
.page-cockfighting__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.page-cockfighting__cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

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

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

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

.page-cockfighting__btn-primary {
    background: #017439; /* Primary color */
    color: #FFFFFF; /* White text */
}

.page-cockfighting__btn-primary:hover {
    background: #005a2e;
}

.page-cockfighting__btn-secondary {
    background: #FFFFFF; /* White background */
    color: #017439; /* Primary color text */
    border: 2px solid #017439;
}

.page-cockfighting__btn-secondary:hover {
    background: #f0f0f0;
    color: #005a2e;
    border-color: #005a2e;
}


/* --- 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 spacing */
    background: linear-gradient(135deg, #017439, #005a2e); /* Darker green gradient */
    color: #ffffff;
    overflow: hidden; /* Ensure no overflow from image */
}

.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;
    max-width: 100%; /* Ensure image wrapper doesn't overflow */
    overflow: hidden;
    border-radius: 12px;
}

.page-cockfighting__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

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

.page-cockfighting__main-title {
    font-size: 52px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFF00; /* Yellow for main title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-cockfighting__intro-text {
    font-size: 20px;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* --- Overview Section --- */
.page-cockfighting__overview-section {
    padding: 80px 0;
}

.page-cockfighting__image-wrapper {
    margin: 40px auto;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-cockfighting__image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}

.page-cockfighting__feature-list {
    list-style: none;
    padding: 0;
    margin: 30px auto 0 auto;
    max-width: 800px;
}

.page-cockfighting__feature-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    font-size: 17px;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-cockfighting__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.page-cockfighting__feature-item strong {
    color: #017439;
    font-weight: 700;
}

/* --- Gameplay Section (Dark Background) --- */
.page-cockfighting__dark-section {
    background: #017439;
    color: #ffffff;
    padding: 80px 0;
}

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

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

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

.page-cockfighting__step-title {
    font-size: 24px;
    color: #FFFF00; /* Yellow for step titles */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-cockfighting__step-description {
    font-size: 16px;
    color: #f0f0f0;
}

.page-cockfighting__step-description a {
    color: #FFFF00; /* Yellow for links in dark section */
    text-decoration: underline;
}

.page-cockfighting__step-description a:hover {
    color: #fff;
}

.page-cockfighting__image-wrapper--center {
    text-align: center;
    margin-top: 50px;
    max-width: 1000px;
}

/* --- Promotions Section --- */
.page-cockfighting__promotions-section {
    padding: 80px 0;
}

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

.page-cockfighting__promo-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

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

.page-cockfighting__promo-card img {
    width: 100%;
    height: 200px; /* Fixed height for promo images */
    object-fit: cover;
    display: block;
}

.page-cockfighting__promo-title {
    font-size: 22px;
    color: #017439;
    margin: 20px 15px 10px 15px;
    font-weight: bold;
}

.page-cockfighting__promo-description {
    font-size: 16px;
    color: #666666;
    padding: 0 15px 20px 15px;
}


/* --- FAQ Section --- */
.page-cockfighting__faq-section {
    padding: 80px 0;
    background-color: #f0f0f0; /* Light grey background for FAQ */
}

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

/* FAQ容器样式 */
.page-cockfighting__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 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 20px;
    opacity: 0;
    color: #555555;
    background: #ffffff;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể 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 !important;
    opacity: 1;
    background: #ffffff;
    border-radius: 0 0 8px 8px;
}

/* Question Style */
.page-cockfighting__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #017439; /* Primary color for question background */
    color: #ffffff; /* White text for questions */
    border: 1px solid #017439;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-cockfighting__faq-question:hover {
    background: #005a2e; /* Slightly darker green on hover */
    border-color: #005a2e;
}

.page-cockfighting__faq-item.active .page-cockfighting__faq-question {
    border-radius: 8px 8px 0 0;
}


/* Question Title Style */
.page-cockfighting__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click events */
    color: #ffffff; /* Ensure title is white */
}

/* Toggle Icon */
.page-cockfighting__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #FFFF00; /* Yellow for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-cockfighting__faq-item.active .page-cockfighting__faq-toggle {
    color: #ffffff; /* White when active */
    transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* --- Latest News Section --- */
.page-cockfighting__latest-news-section {
    padding: 80px 0;
}

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

.page-cockfighting__news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-cockfighting__news-card img {
    width: 100%;
    height: 200px; /* Fixed height for news images */
    object-fit: cover;
    display: block;
}

.page-cockfighting__news-title {
    font-size: 22px;
    color: #017439;
    margin: 20px 20px 10px 20px;
    font-weight: bold;
    flex-grow: 1; /* Allow title to take up available space */
}

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

.page-cockfighting__news-title a:hover {
    color: #005a2e;
    text-decoration: underline;
}

.page-cockfighting__news-excerpt {
    font-size: 16px;
    color: #666666;
    padding: 0 20px 15px 20px;
}

.page-cockfighting__news-date {
    font-size: 14px;
    color: #999999;
    padding: 0 20px 20px 20px;
    display: block;
}


/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
    .page-cockfighting__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-cockfighting__intro-text {
        font-size: 16px;
    }

    .page-cockfighting__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    .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: 12px 20px !important;
        font-size: 16px !important;
        margin: 0 !important; /* Remove individual margins when stacked */
    }

    .page-cockfighting__container {
        padding: 15px;
    }

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

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

    .page-cockfighting__subsection-title {
        font-size: 24px;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .page-cockfighting__text-block {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* Images */
    .page-cockfighting img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
        border-radius: 8px;
    }

    .page-cockfighting__image-wrapper {
        margin: 20px auto;
        border-radius: 8px;
    }

    .page-cockfighting__hero-image {
        border-radius: 8px;
    }

    .page-cockfighting__step-card {
        padding: 20px;
        border-radius: 8px;
    }

    .page-cockfighting__step-title {
        font-size: 20px;
    }

    .page-cockfighting__promo-card,
    .page-cockfighting__news-card {
        border-radius: 8px;
    }

    .page-cockfighting__promo-card img,
    .page-cockfighting__news-card img {
         /* Adjust fixed height for mobile */
    }

    .page-cockfighting__promo-title,
    .page-cockfighting__news-title {
        font-size: 20px;
        margin: 15px 15px 10px 15px;
    }

    .page-cockfighting__promo-description,
    .page-cockfighting__news-excerpt,
    .page-cockfighting__news-date {
        font-size: 15px;
        padding: 0 15px 15px 15px;
    }

    /* FAQ Mobile Specific */
    .page-cockfighting__faq-question {
        padding: 15px;
        flex-wrap: wrap;
        border-radius: 8px;
    }
    
    .page-cockfighting__faq-item.active .page-cockfighting__faq-question {
        border-radius: 8px 8px 0 0;
    }

    .page-cockfighting__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }

    .page-cockfighting__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }

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

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