/* style/casino.css */

/* Base styles for the casino page */
.page-casino {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--secondary-color, #FFFFFF); /* Inherit from shared, fallback to white */
    padding-top: var(--header-offset, 120px); /* Ensure content is not covered by fixed header */
}

/* HERO Section */
.page-casino__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px 40px; /* Adjusted padding-top as it's handled by .page-casino */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand color gradient */
    color: #FFFFFF; /* White text on hero gradient */
}

.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.2);
}

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

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

.page-casino__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #FFFFFF;
}

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

.page-casino__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    box-sizing: border-box;
}

.page-casino__cta-button--primary {
    background: #EA7C07; /* Login color for primary CTA */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

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

.page-casino__cta-button--secondary {
    background: #FFFFFF;
    color: #26A9E0; /* Primary brand color for secondary CTA */
    border: 2px solid #26A9E0;
}

.page-casino__cta-button--secondary:hover {
    background: #f0f8ff;
    color: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* General Section Styles */
.page-casino__section {
    padding: 60px 0;
}

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

.page-casino__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #26A9E0; /* Primary brand color */
}

.page-casino__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-casino__image-full-width {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Color contrast classes */
.page-casino__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-casino__dark-bg {
    background-color: #26A9E0; /* Primary brand color */
    color: #FFFFFF;
}

.page-casino__dark-bg .page-casino__section-title {
    color: #FFFFFF;
}

.page-casino__dark-bg a {
    color: #FFFFFF;
    text-decoration: underline;
}

.page-casino__dark-bg a:hover {
    color: #f0f8ff;
}

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

.page-casino__game-card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 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-casino__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-casino__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-casino__card-title {
    font-size: 1.5em;
    margin: 20px 20px 10px;
    color: #26A9E0;
}

.page-casino__card-title a {
    color: inherit;
    text-decoration: none;
}

.page-casino__card-title a:hover {
    text-decoration: underline;
}

.page-casino__card-description {
    font-size: 1em;
    padding: 0 20px 20px;
    color: #555555;
    flex-grow: 1;
}

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

.page-casino__promo-card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 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-casino__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Guide Steps */
.page-casino__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

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

.page-casino__guide-item:hover {
    transform: translateY(-5px);
}

.page-casino__guide-title {
    font-size: 1.4em;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-casino__guide-item p {
    color: #555555;
}

/* Button Group */
.page-casino__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* FAQ Section */
.page-casino__faq-section {
    background-color: #f9f9f9; /* Light grey background for FAQ */
    padding: 60px 0;
}

.page-casino__faq-list {
    margin-top: 40px;
}

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

/* 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;
  color: #555555;
}

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

/* 问题样式 */
.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;
}

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

/* 切换图标 */
.page-casino__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-casino__faq-item.active .page-casino__faq-toggle {
  color: #26A9E0; /* Brand color for active toggle */
  transform: rotate(45deg); /* Rotate for 'x' effect from '+' */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-casino__hero-title {
        font-size: 2.8em;
    }
    .page-casino__hero-description {
        font-size: 1.2em;
    }
    .page-casino__section-title {
        font-size: 2.2em;
    }
    .page-casino__text-block {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .page-casino {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-casino__hero-section {
        padding: 40px 15px 30px;
    }

    .page-casino__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-casino__hero-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-casino__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-casino__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    .page-casino__hero-image img {
        border-radius: 4px;
    }

    .page-casino__section {
        padding: 40px 0;
    }
    .page-casino__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-casino__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-casino__text-block {
        font-size: 0.95em;
    }

    /* Images responsiveness */
    .page-casino img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* Card images */
    .page-casino__card-image {
        height: 180px; /* Adjust height for mobile cards */
    }

    /* Button Group Mobile */
    .page-casino__button-group {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

@media (max-width: 480px) {
    .page-casino__hero-title {
        font-size: 1.8em;
    }
    .page-casino__section-title {
        font-size: 1.6em;
    }
}