/* ============================================================
   БЛОК AUDIT (форма «Отримати безкоштовний аудит»)
   Підключення:
   <link rel="stylesheet" type="text/css" href="{{ asset('public/assets\css\frontend\New_website\audit.css') }}">
   Потрібен також скрипт:
   <script src="{{ asset('assets\js\website\audit.js') }}"></script>

   Брейкпоінти:
   - ПК (за замовчуванням)          > 1440px
   - ноутбук / планшет альбомний    <= 1440px
   - планшет портретний             <= 1024px
   - телефон                        <= 768px
   ============================================================ */

.cases-audit {
    position: relative;
    width: 100%;
    max-width: 1920px;
    background-color: #001435;
    background-image: url('../../../image/website/body/audit/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    padding: 90px 0 100px;
}

.audit-container {
    position: relative;
    width: 100%;
    max-width: 1386px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 80px;
}

/* ---------- телефон ліворуч ---------- */

.audit-phone {
    flex-shrink: 0;
    width: 32%;
    max-width: 420px;
}

.audit-phone img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- права частина: заголовок + форма ---------- */

.audit-content {
    flex: 1;
    min-width: 0;
}

.audit-title {
    margin: 0 0 22px;
    font-weight: 800;
    font-size: 36px;
    line-height: 46px;
    color: #FFFFFF;
}

.audit-badge {
    display: inline-block;
    margin-bottom: 36px;
    padding: 7px 18px;
    border-radius: 6px;
    background: #2A90FF;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
}

/* ---------- форма ---------- */

.audit-form {
    transition: opacity 0.4s ease;
}

.audit-form.is-hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.audit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    row-gap: 26px;
    max-width: 920px;
}

.audit-field { display: flex; flex-direction: column; }

.audit-field label {
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.audit-field input,
.audit-field select {
    height: 50px;
    padding: 0 16px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #0D2040;
    border: 1px solid rgba(95, 130, 185, 0.35);
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.audit-field input::placeholder { color: rgba(255, 255, 255, 0.35); }

.audit-field input:focus,
.audit-field select:focus {
    border-color: #2A90FF;
}

/* поле з помилкою (порожнє обов'язкове при сабміті) */
.audit-field input.is-error,
.audit-field select.is-error {
    border-color: #E0563C;
}

/* селект: своя помаранчева стрілка */
.audit-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'><path d='M1 1l6 6 6-6' stroke='%23FFA014' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
    cursor: pointer;
}

.audit-field select option {
    background: #0D2040;
    color: #FFFFFF;
}

.audit-submit {
    margin-top: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 48px;
    border: none;
    border-radius: 26px;
    background: #FFA014;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 19px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.audit-submit:hover {
    background: #FF9100;
    box-shadow: 0 0 16px rgba(255, 160, 20, 0.4);
}

/* ---------- повідомлення після відправлення ---------- */

.audit-success {
    display: none;
    max-width: 920px;
    padding: 40px 24px;
    box-sizing: border-box;
    border-radius: 18px;
    background: rgba(13, 32, 64, 0.55);
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.audit-success.is-shown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* зелений квадрат із галочкою */
.audit-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 22px;
    border-radius: 8px;
    background: #18B926;
    border: 3px solid #0E0E0E;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audit-success-title {
    margin: 0 0 12px;
    font-weight: 800;
    font-size: 24px;
    line-height: 30px;
    color: #FFFFFF;
}

.audit-success-text {
    margin: 0;
    font-weight: 500;
    font-size: 16px;
    line-height: 25px;
    color: rgba(255, 255, 255, 0.65);
}

/* ============================================================
   НОУТБУК / ПЛАНШЕТ АЛЬБОМНИЙ  (<= 1440px)
   ============================================================ */
@media (max-width: 1440px) {

    .cases-audit { padding: 64px 32px 76px; }

    .audit-container { gap: 52px; }

    .audit-title { font-size: 30px; line-height: 39px; }

    .audit-form-grid { column-gap: 28px; row-gap: 20px; }

    .audit-submit { margin-top: 32px; }
}

/* ============================================================
   ПЛАНШЕТ ПОРТРЕТНИЙ  (<= 1024px)
   Телефон зверху, форма під ним
   ============================================================ */
@media (max-width: 1024px) {

    .cases-audit { padding: 48px 24px 60px; }

    .audit-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 36px;
    }

    .audit-phone {
        width: 100%;
        max-width: 340px;
        align-self: center;
    }

    .audit-title { font-size: 26px; line-height: 34px; }
    .audit-badge { margin-bottom: 26px; }
}

/* ============================================================
   ТЕЛЕФОН  (<= 768px)
   ============================================================ */
@media (max-width: 768px) {

    .cases-audit { padding: 36px 16px 48px; }

    .audit-phone { max-width: 270px; }

    .audit-title { font-size: 21px; line-height: 28px; }
    .audit-badge { font-size: 12px; padding: 6px 14px; }

    /* поля в один стовпець */
    .audit-form-grid { grid-template-columns: 1fr; row-gap: 16px; }

    .audit-field input,
    .audit-field select { height: 46px; font-size: 14px; }

    .audit-submit {
        margin-top: 24px;
        width: 100%;
        box-sizing: border-box;
    }

    .audit-success { padding: 30px 16px; }
    .audit-success-title { font-size: 20px; line-height: 26px; }
    .audit-success-text { font-size: 14px; line-height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .audit-form,
    .audit-success { transition: none; }
}