/* ==========================================================================
   COMPONENT: CTA FORM / ĐĂNG KÝ NHẬN TƯ VẤN TRỰC TIẾP
   Path: carbon-block/templates/components/cta-form-block/style.css
   ========================================================================== */

.cta-form {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #2D2824;
    min-height: 380px;
    display: flex;
    align-items: center;
}

/* Đảm bảo khối tràn viền toàn màn hình */
.cta-form.crb-block-fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    box-sizing: border-box !important;
    clear: both !important;
}

/* BACKGROUND IMAGE & OVERLAY TRÀN TOÀN MÀN HÌNH */
.cta-form__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cta-form__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cta-form__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
}

/* CONTAINER TỐI ƯU KÍCH THƯỚC TOÀN KHUNG */
.cta-form__container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--container-max-w, 1200px);
    margin: 0 auto;
    padding: 60px 20px;
    box-sizing: border-box;
}

/* DẠNG 1: LAYOUT 2 CỘT CHO FORM NGẮN */
.cta-form__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(30px, 5vw, 80px);
    width: 100%;
}

/* CỘT TRÁI: TIÊU ĐỀ & MÔ TẢ */
.cta-form__info {
    flex: 1 1 48%;
    max-width: 520px;
    box-sizing: border-box;
}

.cta-form__title {
    color: #FFFFFF;
    font-family: var(--font-heading, 'Nunito Sans', sans-serif);
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.5px;
    margin: 0 0 14px 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cta-form__desc {
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    margin: 0;
    max-width: 480px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* CỘT PHẢI: FORM NHẬP THÔNG TIN */
.cta-form__form-wrap {
    flex: 1 1 50%;
    max-width: 520px;
    width: 100%;
    box-sizing: border-box;
}

.cta-form__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.cta-form__group {
    width: 100%;
}

.cta-form__input {
    width: 100%;
    background-color: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 15px;
    color: #1E293B;
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-form__input::placeholder {
    color: #8E9BA7;
    opacity: 1;
}

.cta-form__input:focus {
    border-color: var(--color-primary-second, #456967);
    box-shadow: 0 0 0 3px rgba(69, 105, 103, 0.25);
}

.cta-form__action {
    margin-top: 6px;
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

/* NÚT SUBMIT / ACTION */
.cta-form__submit {
    background-color: var(--color-primary-second, #456967);
    color: #FFFFFF;
    border: none;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.cta-form__submit:hover {
    background-color: #375351;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
}

.cta-form__btn-text {
    display: inline-block;
    line-height: 1;
}

.cta-form__btn-arrow {
    display: inline-block;
    line-height: 1;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.cta-form__submit:hover .cta-form__btn-arrow {
    transform: translateX(4px);
}

/* THÔNG BÁO FEEDBACK */
.cta-form__feedback {
    margin-top: 12px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 6px;
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

.cta-form__feedback--success {
    background-color: rgba(46, 125, 50, 0.95);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.cta-form__feedback--error {
    background-color: rgba(211, 47, 47, 0.95);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.25);
}

/* DẠNG 2: BANNER NÚT BẤM CĂN GIỮA */
.cta-form__simple-wrap {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
}

.cta-form__title--center {
    text-align: center;
}

.cta-form__desc--center {
    text-align: center;
    margin: 0 auto 24px auto;
}

.cta-form__action--center {
    justify-content: center;
}

/* ==========================================================================
   DẠNG 3: FORM LIÊN HỆ ĐẦY ĐỦ (FULL CONTACT FORM 2 CỘT NỀN SÁNG)
   ========================================================================== */
.cta-form.cta-form--type-full_contact {
    background-color: #F4F6F8;
    min-height: auto;
    padding: 70px 0;
    align-items: flex-start;
}

.cta-form.cta-form--type-full_contact .cta-form__container {
    max-width: 1040px;
    padding: 0 20px;
}

.cta-form.cta-form--type-full_contact .esight-contact-form-wrap {
    width: 100%;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}

.esight-contact-form__header {
    text-align: left;
    margin-bottom: 26px;
}

.esight-contact-form__title {
    color: var(--color-primary, #189CD8);
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px 0;
    font-family: inherit;
    text-shadow: none;
}

.esight-contact-form__subtitle {
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
    text-shadow: none;
}

.esight-contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 22px;
}

.esight-contact-form__col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.esight-contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.esight-contact-form__field--full {
    height: 100%;
}

.esight-contact-form__field label {
    font-size: 14.5px;
    font-weight: 500;
    color: #333333;
    margin: 0;
    display: block;
}

.esight-contact-form__field label span {
    color: #EA5B0B;
    font-weight: 700;
    margin-left: 2px;
}

.esight-contact-form__field input,
.esight-contact-form__field textarea {
    width: 100%;
    background-color: #FFFFFF !important;
    border: 1px solid #D1D5DB !important;
    border-radius: 4px !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    color: #1F2937 !important;
    outline: none !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.esight-contact-form__field textarea {
    height: 100%;
    min-height: 232px;
    resize: vertical;
}

.esight-contact-form__field input:focus,
.esight-contact-form__field textarea:focus {
    border-color: var(--color-primary, #189CD8) !important;
    box-shadow: 0 0 0 3px rgba(24, 156, 216, 0.18) !important;
}

.esight-contact-form__consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.esight-contact-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
    font-size: 13.5px;
    color: #4B5563;
}

.esight-contact-form__checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #EA5B0B;
    cursor: pointer;
}

.esight-contact-form__action {
    text-align: center;
    margin-top: 10px;
}

.esight-contact-form__action button[type="submit"],
.esight-contact-form__action .btn-accent {
    background-color: #EA5B0B !important;
    border: 1px solid #EA5B0B !important;
    color: #FFFFFF !important;
    border-radius: 4px !important;
    padding: 13px 52px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-align: center !important;
    min-width: 160px !important;
    box-shadow: 0 2px 8px rgba(234, 91, 11, 0.28) !important;
    transition: all 0.25s ease !important;
}

.esight-contact-form__action button[type="submit"]:hover,
.esight-contact-form__action .btn-accent:hover {
    background-color: #D34B00 !important;
    border-color: #D34B00 !important;
    box-shadow: 0 4px 14px rgba(234, 91, 11, 0.4) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE (TABLET & MOBILE)
   ========================================================================== */
@media screen and (max-width: 991px) {
    .cta-form {
        min-height: auto;
    }

    .cta-form__container {
        padding: 45px 16px;
    }

    .cta-form__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
    }

    .cta-form__info,
    .cta-form__form-wrap {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .cta-form__title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .cta-form__desc {
        font-size: 15px;
    }

    .cta-form__input {
        padding: 13px 16px;
    }

    .cta-form__submit {
        width: 100%;
        padding: 14px 20px;
    }

    .cta-form.cta-form--type-full_contact {
        padding: 40px 0;
    }

    .esight-contact-form__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .esight-contact-form__field textarea {
        min-height: 150px;
    }
}

/* ==========================================================================
   DẠNG 4: CTA FORM BANNER - GET IN TOUCH (CHUẨN KRESTON IFA)
   ========================================================================== */
.cta-form--type-kreston_banner {
    background-color: var(--color-bg-subtle, #D9F1F4);
    padding: 70px 0 80px 0;
    min-height: auto;
    display: block;
    align-items: initial;
}

.cta-form--type-kreston_banner .cta-form__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}

.cta-banner {
    width: 100%;
    text-align: center;
}

.cta-banner__header {
    max-width: 820px;
    margin: 0 auto 36px auto;
}

.cta-banner__title {
    font-family: var(--font-heading, 'Inter', sans-serif);
    font-size: var(--fs-h2, 40px);
    line-height: var(--lh-h2, 48px);
    font-weight: var(--fw-h2, 800);
    color: var(--text-dark, #243746);
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.cta-banner__desc {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--fs-body-l, 16px);
    line-height: var(--lh-body-l, 23px);
    font-weight: 400;
    color: var(--text-dark, #243746);
    margin: 0 auto;
    max-width: 720px;
}

.cta-banner__form {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.cta-banner__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 24px;
}

.cta-banner__field {
    width: 100%;
}

.cta-banner__input {
    width: 100%;
    height: 48px;
    background-color: #FFFFFF;
    border: 1px solid rgba(36, 55, 70, 0.12);
    border-radius: 2px;
    padding: 0 16px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--fs-body-s, 14px);
    color: var(--text-dark, #243746);
    outline: none;
    transition: var(--transition-base, all 0.3s ease);
    box-sizing: border-box;
}

.cta-banner__input::placeholder {
    color: var(--text-grey-1, #919AA2);
}

.cta-banner__input:focus {
    border-color: var(--color-primary, #189CD8);
    box-shadow: 0 0 0 3px rgba(24, 156, 216, 0.15);
}

.cta-banner__action {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.cta-banner__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent, #EA5B0B);
    color: var(--text-white, #FFFFFF);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--fs-btn-l, 14px);
    line-height: var(--lh-btn-l, 17px);
    font-weight: 600;
    padding: 12px 42px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-base, all 0.3s ease);
    box-shadow: 0 2px 6px rgba(234, 91, 11, 0.25);
}

.cta-banner__submit:hover {
    background-color: #d14e05;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 91, 11, 0.35);
}

.cta-banner__submit:active {
    transform: translateY(0);
}

/* Feedback message */
.cta-form--type-kreston_banner .cta-form__feedback {
    margin-top: 18px;
    padding: 12px 20px;
    border-radius: 4px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--fs-body-s, 14px);
}

.cta-form--type-kreston_banner .cta-form__feedback--success {
    background-color: #e6f9ed;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.cta-form--type-kreston_banner .cta-form__feedback--error {
    background-color: #fdf0f0;
    color: #c82333;
    border: 1px solid #f5c6cb;
}

/* Responsive cho Dạng 4 */
@media (max-width: 768px) {
    .cta-form--type-kreston_banner {
        padding: 50px 0 60px 0;
    }

    .cta-form--type-kreston_banner .cta-form__container {
        padding: 0 20px;
    }

    .cta-banner__title {
        font-size: var(--fs-h2, 30px);
        line-height: var(--lh-h2, 36px);
        margin-bottom: 12px;
    }

    .cta-banner__desc {
        font-size: 15px;
        line-height: 22px;
    }

    .cta-banner__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cta-banner__submit {
        width: 100%;
        max-width: 200px;
    }
}