/* style/contact.css */

/* Base styles for the contact page */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #ffffff; /* Explicitly set for clarity, though shared.css might handle body */
    padding-bottom: 60px; /* Space above footer */
}

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

.page-contact__section {
    padding: 60px 0;
    text-align: center;
}

.page-contact__section:nth-of-type(even) {
    background-color: #f9f9f9; /* Light background for alternating sections */
}

.page-contact__section-title {
    font-size: 36px;
    color: #017439; /* Primary color for titles */
    margin-bottom: 20px;
    font-weight: bold;
}

.page-contact__section-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* HERO Section */
.page-contact__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); /* Ensure space below fixed header */
    background-color: #e6f7ef; /* Light green background for hero */
    overflow: hidden; /* Ensure no image overflow */
}

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

.page-contact__hero-image-main {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
}

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

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

.page-contact__intro-text {
    font-size: 20px;
    color: #555555;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-contact__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Custom color for Register/Login */
    color: #FFFF00; /* Custom font color for Register/Login */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-contact__cta-button:hover {
    background: #a80707; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Contact Methods Section */
.page-contact__contact-methods {
    background-color: #ffffff;
}

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

.page-contact__method-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-contact__method-icon {
    width: 400px; /* Enforce min size 200x200 for display, matching HTML width */
    height: 300px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-contact__method-title {
    font-size: 24px;
    color: #017439;
    margin-bottom: 15px;
}

.page-contact__method-text {
    font-size: 16px;
    color: #666666;
    margin-bottom: 20px;
}

.page-contact__method-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #017439;
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-contact__method-link:hover {
    color: #005f2c;
    border-color: #005f2c;
}

/* Contact Form Section */
.page-contact__contact-form-section {
    background-color: #f9f9f9;
}

.page-contact__form-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.page-contact__form-image {
    width: 50%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Minimum image size */
    min-height: 200px;
}

.page-contact__form {
    width: 50%;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-contact__form-group {
    margin-bottom: 20px;
}

.page-contact__form-label {
    display: block;
    font-size: 16px;
    color: #333333;
    margin-bottom: 8px;
    font-weight: bold;
}

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333333;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
    color: #999999;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #017439;
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
}

.page-contact__form-textarea {
    resize: vertical;
}

.page-contact__form-submit-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: #017439;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-contact__form-submit-button:hover {
    background: #005f2c;
    transform: translateY(-2px);
}

/* Social Media Section */
.page-contact__social-media-section {
    background-color: #ffffff;
}

.page-contact__social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-contact__social-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555555;
    font-size: 16px;
    transition: color 0.3s ease;
    min-width: 120px; /* Ensure enough space for text */
}

.page-contact__social-icon-link:hover {
    color: #017439;
}

.page-contact__social-icon {
    width: 200px; /* Enforce min size 200x200 */
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.page-contact__social-icon-link:hover .page-contact__social-icon {
    transform: scale(1.1);
}

/* FAQ Section */
.page-contact__faq-section {
    background-color: #f9f9f9;
}

.page-contact__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: left;
}

/* FAQ container styles */
.page-contact__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.page-contact__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 */
    opacity: 0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height to ensure expansion */
.page-contact__faq-item.active .page-contact__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 */
    opacity: 1;
    background: #fdfdfd;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid #e0e0e0;
}

/* Question styles */
.page-contact__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0; /* Border for question */
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-contact__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

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

/* Question title styles */
.page-contact__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click events */
}

/* Toggle icon */
.page-contact__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; /* Prevent icon from blocking click events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
    color: #017439; /* Primary color for active toggle */
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Working Hours Section */
.page-contact__working-hours-section {
    background-color: #ffffff;
}

.page-contact__working-hours-info {
    max-width: 600px;
    margin: 40px auto 0 auto;
    text-align: left;
    background-color: #fefefe;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-contact__hours-item {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333333;
}

.page-contact__hours-item strong {
    color: #017439;
}

/* Responsible Gaming Section */
.page-contact__responsible-gaming-section {
    background-color: #e6f7ef; /* Light green background */
    padding-bottom: 80px;
}

.page-contact__responsible-gaming-link {
    display: inline-block;
    padding: 12px 30px;
    background: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.page-contact__responsible-gaming-link:hover {
    background: #005f2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-contact__hero-image-main {
        max-height: 500px;
    }
    .page-contact__main-title {
        font-size: 40px;
    }
    .page-contact__intro-text {
        font-size: 18px;
    }
    .page-contact__section-title {
        font-size: 30px;
    }
    .page-contact__section-description {
        font-size: 16px;
    }
    .page-contact__form-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-contact__form-image,
    .page-contact__form {
        width: 100%;
    }
    .page-contact__form {
        padding: 30px;
    }
}

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

    .page-contact__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Override desktop padding-top for hero */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-contact__hero-image-main {
        border-radius: 4px;
        max-height: 400px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-contact__main-title {
        font-size: 32px;
    }

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

    .page-contact__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-contact__section-title {
        font-size: 26px;
    }

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

    .page-contact__methods-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-contact__method-card {
        padding: 20px;
    }

    .page-contact__form-wrapper {
        gap: 20px;
    }

    .page-contact__form {
        padding: 25px;
    }

    .page-contact__form-label {
        font-size: 15px;
    }

    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 10px 12px;
        font-size: 15px;
    }

    .page-contact__form-submit-button {
        font-size: 16px;
        padding: 12px 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-contact__social-links {
        flex-direction: column;
        gap: 20px;
    }
    .page-contact__social-icon-link {
        min-width: unset;
        width: 100%; /* Take full width on mobile */
    }

    .page-contact__social-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* General image responsiveness */
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-contact__section,
    .page-contact__card,
    .page-contact__container,
    .page-contact__form-wrapper,
    .page-contact__social-links {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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