/* ---------- 1. БАЗОВЫЕ ПЕРЕМЕННЫЕ ---------- */
:root {
    --clr-primary: #3E8239;
    --clr-bg: #f7f8fa;
    --radius: 16px;
    --shadow: 0 4px 16px rgba(0, 0, 0, .08);
}
/* ---------- 3. МОДАЛЬНОЕ ОКНО ---------- */
#quizModal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
}
#quizModal.is-hidden {
    display: none;
}
.green-text {
    color: #3E8239;
}
.logo-bd-mobile {
    display: none;
}
.card-media-mobile {
    display: none;
}
footer .quiz {
    color: black;
}
.quiz {
    color: black;
    position: relative;
    width: 75%;
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    animation: fade-in .25s ease-out both;
}
@keyframes fade-in {
    from {
        opacity: 0
    }
        to {
        opacity: 1
    }
}
.quiz__close {
    position: absolute;
    top: 10px;
    right: 16px;
    width: 64px;
    height: 64px;
    border: none;
    cursor: pointer;
    background: url('../images/close.png') center/48px 48px no-repeat;
}
/* ---------- 4. КАРТОЧКА ---------- */
.quiz .card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 420px;
}
.quiz .card__media {
    width: 40%;
    border-radius: 12px;
    overflow: hidden;
    flex:0 0 300px;            /* ширина (и max-width на мобиле) */
    aspect-ratio:1/1.7;          /* квадрат 1:1; можно 4/3 и т.д. */
    overflow:hidden;
}
.quiz .card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.quiz .card__body {
    width: 70%;
    display: flex;
    flex-direction: column;
}
.quiz h3 {
    margin-bottom: 20px;
    font-size: 40px;
    font-weight: 700;
}
.quiz label {
    display: block;
    margin-bottom: 14px;
}
.quiz input,
.quiz select,
.quiz textarea {
    width: 75%;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid #ccc;
    border-radius: 40px;
}
.quiz input:focus, .quiz select:focus, .quiz textarea:focus {
    outline: 1px solid #3E8239;
}
.quiz select {
    width: 50%;
}
.quiz textarea {
    min-height: 80px;
    resize: vertical;
}
.quiz .range__labels {
    margin-bottom: 50px;
}
.quiz .range-wrap {
    position: relative;
    margin-bottom: 20px;
}
.quiz .min-range {
    font-size: 16px;
    font-weight: 300;
    position: absolute;
    top: 30px;
    left: 0;
}
.quiz .max-range {
    font-size: 16px;
    font-weight: 300;
    position: absolute;
    right: 0;
    top: 30px;
}
.quiz input[type="range"] {
    width: 100%;
    border: none;
    outline: none;
    accent-color:#3E8239; 
    height:16px;                 /* ← НОВАЯ толщина */
    -webkit-appearance:none;
    appearance:none;
    cursor:pointer;
}
/* ---------- Chrome / Edge / Safari ---------- */
.quiz input[type="range"]::-webkit-slider-runnable-track{
    height:16px;         
    margin-top:-5px; 
    background: #dfdfdf;
    border-radius: 40px;
    background:linear-gradient(to right,
             var(--fill,#3E8239) 0%,
             var(--fill,#3E8239) var(--p,0%),
             #dfe3e9 var(--p,0%),
             #dfe3e9 100%);
}
.quiz input[type="range"]::-webkit-slider-thumb{
-webkit-appearance:none;
  width:28px; height:28px;     /* диаметр кружка */
  border-radius:50%;
  background:#ffffff;
  border: 1px solid #3E8239;       /* белое «кольцо» (необязательно) */
  margin-top:-7px;             /* (28-14)/2 → центр по вертикали */
  transition:transform .15s;
}
.quiz input[type="range"]:focus {
    border: none;
    outline: none;
}
.quiz .btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--clr-primary);
    border: none;
    border-radius: 48px;
    cursor: pointer;
    transition: background .2s;
}
.quiz .btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.quiz .btn--full {
    width: 100%;
}
.quiz .btn:hover:not(:disabled) {
    background: #2a6626;
}
/* ---------- 5. ШАГИ ---------- */
.quiz .step {
    display: none;
    opacity: 0;
    transform: translateY(32px);
    animation: slide-up .35s forwards;
}
.quiz .step.is-active {
    display: block;
}
@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ---------- 6. МИНИ-БАННЕР ---------- */
.quiz-widget {
    position: fixed;
    bottom: 30px;
    right: 150px;
    z-index: 9998;
    padding: 20px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(230, 230, 230, 1);
    border-radius: 16px;
    color: #000;
    font-size: 18px;
}
.quiz-widget p {
    margin: 0 10px;
}
.banner {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(62, 130, 57, 1);
    background-color: white;
    border-radius: 80px;
    padding: 16px 24px;
    color: rgba(62, 130, 57, 1);
}
#banner.is-hidden {
    display: none;
}
/* ---------- 7. МОБИЛЬНАЯ АДАПТАЦИЯ ---------- */
@media(max-width:767px) {
    .quiz-widget {
        display: none;
    }
    .logo-bd {
        display: none;
    }
    .logo-bd-mobile {
        display: block;
        width: 60% !important;
        align-self: flex-start;
    }
    .card-media {
        display: none;
    }
    .card-media-mobile {
        display: block;
        height: 20vh;
    }
    .quiz .card__media img {
        height: 20vh;
    }
    .quiz {
        width: 90%;
    }
    .quiz .card {
        flex-direction: column;
        text-align: center;
    }
    .quiz .card__body {
        width: 100%;
    }
    .quiz .card__media {
        width: 100%;
        height: 100%;
        min-height: unset;
        flex: 0 0 100%;
        aspect-ratio: unset;
    }
    .quiz h3 {
        margin-bottom: 12px;
        font-size: 24px;
    }
    .quiz h3 ~ p {
        font-size: 20px;
    }
    .quiz .btn {
        width: 90%;
    }
    .step .btn {
        width: 100%;
        margin-top: 5vh;
    }
    .step {
        text-align: left;
    }
    .quiz-widget {
        right: 130px;
        bottom: 10px;
        padding: 12px 16px;
    }
    .quiz .btn--full {
        width: 100%;
    }
    .quiz #banner {
        left: 16px;
        right: auto;
    }
    .banner-mobile {
        display: none;
    }
    .quiz__close {
        top: -5px;
        right: 0;
    }
    .quiz input,
    .quiz select,
    .quiz textarea {
        width: 90%;
    }
}