/*
//  Created by Mohammad Rabi on 05/06/2026.
//  Copyright © 2026 Horizon Stay. All rights reserved.
*/

/* ========================================= */
/* ARABIC TYPOGRAPHY & OVERRIDES (rtl.css)   */
/* ========================================= */

/* 1. Apply Tajawal Font Globally */
body, h1, h2, h3, h4, h5, h6, p, a, span, button, input, select {
    font-family: 'Tajawal', sans-serif !important;
}

/* Make bold text pop beautifully */
b, strong, .hero-title, .section-title, .trust-title {
    font-weight: 700 !important;
}

/* ARABIC TYPOGRAPHY FIX - Kills all letter-spacing to prevent broken cursive connections */
* {
    letter-spacing: normal !important;
}

/* ========================================= */
/* ARABIC OVERRIDES (rtl.css)                */
/* ========================================= */

/* 1. Global Text Alignment */
body {
    text-align: right;
}

/* Helper: Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-top: 5px;
    font-weight: 700;
}

/* 2. Flip Section Headers */
.section-header {
    text-align: right !important; /* Overrides the hardcoded English alignment */
    border-left: none;
    border-right: 3px solid rgba(237, 66, 100, 0.5);
    padding-left: 0;
    padding-right: 25px;
}

.section-title span {
    padding-top: 10px;
}

/* ========================================= */
/* HEADER NAVIGATION BAR SPACING             */
/* ========================================= */

/* 4. Dropdown Text, Chevron, & Red Bar Alignment */
.location-item {
    text-align: right !important;
}

.location-item.active {
    border-left: none !important;
    border-right: 3px solid var(--grad-start) !important;
    background: rgba(237, 66, 100, 0.05) !important;
}

.chevron-icon {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.ota-title { font-size: 1.1rem;  }


/* ========================================= */
/* DESKTOP HEADER (Min-width: 941px)        */
/* ========================================= */
@media (min-width: 941px) {
    
    /* Location Dropdown - Separator on left */
    #location-dropdown {
        border-right: none !important;
        border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
        margin-right: 0 !important;
        margin-left: 10px !important;
        padding-right: 0 !important;
        padding-left: 25px !important;
    }

    /* Language Dropdown - No separators, snaps to left */
    #lang-dropdown {
        border-left: none !important;
        border-right: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 10px !important;
    }

    .nav-link { padding-bottom: 0px; }

    /* Pushes the hover/active bar further down to clear Arabic letter drops */
    #main-header .nav-link {
        padding-bottom: 0px !important; 
    }

    /* If your bar is built using an animated pseudo-element, this forces it lower */
    #main-header .nav-link::after {
        bottom: -3px !important; 
    }
}

/* ========================================= */
/* MOBILE MENU (Max-width: 940px)           */
/* ========================================= */
@media (max-width: 940px) {
    
    /* Slide menu from the left instead of right */
    .main-nav {
        right: auto !important;
        left: -100% !important;
        align-items: flex-start !important;
        transition: left 0.3s cubic-bezier(0.885, 0.885, 0.32, 0.885) !important;
    }
    
    .main-nav.menu-open {
        left: 0 !important;
        right: auto !important;
    }

    /* Clean up borders and padding for ALL dropdowns on mobile */
    .custom-location-dropdown,
    #location-dropdown,
    #lang-dropdown {
        border-left: none !important;
        border-right: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 20px !important;
    }

    header {
        padding-left: 10px !important;
        padding-right: 15px !important;
    }
}

/* ========================================= */
/* MOBILE MENU: VERTICAL BAR FLIP (::AFTER)  */
/* ========================================= */

@media (max-width: 940px) {
    /* Targets the custom gradient bar and moves it to the right */
    .nav-link.active::after,
    .nav-link:hover::after {
        left: auto !important;  /* Releases it from the left side */
        right: 0 !important;    /* Pins it to the right side */
    }
}

/* ========================================= */
/* DUBAI APARTMENTS RTL LAYOUT               */
/* ========================================= */

/* 1. Apartment Grid & Cards */
.apartment-card,
.apartment-details,
.apartment-title,
.apartment-location,
.apartment-price,
.amenities-list,
.apartment-description {
    text-align: right !important;
}

/* Flip the amenities icon spacing */
.amenity-item img,
.amenity-item svg {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

/* 2. Modal Popup Alignment */
.modal-info,
.modal-desc {
    text-align: right !important;
}

.modal-title { padding-right: 0px; }

/* Flip Action Button Icons inside the modal */
.action-btn img {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* Move the Close/Share buttons in the modal header to the left side */
.modal-header-actions {
    left: 15px !important;
    right: auto !important;
}

/* 3. Share Box Alignment */
.share-header h3,
.share-input-group,
.share-socials {
    padding-top: 5px;
    text-align: right !important;
}

/* Keep the copied URL reading Left-to-Right so it doesn't break */
#share-url-input {
    direction: ltr !important;
    text-align: left !important;
}

/* 4. Calendar Modal & Legend */
.cal-top-row,
.legend {
    text-align: right !important;
}

/* Fix the dots in the calendar legend */
.legend-item .dot {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

.apt-title,
.apartment-title,
.modal-title {
    /* 1. Forces the English words and numbers to stay in the exact correct order */
    direction: ltr !important;
    
    /* 2. Keeps the text aligned to the right side of the card/modal */
    text-align: right !important;
    
    /* 3. FIXES THE GRADIENT! Forces the invisible background box to hug the text tightly */
    display: inline-block !important;
    width: fit-content !important;
    max-width: 100% !important;
}

/* ========================================= */
/* FULLSCREEN BUTTON ALIGNMENT               */
/* ========================================= */

.main-image-container .expand-btn {
    left: auto !important;
    right: 15px !important; /* Adjust this slightly if you want it closer/further from the edge */
}

.fs-close-btn {
    right: auto !important; /* Wipes out the English right-side positioning */
    left: 15px !important;  /* Pins the button firmly to the left side */
}

/* ========================================= */
/* GALLERY NAVIGATION ARROWS                 */
/* ========================================= */

/* Move the Previous button to the right side */
.prev-btn {
    left: auto !important;
    right: 10px !important; 
}

/* Move the Next button to the left side */
.next-btn {
    right: auto !important;
    left: 10px !important;
}

/* Gallery Nav Arrows */
.gallery-nav {
    position: absolute; background: rgba(0,0,0,0.5); 
    color: white; border: none; 
    padding-top: 15px;
    padding-bottom: 5px;
    cursor: pointer; font-size: 1.5rem;
    transition: background 0.1s ease;
    z-index: 5; display: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; outline: none; user-select: none;
}


/* ========================================= */
/* CALENDAR MODAL RTL FIXES                  */
/* ========================================= */

/* 1. Flips the chevron images so they point in the correct RTL directions */
.cal-nav-btn img {
    transform: scaleX(-1) !important;
}

/* 2. Reset the top row to act as a normal flex container without padding */
.cal-top-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 !important; /* Kills any padding causing layout shifts */
}

/* 3. Strip absolute positioning from the Close Button so it sits on the left */
.calendar-close-btn {
    left: 0px !important;
    right: auto !important;
}

/* 4. Force Title to the right and kill its padding */
#calendar-apt-title {
    position: relative !important; 
    right: auto !important;
    left: auto !important;
    margin: 0 !important;
    order: -1 !important; /* Forces it to be the absolute first item on the left */
}

/* ========================================= */
/* CARS PAGE SPECIFIC RTL                    */
/* ========================================= */

/* Push the 'Back to Categories' button to the right */
#nav-header {
    text-align: right !important;
}

.btn-back {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: inline-flex !important;
    flex-direction: row-reverse !important; /* Puts the arrow on the correct side of the text */
    gap: 8px;
}


.btn-explore {
    padding-top: 17px !important; 
    padding-bottom: 11px !important;
}

/* Mobile Adjustment */
@media (max-width: 940px) {
    .btn-explore {
        padding-top: 14px !important; 
        padding-bottom: 10px !important;
    }
}
