/* تحسينات فوق التصميم الأصلي (custom.css): بطاقات العروض، معرض الصور، النماذج. */

img { max-width: 100%; }
.req { color: red; }
/* لا نستخدم إزاحة سالبة: في الصفحات العربية تُنشئ تمريراً أفقياً. */
.hp_field { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.site_alerts { margin-top: 15px; }
.site_alerts ul { padding-right: 18px; list-style: disc; }
.phone_head a { color: red; display: inline-block; padding: 0 4px; font-size: 17px; }
.phone_head a:hover { color: #941d1d; }
#banner_site { float: none; padding: 25px 0; }
#banner_site::after, #icons::after { content: ""; display: table; clear: both; }
.results_count { color: #777; margin-bottom: 15px; font-family: 'Droid Arabic Kufi', sans-serif; font-size: 13px; }
.more_offers { margin: 5px 0 30px; }
.related_title { margin-top: 35px; }
.social_footer a { color: #fff; font-size: 18px; display: inline-block; padding: 8px 6px; }
.social_footer a:hover { color: #f2fb5e; }
.page_photo { margin: 0 auto 20px; border-radius: 4px; }
#footer .col-sm-4 { margin-bottom: 15px; }
.link_footer ul li a, .contact_info a { color: inherit; }
.link_footer ul li a { color: #fff; }
.link_footer ul li a:hover { color: #f2fb5e; }

/* ---------- بطاقات العروض ---------- */
.offers_row { display: flex; flex-wrap: wrap; }
.offers_row::before, .offers_row::after { display: none; }
.offer_col { display: flex; margin-bottom: 25px; float: none; }
.offer_card {
    display: flex; flex-direction: column; width: 100%;
    background: #fff; color: #333; border-radius: 4px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    transition: box-shadow .25s ease, transform .25s ease;
}
.offer_card:hover, .offer_card:focus { color: #333; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transform: translateY(-3px); }
.offer_card_img { position: relative; aspect-ratio: 4 / 3; background: #e9e9e9; overflow: hidden; }
.offer_card_img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.offer_card:hover .offer_card_img img { transform: scale(1.05); }
.offer_card_type {
    position: absolute; top: 10px; right: 10px; padding: 3px 12px; border-radius: 3px;
    background: #c91c1c; color: #fff; font-size: 12px; font-weight: bold;
}
.offer_card_type.type_1 { background: #2c7a3f; }
.offer_card_type.type_2 { background: #b8860b; }
.offer_card_count {
    position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 3px;
    background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; direction: ltr;
}
.offer_card_title {
    position: absolute; bottom: 0; right: 0; left: 0; margin: 0; padding: 8px 12px;
    background: rgba(60, 60, 60, .82); color: #fff; font-size: 13px; line-height: 20px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.offer_card_info {
    flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start;
    background: red; color: #fff; border-bottom: 5px solid yellow;
    padding: 8px 10px; font-size: 13px; font-weight: bold;
    font-family: 'Droid Arabic Kufi', sans-serif;
}
.offer_card_info li { width: 100%; padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer_card_info li span { font-weight: normal; opacity: .85; }
.offer_card_info li span::after { content: " : "; }
.offer_card_info li.offer_card_price { width: 50%; border-top: 1px solid rgba(255, 255, 255, .35); margin-top: 4px; padding-top: 6px; }

/* ---------- صفحة الإعلان ---------- */
.ad_header { margin-top: 10px; overflow: hidden; }
.ad_header h1 { font-size: 22px; line-height: 34px; float: right; }
.ad_number { float: left; background: #5a5a57; color: #fff; padding: 5px 12px; border-radius: 3px; font-size: 13px; }
.ad_gallery { margin-bottom: 20px; }
.ad_gallery_stage { position: relative; aspect-ratio: 4 / 3; background: #1b1b1b; border-radius: 4px; overflow: hidden; }
.ad_gallery_main { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.ad_gallery_nav, .lightbox_nav, .ad_gallery_zoom, .lightbox_close {
    position: absolute; border: 0; color: #fff; background: rgba(0, 0, 0, .55);
    width: 42px; height: 42px; border-radius: 50%; font-size: 16px; line-height: 42px; text-align: center; padding: 0;
    transition: background .2s ease;
}
.ad_gallery_nav:hover, .lightbox_nav:hover, .ad_gallery_zoom:hover, .lightbox_close:hover { background: #c91c1c; }
.ad_gallery_nav:focus-visible, .lightbox_nav:focus-visible, .ad_gallery_zoom:focus-visible, .lightbox_close:focus-visible, .ad_gallery_thumb:focus-visible { outline: 2px solid yellow; outline-offset: 2px; }
.ad_gallery_nav, .lightbox_nav { top: 50%; margin-top: -21px; }
.ad_gallery_prev, .lightbox_prev { right: 12px; }
.ad_gallery_next, .lightbox_next { left: 12px; }
.ad_gallery_zoom { top: 12px; left: 12px; }
.ad_gallery_counter, .lightbox_counter {
    position: absolute; bottom: 12px; right: 12px; background: rgba(0, 0, 0, .6); color: #fff;
    padding: 3px 12px; border-radius: 12px; font-size: 13px; direction: ltr;
}
.ad_gallery_thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 6px; scroll-behavior: smooth; }
.ad_gallery_thumb {
    flex: 0 0 96px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 3px;
    overflow: hidden; background: #e9e9e9; opacity: .65; transition: opacity .2s ease, border-color .2s ease;
}
.ad_gallery_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad_gallery_thumb:hover, .ad_gallery_thumb.active { opacity: 1; }
.ad_gallery_thumb.active { border-color: #c91c1c; }
.ad_description { margin-bottom: 25px; line-height: 1.9; overflow-wrap: anywhere; }
.ad_description h3, .ad_contact h3 { font-size: 16px; font-weight: bold; border-bottom: 3px solid #c91c1c; padding-bottom: 8px; margin-bottom: 12px; }
.ad_description p { font-size: 15px; }
.ad_table thead th { background: #c91c1c; color: #fff; text-align: center; font-family: 'Droid Arabic Kufi', sans-serif; }
.ad_table tbody th { width: 40%; background: #f5f5f5; font-family: 'Droid Arabic Kufi', sans-serif; font-size: 13px; }
.ad_contact { margin-bottom: 20px; }
.ad_contact .btn { margin: 0 0 6px 4px; }
.ad_map iframe, .contact_map iframe { width: 100%; height: 320px; border: 0; border-radius: 4px; display: block; }
.ad_map a { color: #c91c1c; display: inline-block; margin: 8px 0 20px; font-family: 'Droid Arabic Kufi', sans-serif; }
.contact_form .input-group, .contact_form .form-group { margin-bottom: 12px; }

/* ---------- نافذة تكبير الصور ---------- */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .93); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox_img { max-width: 94vw; max-height: 90vh; object-fit: contain; user-select: none; }
.lightbox_close { top: 14px; left: 14px; }
.lightbox_counter { bottom: 16px; right: 50%; transform: translateX(50%); }
body.lightbox_open { overflow: hidden; }

@media (max-width: 767px) {
    .text_banner_site { padding-top: 30px; }
    .text_banner_site h2 { font-size: 22px; line-height: 34px; }
    .ad_header h1 { font-size: 18px; line-height: 30px; float: none; }
    .ad_number { float: none; display: inline-block; margin-top: 6px; }
    .item_icon a { float: none; display: inline-block; }
    .ad_gallery_thumb { flex-basis: 76px; height: 57px; }
    .ad_gallery_nav, .lightbox_nav { width: 44px; height: 44px; line-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .offer_card, .offer_card_img img, .ad_gallery_thumbs { transition: none; scroll-behavior: auto; }
}

/* تصحيحات صغيرة */
.ad_description a, .about_us_page a { text-transform: none; color: #c91c1c; word-break: break-all; }
.ad_table td { font-family: 'Droid Arabic Kufi', sans-serif; font-size: 13px; }
