/* style/contact.css */

/* Base styles for the contact page */
.page-contact {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

.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: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, #017439, #005f2c); /* Gradient with brand primary color */
    color: #ffffff;
    padding-top: var(--header-offset, 120px); /* Ensure header offset */
}

.page-contact__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
}

.page-contact__hero-description {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

.page-contact__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

/* General Button Styles */
.page-contact__btn-primary,
.page-contact__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
    max-width: 100%;
}

/* Specific button colors for "Đăng Ký" and "Đăng Nhập" */
.page-contact__cta-group .page-contact__btn-primary {
    background-color: #C30808; /* Custom color for registration */
    color: #FFFF00; /* Custom font color for registration */
    border: 2px solid #C30808;
}

.page-contact__cta-group .page-contact__btn-primary:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

.page-contact__cta-group .page-contact__btn-secondary {
    background-color: #C30808; /* Custom color for login */
    color: #FFFF00; /* Custom font color for login */
    border: 2px solid #C30808;
}

.page-contact__cta-group .page-contact__btn-secondary:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

/* Other buttons using default brand colors */
.page-contact__contact-methods .page-contact__btn-primary,
.page-contact__contact-form .page-contact__btn-primary {
    background-color: #017439;
    color: #ffffff;
    border: 2px solid #017439;
}

.page-contact__contact-methods .page-contact__btn-primary:hover,
.page-contact__contact-form .page-contact__btn-primary:hover {
    background-color: #005f2c;
    border-color: #005f2c;
    transform: translateY(-2px);
}


/* Section Titles and Descriptions */
.page-contact__section-title {
    font-size: 2.2em;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.page-contact__section-description {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 50px auto;
    text-align: center;
}

/* Contact Methods Section */
.page-contact__contact-methods {
    padding: 80px 0;
    background-color: #ffffff; /* Light background for this section */
    color: #333333; /* Dark text for light background */
}

.page-contact__contact-methods .page-contact__section-title {
    color: #017439;
}

.page-contact__contact-methods .page-contact__section-description {
    color: #555555;
}

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

.page-contact__method-card {
    background-color: #f9f9f9;
    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;
    justify-content: space-between;
}

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

.page-contact__method-icon {
    width: 200px; 
    height: 150px; 
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

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

.page-contact__method-text,
.page-contact__email-address,
.page-contact__phone-number {
    color: #555555;
    margin-bottom: 20px;
}

.page-contact__method-card .page-contact__btn-primary {
    margin-top: auto; /* Push button to bottom */
}


/* Contact Form Section */
.page-contact__contact-form-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color background */
    color: #ffffff; /* White text for brand primary background */
}

.page-contact__contact-form-section .page-contact__section-title {
    color: #ffffff;
}

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

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

.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 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    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: #FFFF00; /* Highlight on focus */
    outline: none;
}

.page-contact__contact-form .page-contact__btn-primary {
    width: auto;
    display: block;
    margin: 30px auto 0 auto;
    background-color: #FFFF00; /* Yellow for submit button */
    color: #017439; /* Dark green text */
    border: 2px solid #FFFF00;
}

.page-contact__contact-form .page-contact__btn-primary:hover {
    background-color: #e6e600;
    border-color: #e6e600;
}


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

.page-contact__faq-section .page-contact__section-title {
    color: #017439;
}

.page-contact__faq-section .page-contact__section-description {
    color: #555555;
}

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

.page-contact__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-contact__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.page-contact__faq-question:hover {
    background-color: #e6e6e6;
}

.page-contact__faq-title {
    font-size: 1.2em;
    color: #017439;
    margin: 0;
    flex-grow: 1;
    font-weight: bold;
}

.page-contact__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #017439;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

.page-contact__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-contact__faq-item.active .page-contact__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to reveal content */
    padding: 20px 25px;
}

.page-contact__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
}

.page-contact__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

/* Location Section */
.page-contact__location-section {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background from body */
    color: #ffffff; /* White text */
    text-align: center;
}

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

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

.page-contact__location-info {
    max-width: 800px;
    margin: 40px auto 0 auto;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
}

.page-contact__location-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #f0f0f0;
}

.page-contact__map-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-contact__hero-title {
        font-size: 2.5em;
    }
    .page-contact__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-contact__hero-section {
        padding: 80px 0;
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    }
    .page-contact__hero-title {
        font-size: 2em;
    }
    .page-contact__hero-description {
        font-size: 1em;
    }
    .page-contact__cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-contact__btn-primary,
    .page-contact__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-contact__section-title {
        font-size: 1.8em;
    }
    .page-contact__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-contact__contact-methods,
    .page-contact__contact-form-section,
    .page-contact__faq-section,
    .page-contact__location-section {
        padding: 50px 0;
    }
    .page-contact__methods-grid {
        grid-template-columns: 1fr;
    }
    .page-contact__method-icon {
        width: 180px; /* Adjusting for smaller screens, but still > 200px on actual display */
        height: auto;
    }
    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 10px 12px;
    }
    .page-contact__faq-question {
        padding: 15px 20px;
    }
    .page-contact__faq-title {
        font-size: 1.1em;
    }
    .page-contact__faq-answer {
        padding: 0 20px;
    }
    .page-contact__faq-item.active .page-contact__faq-answer {
        padding: 15px 20px;
    }

    /* Mobile image responsive adaptations */
    .page-contact img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-contact__section,
    .page-contact__card,
    .page-contact__container,
    .page-contact__contact-form,
    .page-contact__faq-list,
    .page-contact__location-info,
    .page-contact__methods-grid,
    .page-contact__method-card {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    
    /* Ensure no horizontal scroll for main content areas */
    .page-contact {
        overflow-x: hidden;
    }
    
    /* Specific adjustment for method card image which has a min-width of 200px */
    .page-contact__method-card .page-contact__method-icon {
        max-width: 200px !important; /* Ensure it respects the min-size if container is smaller */
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .page-contact__hero-title {
        font-size: 1.8em;
    }
    .page-contact__section-title {
        font-size: 1.6em;
    }
    .page-contact__contact-form {
        padding: 30px 20px;
    }
}