/* style/contact.css */

/* Base styles for the page content */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Body background from shared.css */
}

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

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

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

.page-contact__card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%; /* Ensure cards are same height in flex container */
}

.page-contact__card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.page-contact__text-center {
    text-align: center;
}

/* 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, #e0ffe0, #ffffff); /* Lighter gradient for hero */
}

.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 {
    width: 100%;
    margin-bottom: 30px;
}

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

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

.page-contact__main-heading {
    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: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-contact__cta-button,
.page-contact__btn-primary,
.page-contact__btn-secondary,
.page-contact__btn-submit {
    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; /* Ensure padding is included in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-contact__cta-button {
    background: #017439; /* Main brand color */
    color: #ffffff;
}

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

.page-contact__btn-primary {
    background: #C30808; /* Register/Login button color */
    color: #FFFFFF; /* White text for contrast */
    border: 2px solid transparent;
}

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

.page-contact__btn-secondary {
    background: #ffffff;
    color: #017439; /* Brand primary color for text */
    border: 2px solid #017439;
    margin-left: 15px;
}

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

.page-contact__btn-submit {
    background: #017439;
    color: #ffffff;
    width: auto;
    padding: 15px 50px;
}

.page-contact__btn-submit:hover {
    background: #005f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-large {
    min-width: 200px;
}

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

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

.page-contact__method-item {
    padding: 30px;
}

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

.page-contact__contact-detail {
    font-size: 18px;
    font-weight: bold;
    color: #017439;
    margin: 15px 0;
}

.page-contact__social-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.page-contact__social-list li {
    margin-bottom: 10px;
}

.page-contact__social-list a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-contact__social-list a:hover {
    text-decoration: underline;
}

/* Contact Form Section */
.page-contact__form-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* White text for contrast */
}

.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: 40px auto 0;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: #333333; /* Dark text inside form */
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    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 3px rgba(1, 116, 57, 0.2);
}

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

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

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

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

/* 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: #333333; /* Ensure text is dark on light background */
}

/* 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 bất kỳ nội dung nào */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.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;
}

/* 问题标题样式 */
.page-contact__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
    color: #333333; /* Ensure question text is dark */
}

/* 切换图标 */
.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; /* 防止图标阻止点击事件 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
    color: #017439; /* Brand color when active */
    transform: rotate(180deg); /* Rotate for minus sign */
}

/* Final CTA Section */
.page-contact__cta-final {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
}

.page-contact__cta-final .page-contact__section-title,
.page-contact__cta-final .page-contact__section-description {
    color: #ffffff;
}

.page-contact__cta-final .page-contact__btn-primary {
    margin-right: 15px; /* Space between buttons */
}

.page-contact__button-group {
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between buttons */
    flex-wrap: wrap;
    margin-top: 20px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-contact__main-heading {
        font-size: 42px;
    }
    .page-contact__section-title {
        font-size: 30px;
    }
    .page-contact__section-description {
        font-size: 16px;
    }
    .page-contact__cta-button,
    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .page-contact__btn-submit {
        padding: 12px 30px;
        font-size: 16px;
    }
    .page-contact__btn-large {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .page-contact__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header adjustment */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-contact__main-heading {
        font-size: 32px;
    }
    .page-contact__intro-text {
        font-size: 16px;
    }
    .page-contact__section-title {
        font-size: 24px;
    }
    .page-contact__section-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .page-contact__contact-methods {
        grid-template-columns: 1fr;
    }

    .page-contact__contact-form {
        padding: 20px;
    }

    .page-contact__hero-image img,
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-contact__container,
    .page-contact__hero-section,
    .page-contact__info-section,
    .page-contact__form-section,
    .page-contact__faq-section,
    .page-contact__cta-final,
    .page-contact__contact-methods,
    .page-contact__faq-list,
    .page-contact__contact-form {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Buttons responsive */
    .page-contact__cta-button,
    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .page-contact__btn-submit,
    .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;
        margin-left: 0 !important; 
        margin-right: 0 !important;
        margin-bottom: 15px !important; 
    }

    .page-contact__cta-final .page-contact__btn-primary,
    .page-contact__cta-final .page-contact__btn-secondary {
        margin-right: 0 !important;
    }

    .page-contact__button-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        flex-direction: column !important; 
        gap: 10px;
    }

    /* 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);
    }
    
    .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;
    }
}