/* style/contact.css */

/* Base styles for the contact page */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--secondary-color, #FFFFFF); /* Ensures light background */
}

/* Section common styles */
.page-contact__section-description {
    max-width: 800px;
    margin: 15px auto 40px auto;
    text-align: center;
    font-size: 1.1em;
    color: #555555;
}

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

.page-contact h1,
.page-contact h2 {
    color: var(--primary-color, #017439);
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.page-contact h1 {
    font-size: 2.8em;
    margin-top: 20px;
    line-height: 1.2;
}

.page-contact h2 {
    font-size: 2.2em;
    padding-top: 40px;
    margin-bottom: 20px;
}

.page-contact h3 {
    color: #017439;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.page-contact a {
    color: #017439;
    text-decoration: none;
}

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

/* 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); /* Fixed header spacing */
    background: linear-gradient(135deg, #e0f2f1, #ffffff); /* Light gradient background */
    overflow: hidden; /* Ensure content doesn't 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;
}

.page-contact__hero-image {
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

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

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

.page-contact__hero-content h1 {
    color: #017439;
    margin-bottom: 20px;
    font-size: 3em;
}

.page-contact__hero-content p {
    font-size: 1.2em;
    color: #444444;
    margin-bottom: 30px;
}

.page-contact__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color, #017439);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__cta-button:hover {
    background: #005a2e; /* Slightly darker green */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Contact Options Section */
.page-contact__options-section {
    padding: 80px 0;
    background-color: var(--secondary-color, #FFFFFF); /* Light background */
}

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

.page-contact__option-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%; /* Ensure cards are same height */
    box-sizing: border-box;
}

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

.page-contact__option-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    min-width: 200px; /* Minimum image size */
    min-height: 200px; /* Minimum image size */
}

.page-contact__option-card h3 {
    color: #017439;
    margin-top: 0;
    margin-bottom: 15px;
}

.page-contact__option-card p {
    color: #555555;
    font-size: 0.95em;
    flex-grow: 1; /* Allow paragraph to take available space */
    margin-bottom: 20px;
}

.page-contact__option-card .page-contact__email-link,
.page-contact__option-card .page-contact__phone-link {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #017439;
}

.page-contact__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color, #017439);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-primary:hover {
    background: #005a2e;
}

.page-contact__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: #ffffff;
    color: #017439;
    text-decoration: none;
    border: 2px solid #017439;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
}

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

.page-contact__social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #017439;
    color: #ffffff;
    font-size: 1.2em;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-weight: bold;
    text-indent: -9999px; /* Hide text, use aria-label for accessibility */
    overflow: hidden;
    position: relative;
}

.page-contact__social-icon::before {
    content: attr(aria-label); /* Use aria-label content for visual */
    text-indent: 0;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 16px; /* Adjust font size as needed */
    font-weight: bold;
}

.page-contact__social-icon:hover {
    background: #005a2e;
}

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

.page-contact__form-section h2 {
    color: #ffffff;
}

.page-contact__form-section .page-contact__section-description {
    color: #f0f0f0;
}

.page-contact__form {
    max-width: 600px;
    margin: 40px auto 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

.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;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.page-contact__form button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: #C30808; /* Specific color for submit button */
    color: #FFFF00; /* Specific font color */
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__form button[type="submit"]:hover {
    background: #a30606; /* Darker red */
}

/* FAQ Section */
.page-contact__faq-section {
    padding: 80px 0;
    background-color: var(--secondary-color, #FFFFFF); /* Light background */
}

.page-contact__faq-list {
    max-width: 900px;
    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 20px; /* Adjusted for consistency */
    opacity: 0;
}

/* 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 !important; /* Adjusted for consistency */
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #333333; /* Ensure text is dark on light background */
}

/* 问题样式 */
.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 it's above answer during transition */
}

.page-contact__faq-item.active .page-contact__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.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: #017439; /* Ensure good contrast */
}

/* 切换图标 */
.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: #333;
    transform: rotate(45deg); /* Change to X when active */
}

/* Location Section */
.page-contact__location-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* Light text */
    text-align: center;
}

.page-contact__location-section h2 {
    color: #ffffff;
}

.page-contact__location-section .page-contact__section-description {
    color: #f0f0f0;
    margin-bottom: 40px;
}

.page-contact__location-section img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-top: 30px;
    min-width: 200px; /* Minimum image size */
    min-height: 200px; /* Minimum image size */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-contact__hero-content h1 {
        font-size: 2.5em;
    }
    .page-contact h2 {
        font-size: 2em;
    }
    .page-contact h3 {
        font-size: 1.3em;
    }
}

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

    .page-contact__hero-content h1 {
        font-size: 2em;
        line-height: 1.3;
    }

    .page-contact__hero-content p {
        font-size: 1em;
    }
}