/* ==============================================
   AQARATTI — CUSTOM DESIGN FIXES
   Applied on top of style.css & style_ar.css
   ============================================== */

/* -----------------------------------------------
   1. RTL — Form & Input Alignment Fixes (Arabic)
   ----------------------------------------------- */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] .form-control,
[dir="rtl"] .form-select,
[dir="rtl"] select {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder,
[dir="rtl"] .form-control::placeholder {
    text-align: right;
}

/* Global List & Element Alignment (RTL) */
[dir="rtl"] ul, 
[dir="rtl"] ol, 
[dir="rtl"] dl {
    text-align: right;
    padding-right: 2rem;
    padding-left: 0;
}

[dir="rtl"] li {
    text-align: right;
}

[dir="rtl"] .nav,
[dir="rtl"] .navbar-nav {
    padding-right: 0;
    text-align: right;
}

[dir="rtl"] table th,
[dir="rtl"] table td {
    text-align: right;
}

/* Nice-select RTL fix */
[dir="rtl"] .nice-select {
    text-align: right !important;
}

[dir="rtl"] .nice-select .list {
    left: auto !important;
    right: 0 !important;
    text-align: right !important;
    width: 100%;
}

[dir="rtl"] .nice-select .option {
    text-align: right !important;
    padding-right: 18px !important;
    padding-left: 29px !important;
}

[dir="rtl"] .nice-select::after {
    left: 15px !important;
    right: auto !important;
}

[dir="rtl"] .nice-select .current {
    text-align: right !important;
    display: block !important;
    width: 100%;
    padding-right: 15px !important;
    padding-left: 35px !important;
}

/* Form-check (Checkboxes) RTL fix */
[dir="rtl"] .form-check {
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
    text-align: right !important;
}

[dir="rtl"] .form-check-input {
    float: right !important;
    margin-right: -1.5rem !important;
    margin-left: 0 !important;
}

/* -----------------------------------------------
   2. Breadcrumb Separator Direction Fix (RTL)
   ----------------------------------------------- */
[dir="rtl"] .breadcumb-menu li + li::before {
    content: "\\";
    transform: scaleX(-1);
    display: inline-block;
}

/* -----------------------------------------------
   3. Hero Section — Subtitle Styling
   ----------------------------------------------- */
.hero-2-content h4 {
    letter-spacing: 0.02em;
    opacity: 0.95;
}

/* -----------------------------------------------
   4. Property Cards — Hover Elevation
   ----------------------------------------------- */
.popular-list-1 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popular-list-1:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* -----------------------------------------------
   5. Header — Logo & Nav Spacing
   ----------------------------------------------- */
.header-logo img {
    max-height: 63px;
    width: auto;
}

/* Language + Country selectors in header */
.lang-wrapper .lang-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* -----------------------------------------------
   6. Footer — Mobile Symmetry Fix
   ----------------------------------------------- */
@media (max-width: 767px) {
    .footer-right-bottom-wrap {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .footer-right-bottom-item.scan {
        width: 100%;
    }

    .copyright-wrap .th-social {
        margin-top: 8px;
    }
}

/* -----------------------------------------------
   7. Scroll-to-Top — prevent overlap with footer
   ----------------------------------------------- */
.scroll-top {
    z-index: 100;
}

/* -----------------------------------------------
   8. Agent / Agency Cards — RTL Icon Flip
   ----------------------------------------------- */
[dir="rtl"] .team-social {
    right: auto;
    left: 20px;
}


/* -----------------------------------------------
   9. Mobile Header — Padding Fix
   ----------------------------------------------- */
@media (max-width: 991px) {
    .menu-area .container,
    .menu-area .th-container3 {
        padding-left: 20px;
        padding-right: 20px;
    }

    [dir="rtl"] .th-menu-toggle {
        margin-left: 0;
        margin-right: auto;
    }
}

/* -----------------------------------------------
   10. Form Validation Alert — Box-shadow
   ----------------------------------------------- */
.alert-danger {
    border-left: 4px solid var(--error-color);
    border-radius: 6px;
    font-size: 14px;
}

[dir="rtl"] .alert-danger {
    border-left: none;
    border-right: 4px solid var(--error-color);
}

.alert-success {
    border-left: 4px solid var(--success-color);
    border-radius: 6px;
    font-size: 14px;
}

[dir="rtl"] .alert-success {
    border-left: none;
    border-right: 4px solid var(--success-color);
}

/* -----------------------------------------------
   11. Sort Bar — RTL
   ----------------------------------------------- */
[dir="rtl"] .th-sort-bar .woocommerce-result-count {
    text-align: right;
}

/* -----------------------------------------------
   12. Property Details — Mixed alignment fix
   ----------------------------------------------- */
[dir="rtl"] .breadcumb-menu {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .property-features-list .col-sm-4 {
    text-align: right;
}

/* -----------------------------------------------
   13. About Section — Image stacking (Mobile)
   ----------------------------------------------- */
@media (max-width: 767px) {
    .about-thumb-group {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 30px;
    }

    .about-thumb-group img {
        width: 100%;
        border-radius: 12px;
        object-fit: cover;
    }
}

/* -----------------------------------------------
   14. Buttons — Consistent Hover Feedback
   ----------------------------------------------- */
.th-btn {
    transition: all 0.3s ease;
}

.th-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* -----------------------------------------------
   15. Advanced Search Link — visible hover state
   ----------------------------------------------- */
a.hero-search-form__extra,
.hero-search-extra,
a:has(> .fa-sliders) {
    border-bottom: 1px dashed rgba(255,255,255,0.4);
    padding-bottom: 2px;
    transition: border-color 0.3s;
}

a.hero-search-form__extra:hover,
.hero-search-extra:hover {
    border-color: rgba(255,255,255,0.9);
}

/* -----------------------------------------------
   16. Property Badge Styling
   ----------------------------------------------- */
.popular-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.popular-badge p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}



/* -----------------------------------------------
   17. Footer — Layout & Alignment Fixes
   ----------------------------------------------- */
.footer-all-widget-wrapper {
    display: grid !important;
    grid-template-columns: 350px 1fr !important;
    gap: 40px !important;
}

@media (max-width: 1400px) {
    .footer-all-widget-wrapper {
        grid-template-columns: 300px 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 1199px) {
    .footer-all-widget-wrapper {
        grid-template-columns: 1fr !important;
    }
}

/* RTL Footer Icon Alignment Fix */
[dir="rtl"] .footer-widget.widget_nav_menu a,
[dir="rtl"] .footer-widget.widget_meta a,
[dir="rtl"] .footer-widget.widget_pages a,
[dir="rtl"] .footer-widget.widget_archive a,
[dir="rtl"] .footer-widget.widget_categories a {
    padding: 0 30px 0 0 !important;
    text-align: right;
}

[dir="rtl"] .footer-widget.widget_nav_menu a::before,
[dir="rtl"] .footer-widget.widget_meta a::before,
[dir="rtl"] .footer-widget.widget_pages a::before,
[dir="rtl"] .footer-widget.widget_archive a::before,
[dir="rtl"] .footer-widget.widget_categories a::before {
    left: auto !important;
    right: 0 !important;
}

/* Footer Bottom Contact spacing */
.footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-info i {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--theme-color);
}

/* -----------------------------------------------
   18. Header Responsive Fixes (Prevent Wrapping)
   ----------------------------------------------- */
@media (min-width: 992px) {
    /* Force row to stay in one line and keep elements flexible */
    .menu-area .row {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Standard Desktop (Full HD+) */
    .main-menu ul li {
        margin: 0 15px !important;
    }

    .main-menu ul li a {
        font-size: 16px !important; 
        font-weight: 500 !important;
        white-space: nowrap !important;
    }

    .header-button {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        flex-shrink: 0 !important;
    }

    .header-button .th-btn {
        display: inline-flex !important;
        padding: 12px 24px !important;
        font-size: 15px !important;
        white-space: nowrap !important;
    }

    .header-logo img {
        max-height: 48px !important;
    }
}

/* Squeeze for Laptops (Most common screens) */
@media (min-width: 992px) and (max-width: 1400px) {
    .main-menu ul li {
        margin: 0 5px !important;
    }
    .main-menu ul li a {
        font-size: 15px !important;
    }
    .header-button {
        gap: 6px !important;
    }
    .header-button .th-btn {
        padding: 8px 12px !important; /* Significant reduction in horizontal space */
        font-size: 14px !important;
    }
    .header-button .nice-select {
        min-width: 85px !important;
        padding-right: 20px !important;
        font-size: 13px !important;
    }
    /* Logo slightly smaller to save space */
    .header-logo img {
        max-height: 59px !important;
    }
}

/* Extra squeeze for 1100px - 1250px (Small Laptops) */
@media (min-width: 1100px) and (max-width: 1250px) {
    .main-menu ul li {
        margin: 0 3px !important;
    }
    .main-menu ul li a {
        font-size: 14px !important;
    }
    .header-button .th-btn.bg-theme {
        display: none !important; /* Hide Register button on small screens to fit everything else */
    }
}
