/* Shared RTL, accessibility and responsive UX corrections. */
:root {
    --qv-focus: #0b6efd;
    --qv-danger: #b42318;
    --qv-radius: 12px;
}

html[dir="rtl"], body {
    direction: rtl;
    text-align: right;
}

body, button, input, select, textarea {
    font-family: vazir, Tahoma, Arial, sans-serif;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--qv-focus) !important;
    outline-offset: 2px;
}

button, .btn, .nav-link, .dropdown-item, input, select {
    min-height: 44px;
}

.btn:disabled, .btn.disabled, [aria-busy="true"] {
    cursor: wait;
    opacity: .65;
}

input[type="tel"], input[inputmode="numeric"], input[inputmode="decimal"],
.ltr-value, .national-code, .phone-number {
    direction: ltr;
    text-align: right;
    unicode-bidi: plaintext;
}

.form-control::placeholder {
    color: #6b7280;
    opacity: 1;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table th, .table td {
    text-align: right;
    vertical-align: middle;
}

.modal-header .btn-close, .modal-header .close {
    margin: -.5rem auto -.5rem -.5rem;
}

.is-valid:not(:focus):not(:user-valid),
.is-invalid:not(:focus):not(:user-invalid) {
    background-image: none;
}

@media (max-width: 767.98px) {
    .modal-dialog { margin: .75rem; }
    .modal-content { max-height: calc(100dvh - 1.5rem); overflow-y: auto; }
    .form-row > [class*="col-"], form.row > .col-4, form.row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    .table-responsive .btn { white-space: nowrap; }
    .table-mobile-cards, .table-mobile-cards tbody,
    .table-mobile-cards tr, .table-mobile-cards td { display: block; width: 100%; }
    .table-mobile-cards thead { display: none; }
    .table-mobile-cards tr {
        margin-bottom: .75rem;
        padding: .75rem;
        border: 1px solid rgba(0, 0, 0, .1);
        border-radius: var(--qv-radius);
        background: var(--bs-body-bg, #fff);
    }
    .table-mobile-cards td {
        display: grid;
        grid-template-columns: minmax(90px, 40%) 1fr;
        gap: .75rem;
        border: 0;
        border-bottom: 1px solid rgba(0, 0, 0, .06);
        white-space: normal;
    }
    .table-mobile-cards td::before { content: attr(data-label); font-weight: 700; }
    .table-mobile-cards td:last-child { border-bottom: 0; }
    .footer .nav-link { min-width: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Classified item view — readable body copy and facts */
.page-item-view .item-view-content {
    border-radius: var(--qv-radius);
}
.page-item-view .item-view-lead {
    font-size: 1.05rem;
    line-height: 1.75;
}
.page-item-view .item-view-body {
    line-height: 1.85;
    font-size: .95rem;
}
.page-item-view .item-view-body p {
    margin-bottom: .85rem;
}
.page-item-view .item-view-facts li {
    line-height: 1.6;
}
.page-item-view .item-view-hero-subtitle {
    font-size: .9rem;
    opacity: .85;
}

/* Homepage LCP: keep first hero slide visible (style.css hides .coverimg img) */
.offerslides .swiper-slide:first-child .coverimg img,
.coverimg.coverimg-lcp img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.qv-leaflet-marker-wrap { background: transparent; border: 0; }
.qv-leaflet-marker-pin {
    display: block; width: 28px; height: 28px; margin: 0 auto 4px;
    background: #dc3545; border: 3px solid #fff; border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.qv-leaflet-marker-pin::after {
    content: ''; display: block; width: 10px; height: 10px; margin: 5px auto 0;
    background: #fff; border-radius: 50%; transform: rotate(45deg);
}
