/**
 * CONTACT PAGE CSS - Sàn Hội Sở
 * Real Estate Website — DXMT Brand
 */

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 70px 0 90px;
    background: #f5f7fa;
}

.contact-inner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 767.98px) {
    .contact-inner-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SHARED CARD BASE
   ========================================================================== */
.contact-form-card,
.contact-info-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(26, 80, 145, 0.08);
    height: 100%;
    overflow: hidden;
}

/* ==========================================================================
   CONTACT FORM CARD
   ========================================================================== */
.contact-form-card {
    padding: 44px 40px;
    animation: fadeInLeft 0.7s ease-out both;
}

/* Form header accent bar */
.contact-form-card::before {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--dxmt-accent, #e8811c);
    border-radius: 4px;
    margin-bottom: 28px;
}

/* Labels */
.contact-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e2a3a;
    margin-bottom: 7px;
    letter-spacing: 0.02em;
}

/* Inputs & Textarea */
.contact-form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e0e5ee;
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--tg-body-font-family, 'Inter', sans-serif);
    color: #1e2a3a;
    background: #f8fafd;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    outline: none;
    -webkit-appearance: none;
}

.contact-form-control::placeholder {
    color: #a0aab8;
}

.contact-form-control:focus {
    border-color: var(--tg-primary-color, #1a5091);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 80, 145, 0.1);
}

.contact-form-control.is-invalid {
    border-color: #e05252;
    background: #fff8f8;
}

.contact-textarea {
    min-height: 140px;
    resize: vertical;
}

/* Field error */
.field-error {
    display: block;
    font-size: 11px;
    color: #e05252;
    margin-top: 5px;
}

/* Submit Button */
.btn-contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 15px 32px;
    background: var(--tg-primary-color, #1a5091);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-family: var(--tg-body-font-family, 'Inter', sans-serif);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.22s ease, box-shadow 0.22s ease;
    letter-spacing: 0.01em;
}

.btn-contact-submit:hover {
    background: var(--dxmt-accent, #e8811c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 129, 28, 0.3);
}

.btn-contact-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alert messages */
.contact-alert {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}
.contact-alert.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.contact-alert.alert-danger {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   CONTACT INFO CARD
   ========================================================================== */
.contact-info-card {
    animation: fadeInRight 0.7s ease-out 0.15s both;
    display: flex;
    flex-direction: column;
}

/* Navy header block */
.contact-info-card::before {
    content: 'Thông tin liên hệ';
    display: block;
    background: linear-gradient(135deg, #1a5091 0%, #0d3464 100%);
    color: #ffffff;
    font-family: var(--tg-heading-font-family, 'Montserrat', sans-serif);
    font-size: 16px;
    font-weight: 700;
    padding: 24px 32px;
    letter-spacing: 0.01em;
}

/* Items wrapper */
.contact-info-card > .contact-item,
.contact-info-card > .contact-social {
    margin-left: 0;
    margin-right: 0;
}

/* Contact Items */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 32px;
    border-bottom: 1px solid #f0f3f8;
    transition: background 0.22s ease;
}

.contact-item:hover {
    background: #f8fafd;
}

.contact-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a5091, #3fa9f5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(26, 80, 145, 0.2);
    margin-top: 2px;
}

.contact-text {
    flex: 1;
}

.contact-text h5 {
    font-family: var(--tg-heading-font-family, 'Montserrat', sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--tg-primary-color, #1a5091);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.contact-text p {
    font-size: 14px;
    color: #444;
    line-height: 1.65;
    margin: 0;
}

.contact-text a {
    color: #1e2a3a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.22s ease;
}

.contact-text a:hover {
    color: var(--dxmt-accent, #e8811c);
}

/* Social block */
.contact-social {
    padding: 22px 32px 28px;
    margin-top: auto;
    background: #f8fafd;
}

.contact-social h5 {
    font-family: var(--tg-heading-font-family, 'Montserrat', sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--tg-primary-color, #1a5091);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    width: 42px;
    height: 42px;
    background: var(--tg-primary-color, #1a5091);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.25s ease, transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow: 0 3px 10px rgba(26, 80, 145, 0.18);
}

.social-link:hover {
    background: var(--dxmt-accent, #e8811c);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(232, 129, 28, 0.3);
}

.social-link svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

/* ==========================================================================
   MAP SECTION
   ========================================================================== */
.map-section {
    animation: fadeInUp 0.7s ease-out 0.4s both;
}

.map-section iframe,
.map-content,
.map-content iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991.98px) {
    .contact-section {
        padding: 55px 0 65px;
    }
    .contact-form-card {
        padding: 32px 28px;
    }
    .contact-info-card::before {
        padding: 20px 24px;
    }
    .contact-item {
        padding: 18px 24px;
    }
    .contact-social {
        padding: 18px 24px 22px;
    }
}

@media (max-width: 767.98px) {
    .contact-section {
        padding: 40px 0 50px;
    }
    .contact-form-card {
        padding: 26px 20px;
    }
    .contact-form-card::before {
        margin-bottom: 22px;
    }
    .contact-info-card::before {
        padding: 18px 20px;
        font-size: 15px;
    }
    .contact-item {
        padding: 15px 20px;
        gap: 12px;
    }
    .contact-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 15px;
    }
    .contact-text p {
        font-size: 13px;
    }
    .contact-social {
        padding: 16px 20px 20px;
    }
    .map-section iframe,
    .map-content,
    .map-content iframe {
        height: 300px;
    }
    .btn-contact-submit {
        padding: 13px 24px;
        font-size: 14px;
    }
}
