/* style/support.css */

/* Base styles for the support page content */
.page-support {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #FFFFFF; /* Custom color for 'Background' */
}

.page-support__section {
    padding: 60px 0;
    margin-bottom: 20px;
}

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

.page-support__section-title {
    font-size: 36px;
    color: #017439; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-support__section-title--light {
    color: #FFFFFF; /* White text for dark backgrounds */
}

.page-support__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
}

.page-support__section-description--light {
    color: #f0f0f0; /* Light text for dark backgrounds */
}

/* Hero Section */
.page-support__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-color: #f0f0f0; /* Light background for hero */
}

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

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

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

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

.page-support__hero-title {
    font-size: 48px;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-support__hero-description {
    font-size: 20px;
    color: #333333;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button Styles */
.page-support__cta-button,
.page-support__btn-primary,
.page-support__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
}

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

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

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

.page-support__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Card Styles */
.page-support__card {
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure equal height in grid */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #333333; /* Dark text for light card background */
}

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

.page-support__card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 4px;
}

.page-support__card h3 {
    font-size: 22px;
    color: #017439;
    margin-bottom: 15px;
}

.page-support__card p {
    font-size: 16px;
    color: #555555;
    flex-grow: 1; /* Allow paragraph to take available space */
}

/* Contact Channels Section */
.page-support__contact-channels {
    background-color: #ffffff;
}

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

/* FAQ Section */
.page-support__faq-section {
    background: #017439; /* Dark brand color for background */
    color: #ffffff; /* White text for dark background */
}

.page-support__dark-section {
    background: #017439;
    color: #ffffff;
}

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

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

/* 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 15px;
    opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-support__faq-item.active .page-support__faq-answer {
    max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳 any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #333333; /* Dark text for light answer background */
}

/* 问题样式 */
.page-support__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-support__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

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

/* 问题标题样式 */
.page-support__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px; /* Slightly larger for better readability */
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: #017439; /* Brand primary color for question text */
}

/* 切换图标 */
.page-support__faq-toggle {
    font-size: 28px; /* Larger toggle icon */
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Brand primary color for toggle */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Larger click area */
    height: 32px;
}

.page-support__faq-item.active .page-support__faq-toggle {
    color: #C30808; /* Accent color when active */
    transform: rotate(180deg); /* Rotate for minus sign effect */
}

/* Security & Responsible Gaming Section */
.page-support__security-responsible {
    background-color: #ffffff;
}

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

.page-support__security-item .page-support__link {
    color: #017439;
    text-decoration: underline;
    font-weight: bold;
}

.page-support__security-item .page-support__link:hover {
    color: #C30808;
}

/* Quick Links Section */
.page-support__quick-links {
    background: #017439;
}

.page-support__links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.page-support__quick-link {
    display: block;
    padding: 25px;
    background: #FFFFFF;
    color: #017439; /* Brand primary color for text */
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-support__quick-link:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

    .page-support__hero-description {
        font-size: 18px;
    }

    .page-support__section-title {
        font-size: 30px;
    }

    .page-support__section-description {
        font-size: 16px;
    }

    .page-support__card h3 {
        font-size: 20px;
    }

    .page-support__card p {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-support__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
        padding-bottom: 40px;
    }

    .page-support__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-support__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }

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

    .page-support__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }

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

    .page-support__cta-button,
    .page-support__btn-primary,
    .page-support__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 15px;
    }

    .page-support__channels-grid,
    .page-support__security-grid,
    .page-support__links-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-support__container {
        padding: 0 15px; /* Adjust container padding for mobile */
    }

    /* Images responsiveness for mobile */
    .page-support img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-support__section,
    .page-support__card,
    .page-support__container,
    .page-support__channels-grid,
    .page-support__security-grid,
    .page-support__links-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    /* FAQ mobile adjustments */
    .page-support__faq-question {
        padding: 15px;
    }
    
    .page-support__faq-question h3 {
        font-size: 16px;
    }
    
    .page-support__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    
    .page-support__faq-item.active .page-support__faq-answer {
        padding: 15px !important;
    }
}