/* מימון רכב (חברות מימון, ראשונה: CAL) - בלוק במודעה, עמוד הצעה ומחשבון */

.finance-offer {
    width: 88%;
    margin: 10px auto;
    padding: 8px 12px;
    border: 1px solid #00A5D9;
    border-radius: 12px;
    background: #fff;
    direction: rtl;
    text-align: right;
    font-size: 14px;
    color: #373737;
}

.finance-offer__title {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #00A5D9;
    font-size: 1.2rem;
    width: 100%;
    justify-content: center;
}

.finance-offer__logo {
    height: 18px;
    width: auto;
}

.finance-offer__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.finance-offer__link,
.finance-offer__mini {
    color: #000 !important;
    text-decoration: underline !important;
    font-size: 13px;
    font-weight: normal !important;
}

.finance-offer__mini {
    display: block;
    margin: 4px 0;
}

.finance-offer__note {
    margin-top: 4px;
    font-size: 11px;
    color: #737373;
}

/* עמודי המימון (הצעה, מחשבון, רכבים) */

.finance-page {
    direction: rtl;
    text-align: right;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 40px;
    color: #373737;
}

.finance-hero {
    margin: 0 -16px 20px;
    padding: 28px 16px 20px;
    background: linear-gradient(180deg, #E2F5FF 0%, #fff 100%);
    text-align: center;
}

.finance-hero h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 6px;
}

.finance-hero p {
    margin: 0 0 12px;
}

.finance-hero__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.finance-hero__logos img {
    height: 32px;
    width: auto;
}

.finance-card {
    border: 2px solid #8FD3EE;
    border-radius: 24px;
    background: #fff;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.finance-card h2 {
    font-size: 20px;
    font-weight: bold;
    color: #00A5D9;
    margin: 0 0 4px;
    text-align: center;
}

.finance-card__title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.finance-card__logo {
    height: 26px;
    width: auto;
}

.finance-card__sub {
    margin: 0 0 12px;
    font-size: 15px;
    text-align: center;
    color: #373737;
}

/* שדות הטופס: אייקון מימין, placeholder, קו תחתון בלבד */
.finance-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    padding: 10px 0 6px;
    border-bottom: 2px solid #8FD3EE;
}

.finance-input svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #9A9A9A;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #373737;
    text-align: right;
}

/* טלפון ומייל נכתבים משמאל לימין, אבל מיושרים לימין כמו בעיצוב */
.finance-input input[type="tel"],
.finance-input input[type="email"] {
    direction: ltr;
}

.finance-input input::placeholder {
    color: #9A9A9A;
}

.finance-car {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
    padding: 12px 0;
    border-bottom: 2px solid #8FD3EE;
}

.finance-car img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.finance-car div {
    display: flex;
    flex-direction: column;
    font-size: 15px;
}

.finance-car b {
    font-size: 16px;
    color: #373737;
}

.finance-car__plate {
    color: #00A5D9;
    font-size: 16px;
}

.finance-terms {
    font-size: 12px;
    line-height: 1.6;
    color: #373737;
    text-align: center;
    margin: 12px 0;
}

.finance-card .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* הטקסטים מהעורך באדמין מגיעים בפסקאות */
.finance-terms p,
.finance-legal p {
    margin: 0 0 4px;
}

/* style.css / style-desktop.css מבטלים קו תחתון לכל a עם !important */
.finance-terms a,
.finance-legal a {
    color: #00A5D9;
    text-decoration: underline !important;
}

.finance-error {
    color: red;
    font-size: 13px;
    min-height: 18px;
    margin: 6px 0;
}

.finance-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 30px;
    background: #00A5D9;
    color: #fff !important;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.finance-btn:disabled {
    opacity: 0.6;
}

.finance-btn--outline {
    background: #fff;
    color: #00A5D9 !important;
    border: 1px solid #00A5D9;
}

.finance-thanks {
    text-align: center;
}

/* מחשבון (עיצוב CAL: כרטיסים לבנים, ערכים כחולים, כפתור כתום) */

.finance-hero--calc {
    background: linear-gradient(180deg, #CDEBFA 0%, #F2FAFE 100%);
}

.finance-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    margin-bottom: 12px;
    text-align: center;
}

.finance-box label,
.finance-box__label {
    display: block;
    font-size: 14px;
    color: #373737;
    margin-bottom: 6px;
}

.finance-box__value {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: #00A5D9;
    font-size: 20px;
    font-weight: bold;
}

.finance-box__value input {
    width: 130px;
    border: 0;
    border-bottom: 1px solid #ccc;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #00A5D9;
    background: transparent;
}

.finance-box__icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* מחוון: פס אפור בהיר, החלק הנבחר בכחול (--fill מתעדכן ב-finance-calculator.js).
   הדף RTL - המינימום בצד ימין, ולכן המילוי מתחיל מימין (to left) */
.finance-box input[type=range] {
    --fill: 50%;
    width: 100%;
    height: 6px;
    margin: 18px 0 8px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: linear-gradient(to left, #00A5D9 var(--fill), #E6E6E6 var(--fill));
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.finance-box input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #00A5D9;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.finance-box input[type=range]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #00A5D9;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* פיירפוקס מצייר את הפס ואת המילוי בעצמו */
.finance-box input[type=range]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #E6E6E6;
}

.finance-box input[type=range]::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: #00A5D9;
}

.finance-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #737373;
    margin-bottom: 12px;
}

.finance-box__pill {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 10px;
    background: #E2F5FF;
    color: #00A5D9;
    font-size: 18px;
    font-weight: bold;
}

.finance-periods {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.finance-periods input {
    display: none;
}

.finance-periods span {
    display: inline-block;
    min-width: 48px;
    padding: 8px 0;
    border: 1px solid #00A5D9;
    border-radius: 8px;
    color: #373737;
    cursor: pointer;
}

.finance-periods input:checked + span {
    background: #00A5D9;
    color: #fff;
}

.finance-btn--orange {
    background: #FF9900;
    margin: 4px 0 12px;
}

.finance-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #E2F5FF;
    text-align: center;
}

.finance-result b {
    font-size: 26px;
    color: #00A5D9;
}

.finance-result small {
    font-size: 12px;
    color: #737373;
}

.finance-result .finance-btn {
    width: auto;
    font-size: 14px;
    padding: 6px 20px;
}

.finance-legal {
    font-size: 10px;
    line-height: 1.5;
    color: #737373;
    margin-bottom: 16px;
}

.finance-legal b {
    display: block;
    color: #373737;
}

.finance-hint {
    display: block;
    font-size: 12px;
    color: #737373;
    margin-top: 8px;
}

.finance-content h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 8px;
}

.finance-content p {
    font-size: 15px;
    line-height: 1.6;
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.finance-table th,
.finance-table td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: center;
}

.finance-table th {
    background: #00A5D9;
    color: #fff;
}

.finance-faq {
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 0;
}

.finance-faq summary {
    cursor: pointer;
    font-weight: bold;
}

.finance-faq p {
    margin: 8px 0 0;
}

.finance-cars-banner {
    direction: rtl;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 16px;
    padding: 20px 16px;
    background: linear-gradient(180deg, #E2F5FF 0%, #fff 100%);
    border-radius: 16px;
}

.finance-cars-banner h1 {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 6px;
}

.finance-cars-banner p {
    font-size: 14px;
    margin: 0 0 12px;
}

.finance-cars-banner__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.finance-cars-banner__actions .finance-btn {
    width: auto;
    font-size: 14px;
    padding: 6px 16px;
}

/* העטיפה של עמודי /finance/* (TemplateModel::render עוטף ב-<div class="finance">) -
   ריווח מתחת להדר הקבוע */
.finance {
    padding-top: 8rem;
}

@media (max-width: 768px) {
    .finance {
        padding-top: 5rem;
    }
}
