/* style/casino.css */
/* 
 * Màu sắc chính: #017439 (Xanh lá cây)
 * Màu sắc phụ: #FFFFFF (Trắng)
 * Màu đăng ký/đăng nhập: #C30808 (Đỏ)
 * Màu chữ đăng ký/đăng nhập: #FFFF00 (Vàng)
 * Màu nền body: #FFFFFF (Mặc định)
 */

.page-casino {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Mặc định chữ đen trên nền trắng */
    background-color: #FFFFFF; /* Đảm bảo nền trắng */
}

/* Cố định khoảng cách với header */
.page-casino__hero-section {
    padding-top: var(--header-offset, 120px); /* Sử dụng biến CSS từ shared.css */
}

/* HERO Section */
.page-casino__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px; /* Thêm padding dưới */
    background: linear-gradient(135deg, #017439, #005f2e); /* Gradient từ màu chính */
    color: #ffffff; /* Chữ trắng trên nền tối */
}

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

.page-casino__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-casino__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-casino__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.page-casino__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
    color: #FFFF00; /* Màu vàng cho tiêu đề chính */
}

.page-casino__intro-text {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-casino__cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Cho phép xuống dòng trên mobile */
}

.page-casino__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-width: 180px; /* Đảm bảo kích thước tối thiểu */
    text-align: center;
}

.page-casino__btn-register {
    background: #C30808; /* Màu đỏ cho Đăng Ký */
    color: #FFFF00; /* Màu vàng cho chữ */
}

.page-casino__btn-register:hover {
    background: #a30606;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-casino__btn-login {
    background: #C30808; /* Màu đỏ cho Đăng Nhập */
    color: #FFFF00; /* Màu vàng cho chữ */
}

.page-casino__btn-login:hover {
    background: #a30606;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-casino__section {
    padding: 80px 0;
    background-color: #FFFFFF;
}

.page-casino__section--about {
    background-color: #f9f9f9;
}

.page-casino__dark-section {
    background-color: #017439; /* Màu nền tối từ màu chính */
    color: #ffffff; /* Chữ trắng trên nền tối */
}

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

.page-casino__section-title {
    font-size: 2.5em;
    color: #017439; /* Tiêu đề màu chính */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
}

.page-casino__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #FFFF00; /* Đường kẻ vàng */
    border-radius: 2px;
}

.page-casino__dark-section .page-casino__section-title {
    color: #FFFF00; /* Tiêu đề vàng trên nền tối */
}

.page-casino__text-block {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: #555555;
}

.page-casino__dark-section .page-casino__text-block {
    color: #e0e0e0;
}

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

.page-casino__feature-item {
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-casino__feature-icon {
    width: 100%;
    height: auto;
    max-width: 150px; /* Giữ kích thước icon hợp lý, nhưng vẫn > 200px nếu là ảnh nội dung */
    margin-bottom: 20px;
    object-fit: cover;
    border-radius: 8px;
}
/* IMPORTANT: Override the icon specific max-width if it's a content image and needs to be > 200px */
.page-casino__feature-item img {
    min-width: 200px; /* Ensure images are at least 200px */
    min-height: 200px;
    max-width: 100%; /* Important for responsiveness */
    height: auto;
}

.page-casino__feature-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
}

.page-casino__feature-description {
    color: #666666;
}

/* Image Content Layout */
.page-casino__image-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.page-casino__image-content--left {
    flex-direction: row;
}

.page-casino__image-content--right {
    flex-direction: row-reverse;
}

.page-casino__image-content .page-casino__image {
    flex: 1;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Ensure images are at least 200px */
    min-height: 200px;
}

.page-casino__image-content .page-casino__text-content {
    flex: 1;
    text-align: left;
}

.page-casino__sub-title {
    font-size: 2em;
    color: #017439;
    margin-bottom: 20px;
}

.page-casino__image-content .page-casino__text-content p {
    color: #555555;
    margin-bottom: 25px;
}

.page-casino__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    min-width: 150px;
    text-align: center;
}

.page-casino__btn-primary:hover {
    background: #005f2e;
}

.page-casino__btn-center {
    display: block;
    margin: 50px auto 0 auto;
}

/* Game Cards */
.page-casino__grid--games {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.page-casino__game-card,
.page-casino__promotion-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino__game-card:hover,
.page-casino__promotion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-casino__card-image {
    width: 100%;
    height: 200px; /* Kích thước cố định cho hình ảnh card */
    object-fit: cover;
    margin-bottom: 15px;
    min-width: 200px; /* Ensure images are at least 200px */
    min-height: 200px;
}

.page-casino__card-title {
    font-size: 1.3em;
    color: #017439;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-casino__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-casino__card-description {
    font-size: 0.95em;
    color: #666666;
    margin-bottom: 20px;
    padding: 0 15px;
}

.page-casino__btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.page-casino__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
}

/* Promotions Section */
.page-casino__grid--promotions {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.page-casino__promotion-card {
    background: rgba(255, 255, 255, 0.15); /* Nền hơi trong suốt trên nền tối */
    color: #ffffff;
}

.page-casino__promotion-card .page-casino__card-title {
    color: #FFFF00; /* Tiêu đề vàng trên nền tối */
}

.page-casino__promotion-card .page-casino__card-description {
    color: #f0f0f0;
}

.page-casino__promotion-card .page-casino__btn-secondary {
    background: #FFFF00;
    color: #017439;
    border-color: #FFFF00;
}

.page-casino__promotion-card .page-casino__btn-secondary:hover {
    background: #e0e000;
    color: #017439;
}

/* Security & Support */
.page-casino__grid--info {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.page-casino__info-item {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-casino__info-title {
    font-size: 1.6em;
    color: #017439;
    margin-bottom: 15px;
}

.page-casino__info-item p {
    color: #666666;
    margin-bottom: 20px;
}

.page-casino__info-image {
    width: 100%;
    height: auto;
    max-width: 300px;
    margin-top: 20px;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Ensure images are at least 200px */
    min-height: 200px;
}

/* FAQ Section */
.page-casino__section--faq {
    background-color: #f0f5f0; /* Nền xanh nhạt cho FAQ */
}

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

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

/* FAQ默认状态 - 答案隐藏 */
.page-casino__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展开状态 - 🚨 Sử dụng !important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-casino__faq-item.active .page-casino__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-casino__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-casino__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

/* Chuyển đổi biểu tượng */
.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #017439; /* Màu xanh cho biểu tượng */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặ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-casino__faq-item.active .page-casino__faq-toggle {
  color: #C30808; /* Màu đỏ khi mở */
  transform: rotate(180deg); /* Xoay biểu tượng */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-casino__main-title {
        font-size: 2.8em;
    }
    .page-casino__section-title {
        font-size: 2em;
    }
    .page-casino__image-content {
        flex-direction: column;
        gap: 30px;
    }
    .page-casino__image-content--right {
        flex-direction: column;
    }
    .page-casino__image-content .page-casino__text-content {
        text-align: center;
    }
    .page-casino__grid--info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* 🚨 Cố định khoảng cách với header trên mobile */
    .page-casino__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-casino__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-casino__intro-text {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-casino__cta-group {
        flex-direction: column; /* Nút xếp dọc trên mobile */
        gap: 15px;
        padding: 0 15px;
    }
    .page-casino__cta-button {
        width: 100% !important; /* Đảm bảo nút chiếm toàn bộ chiều rộng */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 16px;
    }

    .page-casino__section {
        padding: 50px 0;
    }
    .page-casino__container {
        padding: 0 15px;
    }
    .page-casino__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-casino__text-block {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-casino__grid {
        grid-template-columns: 1fr;
    }
    .page-casino__feature-item {
        padding: 20px;
    }

    /* 🚨 Mobile image responsiveness */
    .page-casino img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-casino__section,
    .page-casino__card,
    .page-casino__container,
    .page-casino__image-content,
    .page-casino__feature-item,
    .page-casino__info-item,
    .page-casino__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Specific overrides for padding on sections that already have it */
    .page-casino__section--about .page-casino__container,
    .page-casino__section--cockfighting-commentary .page-casino__container,
    .page-casino__section--games .page-casino__container,
    .page-casino__section--promotions .page-casino__container,
    .page-casino__section--security-support .page-casino__container,
    .page-casino__section--faq .page-casino__container {
        padding-left: 0;
        padding-right: 0;
    }

    .page-casino__faq-question {
      padding: 15px;
      flex-wrap: wrap;
    }
    
    .page-casino__faq-question h3 {
      font-size: 15px;
      margin-bottom: 0;
      width: calc(100% - 40px);
    }
}