/* style/contact.css */
/* Base styles for the contact page */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: #FFFFFF; /* Explicitly set for clarity */
}

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

/* Hero Section */
.page-contact__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #017439, #005a2e); /* Darker gradient for brand color */
    color: #ffffff;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

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

.page-contact__hero-title {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
    color: #FFFF00; /* Use specific font color for login/register for main title for prominence */
}

.page-contact__hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ffffff;
}

.page-contact__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

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

.page-contact__commitment-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.page-contact__commitment-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

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

.page-contact__commitment-subtitle {
    font-size: 20px;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

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

/* Section Titles and Descriptions */
.page-contact__section-title {
    font-size: 32px;
    font-weight: bold;
    color: #017439;
    text-align: center;
    margin-bottom: 15px;
    margin-top: 60px;
}

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

/* Contact Methods Section */
.page-contact__contact-methods {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

.page-contact__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;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 480px; /* Ensure cards have similar height */
}

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

.page-contact__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
}

.page-contact__card-title {
    font-size: 22px;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-contact__card-text {
    font-size: 16px;
    color: #555555;
    margin-bottom: 25px;
    flex-grow: 1; /* Allow text to grow and push button to bottom */
}

/* Contact Form Section */
.page-contact__contact-form {
    padding: 60px 0;
    background-color: #ffffff;
}

.page-contact__form {
    max-width: 700px;
    margin: 40px auto 0 auto;
    background: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.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;
    transition: border-color 0.3s ease;
}

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

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

/* Buttons */
.page-contact__btn-primary {
    display: inline-block;
    padding: 14px 30px;
    background: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 17px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal; /* For mobile text wrapping */
    word-wrap: break-word; /* For mobile text wrapping */
}

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

.page-contact__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    background: #FFFFFF;
    color: #017439;
    text-decoration: none;
    border-radius: 5px;
    font-size: 17px;
    font-weight: bold;
    border: 2px solid #017439;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal; /* For mobile text wrapping */
    word-wrap: break-word; /* For mobile text wrapping */
}

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

/* FAQ Section */
.page-contact__faq-section {
    padding: 60px 0 80px 0;
    background-color: #f0f0f0;
}

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

/* FAQ容器样式 */
.page-contact__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px 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 15px;
    opacity: 0;
    color: #555555;
    background: #ffffff;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể 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 15px !important;
    opacity: 1;
    background: #ffffff;
    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;
}

.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;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click events */
    color: #017439;
}

/* Toggle icon */
.page-contact__faq-toggle {
    font-size: 28px; /* Slightly larger for better visibility */
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Use brand 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 events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Slightly larger click area */
    height: 32px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
    color: #C30808; /* Change color when active */
    transform: rotate(45deg); /* Rotate for 'x' effect from '+' */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-contact__hero-title {
        font-size: 38px;
    }
    .page-contact__hero-description {
        font-size: 17px;
    }
    .page-contact__section-title {
        font-size: 28px;
    }
    .page-contact__section-description {
        font-size: 16px;
    }
    .page-contact__card-title {
        font-size: 20px;
    }
    .page-contact__card-text {
        font-size: 15px;
    }
    .page-contact__form {
        padding: 30px;
    }
    .page-contact__card {
        min-height: 450px;
    }
}

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

    .page-contact__hero-section {
        padding: 60px 20px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        min-height: 300px;
    }
    .page-contact__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-contact__hero-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    .page-contact__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-contact__contact-methods {
        padding: 40px 0;
    }
    .page-contact__methods-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-contact__card {
        padding: 20px;
        min-height: auto;
    }
    .page-contact__card-image {
        height: 180px;
    }

    .page-contact__contact-form {
        padding: 40px 0;
    }
    .page-contact__form {
        padding: 25px;
        margin: 30px auto 0 auto;
    }
    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 10px 12px;
        font-size: 15px;
    }

    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .page-contact a[class*="button"],
    .page-contact a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-contact__hero-cta-buttons,
    .page-contact__button-group,
    .page-contact__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-contact__hero-cta-buttons {
        display: flex;
        flex-direction: column;
    }

    /* Images responsiveness */
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-contact__section,
    .page-contact__card,
    .page-contact__container {
        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: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-contact__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-contact__faq-answer {
        padding: 0 15px;
    }
    .page-contact__faq-item.active .page-contact__faq-answer {
        padding: 15px !important;
    }
}