/* ══════════════════════════════════════════════════════════════
   CONTACT FORM SECTION – Đăng ký tư vấn
   ══════════════════════════════════════════════════════════════ */

.contact {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    padding-block: var(--space-3xl);
}

/* ── 2-column layout (flex) ── */
.contact__container {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 8rem;
    align-items: stretch;
    z-index: 3;
}

.contact__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
}

.contact__text-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ═══════════════════════════════════════════
   LEFT COLUMN – info
   ═══════════════════════════════════════════ */


/* ── Title ── */
.contact__title {
    font-size: clamp(3.2rem, 5vw, 4.8rem);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ── Description ── */
.contact__desc {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    line-height: 1.75;
    margin: 0;
    max-width: 40rem;
}

/* ── Contact block ── */
.contact__contact-block {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    margin-top: 0;
}

.contact__contact-label {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin: 0;
}

.contact__contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact__contact-type {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.contact__contact-value {
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact__contact-value:hover {
    color: var(--color-primary);
}

/* ── Decorative wave image (bottom of section, full width) ── */
.contact__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    z-index: 0;
    display: block;
    z-index: 0;
}

/* ═══════════════════════════════════════════
   RIGHT COLUMN – form card
   ═══════════════════════════════════════════ */
.contact__form-wrap {
    flex: 1;
    min-width: 0;
    background: #EBF1FF;
    border-radius: 2rem;
    padding: 3.6rem;
}

/* ── Form ── */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── Field wrapper ── */
.contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* ── Label row (icon + text) ── */
.contact-form__label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    user-select: none;
}

.contact-form__icon {
    width: 1.7rem;
    height: 1.7rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-form__required {
    color: #e53e3e;
    font-size: 1.4rem;
    line-height: 1;
    margin-left: 0.1rem;
}

/* ── Text / Tel inputs ── */
.contact-form__input {
    width: 100%;
    padding: 1.3rem 1.6rem;
    border-radius: 1rem;
    border: 1.5px solid transparent;
    background: #ffffff;
    font-family: var(--font-family);
    font-size: 1.4rem;
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04);
}

.contact-form__input::placeholder {
    color: #aab4c8;
}

.contact-form__input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(12, 94, 255, 0.12);
}

/* ── Select wrapper ── */
.contact-form__select-wrap {
    position: relative;
}

/* ── Select ── */
.contact-form__select {
    width: 100%;
    padding: 1.3rem 4rem 1.3rem 1.6rem;
    border-radius: 1rem;
    border: 1.5px solid transparent;
    background: #ffffff;
    font-family: var(--font-family);
    font-size: 1.4rem;
    color: var(--color-text-primary);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04);
}

.contact-form__select:invalid,
.contact-form__select option[value=""] {
    color: var(--color-primary-dark);
}

.contact-form__select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(12, 94, 255, 0.12);
}

/* ── Custom chevron for select ── */
.contact-form__chevron {
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    color: #8898aa;
    pointer-events: none;
}

/* ── Textarea ── */
.contact-form__textarea {
    width: 100%;
    padding: 1.3rem 1.6rem;
    border-radius: 1rem;
    border: 1.5px solid transparent;
    background: #ffffff;
    font-family: var(--font-family);
    font-size: 1.4rem;
    color: var(--color-text-primary);
    outline: none;
    resize: vertical;
    min-height: 11rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04);
    line-height: 1.6;
}

.contact-form__textarea::placeholder {
    color: #aab4c8;
}

.contact-form__textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(12, 94, 255, 0.12);
}

/* ── Submit button ── */
.contact-form__submit {
    width: 100%;
    padding: 1.6rem;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    border: none;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.22s ease, transform 0.2s ease, box-shadow 0.22s ease;
    box-shadow: 0 0.4rem 1.6rem rgba(12, 94, 255, 0.3);
    margin-top: 0.4rem;
    letter-spacing: 0.01em;
}

.contact-form__submit:hover {
    background: var(--color-primary-dark);
    transform: translateY(-0.2rem);
    box-shadow: 0 0.8rem 2.8rem rgba(12, 94, 255, 0.4);
}

.contact-form__submit:active {
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE: TABLET (≤ 900px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .contact__container {
        flex-direction: column;
        gap: 4rem;
    }

    .contact__info {
        flex: none;
        width: 100%;
        justify-content: flex-start;
        gap: 2rem;
        padding-bottom: 0;
    }

    .contact__text-group {
        gap: 1.6rem;
    }

    /* Form chiếm full width khi stack dọc */
    .contact__form-wrap {
        width: 100%;
        flex: none;
    }

    .contact__wave {
        display: none;
    }

    .contact__desc {
        max-width: 100%;
    }

    .contact__contact-block {
        margin-top: 2rem;
    }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE: MOBILE (≤ 576px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .contact {
        padding-block: var(--space-2xl);
    }

    .contact__title {
        font-size: 2.8rem;
    }

    .contact__container {
        gap: 3rem;
    }

    .contact__form-wrap {
        width: 100%;
        padding: 2.4rem 2rem;
        border-radius: 1.6rem;
    }

    .contact-form {
        gap: 1.6rem;
    }

    .contact-form__submit {
        font-size: 1.5rem;
        padding: 1.4rem;
    }
}
/* ══════════════════════════════════════════════════════════════
   CUSTOM MULTI-SELECT WITH TAGS
   ══════════════════════════════════════════════════════════════ */
.ms-wrap {
    position: relative;
    background: #ffffff;
    border-radius: 1rem;
    border: 1.5px solid transparent;
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04);
    min-height: 4.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: flex-start;
    padding: 0.8rem 4rem 0.8rem 1.2rem;
    user-select: none;
}
.ms-wrap:focus, .ms-wrap.ms-open {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(12, 94, 255, 0.12);
    outline: none;
}
.ms-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    flex: 1;
    align-items: center;
    min-height: 3rem;
}
.ms-placeholder {
    font-size: 1.4rem;
    color: #aab4c8;
    line-height: 1;
    padding: 0.3rem 0;
}
.ms-chevron {
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    color: #8898aa;
    pointer-events: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.ms-wrap.ms-open .ms-chevron {
    transform: translateY(-50%) rotate(180deg);
}
.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(12, 94, 255, 0.1);
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem 0.35rem 0.9rem;
    border-radius: 10rem;
    line-height: 1;
    white-space: nowrap;
}
.ms-tag__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(12, 94, 255, 0.25);
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.ms-tag__remove:hover {
    background: rgba(12, 94, 255, 0.55);
    color: #fff;
}
.ms-tag__remove svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2.5;
}
.ms-dropdown {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 1rem;
    border: 1.5px solid rgba(12, 94, 255, 0.15);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    z-index: 200;
    display: none;
    max-height: 22rem;
    overflow-y: auto;
}
.ms-wrap.ms-open .ms-dropdown {
    display: block;
}
.ms-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    font-size: 1.4rem;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}
.ms-option:hover { background: rgba(12, 94, 255, 0.06); }
.ms-option[aria-selected="true"] { background: rgba(12, 94, 255, 0.06); }
.ms-checkbox {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.4rem;
    border: 1.5px solid #c8d3e8;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.ms-option[aria-selected="true"] .ms-checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.ms-option[aria-selected="true"] .ms-checkbox::after {
    content: '';
    display: block;
    width: 0.55rem;
    height: 0.95rem;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-0.05rem, -0.1rem);
}
