/* style/contact.css */

/* Base styles for the contact page content */
.page-contact {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: var(--background-color, #ffffff); /* Use shared background, default to white */
}

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

.page-contact__section-title {
    font-size: 36px;
    color: #26A9E0; /* Primary brand color */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

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

/* 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 for fixed header */
    background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
    overflow: hidden; /* Prevent 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;
    z-index: 1; /* Ensure content is above any potential background elements */
}

.page-contact__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-height: 675px; /* Limit height for aesthetic reasons */
    overflow: hidden;
}

.page-contact__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.1);
}

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

.page-contact__main-title {
    font-size: 48px;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
}

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

.page-contact__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__cta-button:hover {
    background: #1e87c0; /* Darker shade for hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Contact Info Section */
.page-contact__info-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Light background */
    color: #333333;
}

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

.page-contact__method-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    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;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 450px; /* Ensure cards have similar height */
}

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

.page-contact__method-card img {
    width: 200px; /* Min size for images */
    height: 200px; /* Min size for images */
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 50%; /* Example: circular images */
    object-fit: cover;
    border: 3px solid #26A9E0; /* Brand color border */
}

.page-contact__method-title {
    font-size: 24px;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-contact__method-description {
    font-size: 16px;
    color: #555555;
    margin-bottom: 25px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-contact__email-link,
.page-contact__phone-link {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
}

.page-contact__email-link:hover,
.page-contact__phone-link:hover {
    text-decoration: underline;
}

.page-contact__btn-primary,
.page-contact__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    margin-top: auto; /* Push buttons to the bottom of the card */
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-primary {
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
}

.page-contact__btn-primary:hover {
    background: #1e87c0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-contact__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border-color: #26A9E0;
}

.page-contact__btn-secondary:hover {
    background: #e0f2f7; /* Light background for hover */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Contact Form Section */
.page-contact__form-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Primary brand color as background */
    color: #ffffff; /* White text for dark background */
}

.page-contact__form-section .page-contact__section-title,
.page-contact__form-section .page-contact__section-description {
    color: #ffffff;
}

.page-contact__contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white background */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.page-contact__form-textarea {
    resize: vertical;
    min-height: 120px;
}

.page-contact__form-submit-button {
    width: 100%;
    padding: 15px 30px;
    background: #EA7C07; /* Login color */
    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, box-shadow 0.3s ease;
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__form-submit-button:hover {
    background: #c56506; /* Darker shade for hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Commitment Section */
.page-contact__commitment-section {
    padding: 80px 0;
    background-color: #ffffff; /* White background */
    color: #333333;
}

.page-contact__commitment-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-contact__commitment-item {
    text-align: center;
    padding: 25px;
    border-radius: 8px;
    background: #f0f8ff; /* Light blue background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.page-contact__commitment-item img {
    width: 200px; /* Enforce minimum size */
    height: 200px; /* Enforce minimum size */
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #26A9E0;
}

.page-contact__commitment-item h3 {
    font-size: 22px;
    color: #26A9E0;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-contact__commitment-item p {
    font-size: 15px;
    color: #555555;
}

/* FAQ Section */
.page-contact__faq-section {
    padding: 80px 0;
    background-color: #f2faff; /* Very light blue background */
    color: #333333;
}

.page-contact__faq-list {
    max-width: 800px;
    margin: 50px auto 0 auto;
}

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

/* FAQ默认状态 - 答案隐藏 */
.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 for consistency */
    opacity: 0;
    color: #555555;
    font-size: 16px;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo mở rộng */
.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 for consistency */
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Question style */
.page-contact__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;
    z-index: 1; /* Ensure question is above answer for hover effects */
}

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

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

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

/* 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;
    border-radius: 50%;
    background: #e0f2f7;
    color: #26A9E0;
}

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


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-contact__hero-image img {
        height: 500px;
    }
    .page-contact__main-title {
        font-size: 42px;
    }
    .page-contact__section-title {
        font-size: 32px;
    }
    .page-contact__section-description {
        font-size: 17px;
    }
    .page-contact__commitment-item img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-contact {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-contact__container {
        padding: 0 15px;
    }

    /* Hero Section */
    .page-contact__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific padding */
        padding-bottom: 40px;
    }
    .page-contact__hero-image {
        margin-bottom: 20px;
    }
    .page-contact__hero-image img {
        border-radius: 4px;
        height: auto; /* Allow image to scale freely */
        max-width: 100% !important;
        width: 100% !important;
    }
    .page-contact__main-title {
        font-size: 32px;
        margin-bottom: 10px;
    }
    .page-contact__intro-description {
        font-size: 17px;
        margin-bottom: 25px;
    }
    .page-contact__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General Section Padding */
    .page-contact__info-section,
    .page-contact__form-section,
    .page-contact__commitment-section,
    .page-contact__faq-section {
        padding: 40px 0;
    }
    .page-contact__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    .page-contact__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Contact Methods */
    .page-contact__contact-methods {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-contact__method-card {
        padding: 20px;
        min-height: auto;
    }
    .page-contact__method-card img {
        width: 200px;
        height: 200px;
        min-width: 200px; /* Ensure min image size */
        min-height: 200px; /* Ensure min image size */
        margin-bottom: 15px;
    }
    .page-contact__method-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .page-contact__method-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    .page-contact__btn-primary,
    .page-contact__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Contact Form */
    .page-contact__contact-form {
        padding: 25px;
    }
    .page-contact__form-group {
        margin-bottom: 20px;
    }
    .page-contact__form-label {
        font-size: 15px;
        margin-bottom: 5px;
    }
    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 12px;
        font-size: 15px;
    }
    .page-contact__form-submit-button {
        padding: 12px 20px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Commitment Section */
    .page-contact__commitment-points {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-contact__commitment-item img {
        width: 200px;
        height: 200px;
        min-width: 200px; /* Ensure min image size */
        min-height: 200px; /* Ensure min image size */
    }
    .page-contact__commitment-item h3 {
        font-size: 20px;
    }
    .page-contact__commitment-item p {
        font-size: 14px;
    }

    /* FAQ Section */
    .page-contact__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-contact__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .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;
    }
    
    /* Global image rules for mobile */
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-contact__section,
    .page-contact__card,
    .page-contact__container,
    .page-contact__contact-form,
    .page-contact__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Color contrast adjustments for specific backgrounds */
.page-contact__dark-bg {
    color: #ffffff; /* White text on primary brand color background */
}
.page-contact__light-bg {
    color: #333333; /* Dark text on light background */
}

/* Ensure all images adhere to min size requirements */
.page-contact img {
    min-width: 200px; /* Enforce minimum width */
    min-height: 200px; /* Enforce minimum height */
    object-fit: cover; /* Ensure images fill their space without distortion */
}