/* style/support.css */

/* --- Base Styles & Color Contrast --- */
.page-support {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background #0a0a0a */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-support a {
    color: #FFD700; /* Primary color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-support a:hover {
    color: #f0c200; /* Slightly darker gold on hover */
}

.page-support__section-title,
.page-support__main-title {
    color: #FFD700; /* Gold for main titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-support__section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

/* --- Hero Section --- */
.page-support__hero-section {
    position: relative;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    min-height: 500px;
}

.page-support__hero-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.page-support__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.page-support__hero-description {
    font-size: 1.15em;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.page-support__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Darken background image */
    z-index: 1;
}

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

.page-support__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    text-align: center;
}

.page-support__cta-button--primary {
    background: #FFD700; /* Gold */
    color: #0a0a0a; /* Dark text for gold background */
}

.page-support__cta-button--primary:hover {
    background: #f0c200; /* Darker gold */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-support__cta-button--secondary {
    background: #8B0000; /* Dark Red */
    color: #ffffff; /* White text for dark red background */
    border: 2px solid #FFD700;
}

.page-support__cta-button--secondary:hover {
    background: #6a0000; /* Darker red */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* --- Contact Methods Section --- */
.page-support__contact-methods-section {
    padding: 60px 20px;
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for contrast */
}

.page-support__contact-methods-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.page-support__method-card {
    background: rgba(255, 255, 255, 0.1); /* Card background */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-support__method-icon {
    width: 100%; /* Ensure image fills card width */
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.page-support__method-text {
    color: #e0e0e0;
    margin-bottom: 25px;
    flex-grow: 1; /* Make text take available space */
}

.page-support__method-button {
    display: inline-block;
    padding: 12px 25px;
    background: #8B0000; /* Dark Red */
    color: #ffffff;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-support__method-button:hover {
    background: #6a0000; /* Darker red */
}

/* --- FAQ Section --- */
.page-support__faq-section {
    padding: 60px 20px;
}

.page-support__faq-container {
    max-width: 900px;
    margin: 0 auto;
}

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

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

/* FAQ默认状态 - 答案隐藏 */
.page-support__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; /* Adjusted padding for consistency */
  opacity: 0;
  color: #e0e0e0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-support__faq-item.active .page-support__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; /* Adjusted padding for consistency */
  opacity: 1;
  background: rgba(255, 255, 255, 0.08); /* Slightly different background for expanded answer */
  border-radius: 0 0 5px 5px;
}

/* Vấn đề FAQ */
.page-support__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1); /* Question background */
  border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Subtle border */
  border-radius: 5px; /* Only top corners rounded if not active */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-support__faq-item.active .page-support__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.page-support__faq-question:hover {
  background: rgba(255, 255, 255, 0.15); /* Lighter on hover */
}

.page-support__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Tiêu đề vấn đề */
.page-support__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: #FFD700; /* Gold for question titles */
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
}

/* Biểu tượng chuyển đổi */
.page-support__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold for toggle icon */
  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 click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-support__faq-item.active .page-support__faq-toggle {
  color: #ffffff; /* White when active */
  transform: rotate(45deg); /* Rotate for 'x' effect if using '+' */
}


/* --- Resources Section --- */
.page-support__resources-section {
    padding: 60px 20px;
    background-color: rgba(255, 215, 0, 0.05); /* Light gold tint for background */
}

.page-support__resources-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.page-support__resource-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-support__resource-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

.page-support__resource-card h3 {
    font-size: 1.3em;
    color: #FFD700;
    margin: 20px 20px 10px 20px;
}

.page-support__resource-card p {
    color: #e0e0e0;
    margin: 0 20px 20px 20px;
    flex-grow: 1;
}

/* --- Responsible Gaming Section --- */
.page-support__responsible-gaming-section {
    padding: 60px 20px;
    text-align: center;
    background-color: rgba(139, 0, 0, 0.1); /* Dark red tint for background */
}

.page-support__responsible-gaming-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-support__responsible-gaming-link {
    color: #FFD700;
    text-decoration: underline;
    font-weight: bold;
}

.page-support__responsible-gaming-link:hover {
    color: #f0c200;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-support__main-title {
        font-size: 2.8em;
    }
}

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

    .page-support__hero-section {
        padding: 60px 15px;
    }

    .page-support__main-title {
        font-size: 2.2em;
    }

    .page-support__hero-description {
        font-size: 1em;
    }

    .page-support__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-support__cta-button {
        width: 100%;
        max-width: 300px; /* Max width for buttons on mobile */
        margin: 0 auto; /* Center buttons */
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .page-support__contact-methods-section,
    .page-support__faq-section,
    .page-support__resources-section,
    .page-support__responsible-gaming-section {
        padding: 40px 15px;
    }

    .page-support__section-title {
        font-size: 1.8em;
    }

    .page-support__section-description {
        margin-bottom: 30px;
    }

    .page-support__methods-grid,
    .page-support__resources-grid {
        grid-template-columns: 1fr;
    }

    .page-support__method-card,
    .page-support__resource-card {
        padding: 20px;
    }

    .page-support__method-icon,
    .page-support__resource-image {
        height: 180px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* FAQ mobile specific styles */
    .page-support__faq-question {
      padding: 15px;
      flex-wrap: wrap;
    }
    
    .page-support__faq-question h3 {
      font-size: 1em;
      margin-bottom: 0;
      width: calc(100% - 40px);
    }
    
    .page-support__faq-toggle {
      margin-left: 10px;
      width: 24px;
      height: 24px;
      font-size: 20px;
    }
    
    .page-support__faq-answer {
      padding: 0 15px;
    }
    
    .page-support__faq-item.active .page-support__faq-answer {
      padding: 15px !important;
    }
    
    /* Ensure all images are responsive and don't overflow */
    .page-support img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .page-support__hero-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.2; /* Darken background image */
        z-index: 1;
    }

    /* Ensure containers don't cause overflow */
    .page-support__hero-container,
    .page-support__contact-methods-container,
    .page-support__faq-container,
    .page-support__resources-container,
    .page-support__responsible-gaming-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow-x: hidden !important;
    }

    .page-support__methods-grid,
    .page-support__resources-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }

    .page-support__method-card,
    .page-support__resource-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .page-support__main-title {
        font-size: 1.8em;
    }
    .page-support__section-title {
        font-size: 1.5em;
    }
    .page-support__hero-section {
        min-height: 400px;
    }
}