/* Contact Page Specific Styles */

/* Mobile-first base styles */
* {
    box-sizing: border-box;
}

/* Form Container */
.contact-form-container {
    background: white;
    padding: 0 40px 40px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow: hidden;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: #3b82f6;
    outline: none;
}

.form-input.error-input {
    border-color: #ef4444;
}

.form-input.success-input {
    border-color: #10b981;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
}

.submit-button {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    display: inline;
}

.button-loader {
    display: none;
    align-items: center;
    gap: 8px;
}

.submit-button.loading .button-text {
    display: none;
}

.submit-button.loading .button-loader {
    display: flex;
}

/* Social Links Section - Inside Form */
.social-links-section {
    margin-top: 24px;
    padding-top: 20px;
}

.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.social-divider span {
    padding: 0 16px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.social-links-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
    max-width: 150px;
    transform: translateY(0);
}

.social-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.social-btn-facebook {
    background: #e7f3ff;
    color: #1877f2;
    border: 1px solid #c5dff8;
}

.social-btn-facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.social-btn-facebook:hover img {
    filter: brightness(0) invert(1);
}

.social-btn-zalo {
    background: #e6f7ff;
    color: #0068ff;
    border: 1px solid #b3e0ff;
}

.social-btn-zalo:hover {
    color: white;
    background: #0068ff;
    border-color: #0068ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}

.social-btn-phone {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.social-btn-phone:hover {
    background: #059669;
    color: white;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Contact Info */
.contact-info-container {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.info-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    font-size: 18px;
}

.info-content {
    color: #6b7280;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Social Links */
.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.social-link img {
    max-width: 100%;
    height: auto;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Social Links inside Form */
.form-social-links {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.form-social-title {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    font-weight: 500;
}

.form-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Map Container */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.map-container iframe {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* Form Messages */
#form-message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    font-weight: 500;
}

#form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

#form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

/* FAQ Section */
.faq-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    text-align: left;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 24px 20px 24px;
}

.faq-answer p {
    color: #6b7280;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-form-container {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 20px 16px;
        border-radius: 12px;
        margin: 0;
    }

    .contact-form-container h2 {
        font-size: 1.5rem;
    }

    .contact-info-container h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .info-icon {
        margin: 0 auto 12px auto;
        width: 48px;
        height: 48px;
    }

    .info-title {
        font-size: 16px;
    }

    .info-content {
        font-size: 14px;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    .map-container {
        border-radius: 12px;
    }

    .map-container iframe {
        height: 250px !important;
        min-height: 200px;
    }

    .form-input {
        padding: 10px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .form-label {
        font-size: 14px;
    }

    .submit-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Social links section - mobile */
    .social-links-section {
        margin-top: 20px;
        padding-top: 16px;
    }

    .social-divider span {
        font-size: 13px;
        padding: 0 12px;
    }

    .social-links-row {
        gap: 8px;
    }

    .social-btn {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 80px;
        flex: 1;
    }

    .social-btn img {
        width: 20px;
        height: 20px;
    }

    .social-btn svg {
        width: 18px;
        height: 18px;
    }

    /* FAQ on mobile */
    .faq-question {
        padding: 16px;
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 16px;
    }

    .faq-item.active .faq-answer {
        padding: 0 16px 16px 16px;
    }

    .faq-answer p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 16px 12px;
    }

    .contact-form-container h2 {
        font-size: 1.25rem;
    }

    .contact-info-container h2 {
        font-size: 1.25rem;
    }

    .info-item {
        padding: 12px;
    }

    .info-icon {
        width: 40px;
        height: 40px;
    }

    .info-icon svg {
        width: 20px;
        height: 20px;
    }

    .info-title {
        font-size: 15px;
    }

    .info-content {
        font-size: 13px;
        word-break: break-word;
    }

    .form-input {
        padding: 10px 12px;
    }

    .submit-button {
        padding: 12px 16px;
    }

    .map-container iframe {
        height: 200px !important;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    /* Social links section - small mobile */
    .social-links-section {
        margin-top: 16px;
        padding-top: 12px;
    }

    .social-divider span {
        font-size: 12px;
        padding: 0 10px;
    }

    .social-links-row {
        gap: 6px;
        flex-wrap: wrap;
    }

    .social-btn {
        padding: 8px 10px;
        font-size: 12px;
        min-width: 70px;
        border-radius: 8px;
    }

    .social-btn img {
        width: 18px;
        height: 18px;
    }

    .social-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Hide text on very small screens, show only icon */
    .social-btn span {
        display: none;
    }

    .social-btn {
        padding: 10px 14px;
        min-width: auto;
    }

    .social-btn img,
    .social-btn svg {
        width: 22px;
        height: 22px;
    }

    .faq-question {
        padding: 14px 12px;
        font-size: 13px;
    }

    .faq-icon {
        width: 20px;
        height: 20px;
    }
}

/* Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form-container,
.contact-info-container {
    animation: slideInUp 0.6s ease-out;
}
