/* RTL Layout */
[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* ===== NAVBAR RTL FIXES ===== */
[dir="rtl"] .navbar {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-expand-lg .navbar-nav .nav-link {
    font-size: 13px;
    font-weight: 500 !important;
    border-right: 0 !important;
}
[dir="rtl"] .navbar-brand {
    margin-left: 0;
    margin-right: 1rem;
    order: 2; /* Add this */
    margin-left: auto !important; /* Add this */
    margin-right: 0 !important; /* Add this */
    padding-right: 0 !important;
    padding-left: 8.5rem !important;
}

/* Flip the brand divider from right to left for RTL */
[dir="rtl"] .header-navbar .navbar-brand {
    border-right: 0 !important;
    border-left: 1px solid rgba(0, 0, 0, 0.25) !important;
}

/* Ensure header (dark overlay) uses white-ish divider on the left in RTL */
[dir="rtl"] .header .header-navbar .navbar-brand {
    border-right: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* Ensure switched (white) header uses dark divider on the left in RTL */
[dir="rtl"] .header.switched-header .header-navbar .navbar-brand {
    border-right: 0 !important;
    border-left: 1px solid rgba(0, 0, 0, 0.25) !important;
}

[dir="rtl"] .nav-menu {
    margin-left: 0 !important;
    margin-right: auto !important;
    order: 1; /* Add this */
}

[dir="rtl"] .header-navbar-nav {
    flex-direction: row;
}

[dir="rtl"] .ml-lg-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Phone & Flag items */
[dir="rtl"] .phone-link-mobile {
    flex-direction: row-reverse;
}

[dir="rtl"] .dish-icon-mobile img {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

[dir="rtl"] .bell-phone-wrapper {
    margin-left: 0.5rem;
    margin-right: 0;
}
[dir="rtl"] .navbar-toggler {
    order: 3; /* Add this */
}

/* ===== TEXT ALIGNMENT ===== */
[dir="rtl"] .text-left {
    text-align: right !important;
}

/* Remove the brand border on mobile for RTL (mobile already removes border-right in main) */
@media (max-width: 991.98px) {
    [dir="rtl"] .header-navbar .navbar-brand {
        border-left: none !important;
    }
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

[dir="rtl"] .text-center {
    text-align: center !important;
}

/* ===== FLEXBOX RTL ===== */
[dir="rtl"] .justify-content-start {
    justify-content: flex-end !important;
}

[dir="rtl"] .justify-content-end {
    justify-content: flex-start !important;
}

[dir="rtl"] .justify-content-between {
    justify-content: space-between !important;
}

[dir="rtl"] .align-items-start {
    align-items: flex-start !important;
}

[dir="rtl"] .align-items-end {
    align-items: flex-end !important;
}

/* ===== MARGIN & PADDING UTILITIES ===== */
[dir="rtl"] .mr-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}
[dir="rtl"] .mr-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}
[dir="rtl"] .mr-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}
[dir="rtl"] .mr-4 {
    margin-right: 0 !important;
    margin-left: 1.5rem !important;
}
[dir="rtl"] .mr-5 {
    margin-right: 0 !important;
    margin-left: 3rem !important;
}

[dir="rtl"] .ml-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}
[dir="rtl"] .ml-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}
[dir="rtl"] .ml-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}
[dir="rtl"] .ml-4 {
    margin-left: 0 !important;
    margin-right: 1.5rem !important;
}
[dir="rtl"] .ml-5 {
    margin-left: 0 !important;
    margin-right: 3rem !important;
}

[dir="rtl"] .pr-1 {
    padding-right: 0 !important;
    padding-left: 0.25rem !important;
}
[dir="rtl"] .pr-2 {
    padding-right: 0 !important;
    padding-left: 0.5rem !important;
}
[dir="rtl"] .pr-3 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}
[dir="rtl"] .pr-4 {
    padding-right: 0 !important;
    padding-left: 1.5rem !important;
}
[dir="rtl"] .pr-5 {
    padding-right: 0 !important;
    padding-left: 3rem !important;
}

[dir="rtl"] .pl-1 {
    padding-left: 0 !important;
    padding-right: 0.25rem !important;
}
[dir="rtl"] .pl-2 {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}
[dir="rtl"] .pl-3 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}
[dir="rtl"] .pl-4 {
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}
[dir="rtl"] .pl-5 {
    padding-left: 0 !important;
    padding-right: 3rem !important;
}

[dir="rtl"] .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* ===== COMPONENT SPECIFIC RTL STYLES ===== */

/* Hero Section */
[dir="rtl"] .inner-hero .hero-content {
    text-align: center;
    /* push Arabic hero copy further right */
    
}
@media (min-width: 992px) {
    [dir="rtl"] .inner-hero .hero-content {
        margin-right: 9rem !important;
    }
}

/* Company Overview Section */
[dir="rtl"] #companyOverviewP .text-left {
    text-align: right;
}

[dir="rtl"] #companyOverviewP h2,
[dir="rtl"] #companyOverviewP p {
    text-align: right;
}

/* Vision & Mission Section */
[dir="rtl"] #VisionMission .text-left {
    text-align: right;
}

[dir="rtl"] #VisionMission .vision-content {
    text-align: right;
}

/* Values Section */
[dir="rtl"] .industry-card {
    text-align: right;
}

[dir="rtl"] .industry-card h3,
[dir="rtl"] .industry-card p {
    text-align: right;
}

/* Our Brands Section */
[dir="rtl"] .brand-content.text-left {
    text-align: right;
}

[dir="rtl"] .more-about-container {
    text-align: center;
}

/* Flip Card Reservation */
[dir="rtl"] .flip-card-back .form-label {
    text-align: right;
    display: block;
}

[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .flip-card-back .row .col-sm-6:nth-child(odd) {
    padding-right: 0;
}

[dir="rtl"] .flip-card-back .row .col-sm-6:nth-child(even) {
    padding-left: 0;
}

[dir="rtl"] input[type="date"],
[dir="rtl"] input[type="time"] {
    position: relative;
    direction: rtl;
    text-align: right;
    padding-left: 3rem;
}

[dir="rtl"] input[type="date"] {
    padding-left: 2.25rem;
}
[dir="rtl"] input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 0rem;
    right: auto;
}

[dir="rtl"] input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 0.25rem;
    right: auto;
}

/* Menu Items */
[dir="rtl"] .media-body {
    text-align: right;
}

[dir="rtl"] .media {
    flex-direction: row-reverse;
}

[dir="rtl"] .avatar-sm {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .dots-price {
    right: auto;
    left: 0;
}

[dir="rtl"] .menu-price {
    padding-left: 0;
    padding-right: 10px;
}

/* Specials Section */
[dir="rtl"] .special-inner {
    text-align: right;
}

[dir="rtl"] .special-inner h3,
[dir="rtl"] .special-inner p {
    text-align: right;
}

/* Brand Pillars */
[dir="rtl"] #BrandPillars .text-left,
[dir="rtl"] #SteakquettePillars .text-left {
    text-align: right;
}

[dir="rtl"] #BrandPillars .row h3,
[dir="rtl"] #BrandPillars .row p,
[dir="rtl"] #SteakquettePillars .row h3,
[dir="rtl"] #SteakquettePillars .row p {
    text-align: right;
}

/* Footer */
[dir="rtl"] .footer .text-sm-left {
    text-align: right !important;
}

[dir="rtl"] .footer .text-sm-right {
    text-align: left !important;
}

[dir="rtl"] .footer-social-icons {
    text-align: right;
}

/* Careers Page */
[dir="rtl"] .benefit-card {
    text-align: center;
}

[dir="rtl"] .application-form .form-group {
    text-align: right;
}

[dir="rtl"] .application-form label {
    text-align: right;
    display: block;
}

[dir="rtl"] .application-form input,
[dir="rtl"] .application-form select,
[dir="rtl"] .application-form textarea {
    text-align: right;
}

/* Form elements placeholder RTL */
[dir="rtl"] ::placeholder {
    text-align: right;
}

[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder {
    text-align: right;
}

/* Button alignment */
[dir="rtl"] .btn-group > .btn:not(:first-child),
[dir="rtl"] .btn-group > .btn-group:not(:first-child) > .btn {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

[dir="rtl"] .btn-group > .btn:not(:last-child):not(.dropdown-toggle),
[dir="rtl"] .btn-group > .btn-group:not(:last-child) > .btn {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Dropdown menus */
[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

[dir="rtl"] .dropdown-menu-right {
    left: 0;
    right: auto;
}

/* Navigation tabs */
[dir="rtl"] .nav-tabs .nav-item {
    float: right;
}

[dir="rtl"] .nav-menu-tabs {
    flex-direction: row-reverse;
}

/* ===== LAYOUT COMPONENTS ===== */

/* Grid system adjustments */
[dir="rtl"] .offset-lg-1 {
    margin-left: 0;
    margin-right: 8.333333%;
}
[dir="rtl"] .offset-lg-2 {
    margin-left: 0;
    margin-right: 16.666667%;
}
[dir="rtl"] .offset-lg-3 {
    margin-left: 0;
    margin-right: 25%;
}
[dir="rtl"] .offset-lg-4 {
    margin-left: 0;
    margin-right: 33.333333%;
}
[dir="rtl"] .offset-lg-5 {
    margin-left: 0;
    margin-right: 41.666667%;
}
[dir="rtl"] .offset-lg-6 {
    margin-left: 0;
    margin-right: 50%;
}

/* Card layouts */
[dir="rtl"] .card-gutters .col-sm-6.offset-sm-1 {
    margin-left: 0;
    margin-right: 8.333333%;
}

/* Image alignment */
[dir="rtl"] .float-left {
    float: right !important;
}

[dir="rtl"] .float-right {
    float: left !important;
}

/* ===== ANIMATIONS & TRANSITIONS ===== */
/* Ensure animations work correctly in RTL */
[dir="rtl"] .animbounceInLeft {
    animation-name: bounceInRight;
}

[dir="rtl"] .animbounceInRight {
    animation-name: bounceInLeft;
}

[dir="rtl"] .animfadeInLeft {
    animation-name: fadeInRight;
}

[dir="rtl"] .animfadeInRight {
    animation-name: fadeInLeft;
}

/* ===== SCROLL TO TOP ===== */
[dir="rtl"] .scroll-to-top {
    left: 30px;
    right: auto;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991.98px) {
    [dir="rtl"] .navbar-expand-lg .navbar-nav {
        text-align: right;
    }

    [dir="rtl"] .nav-menu .navbar-nav {
        align-items: flex-end;
    }

    [dir="rtl"] .header-navbar-nav .nav-link {
        text-align: right;
        justify-content: flex-end;
    }
}

@media (max-width: 767.98px) {
    [dir="rtl"] .hero-content h1,
    [dir="rtl"] .hero-content p {
        text-align: center;
    }

    [dir="rtl"] .brand-content {
        text-align: center;
    }

    [dir="rtl"] .more-about-container {
        text-align: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    [dir="rtl"] body {
        text-align: right;
    }

    [dir="rtl"] .container {
        text-align: right;
    }
}

/* ===== ACCESSIBILITY ===== */
/* Ensure screen readers announce RTL content correctly */
[dir="rtl"] [aria-label],
[dir="rtl"] [aria-labelledby] {
    text-align: right;
}

/* ===== PROPER MOBILE RTL NAVBAR ===== */
@media (max-width: 991px) {
    /* Only flip the container to mirror the layout */
    [dir="rtl"] .header-navbar {
        transform: scaleX(-1) !important;
    }

    /* Reset logo positioning and flip it back */
    [dir="rtl"] .navbar-brand {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 1rem !important;
        order: unset !important;
        transform: scaleX(-1) !important;
    }

    /* Flip toggler back to normal */
    [dir="rtl"] .navbar-toggler {
        transform: scaleX(-1) !important;
        order: unset !important;
    }

    /* DON'T flip the nav menu container */
    [dir="rtl"] .nav-menu {
        transform: none !important;
    }

    /* DON'T flip the nav list - let RTL direction handle text */
    [dir="rtl"] .header-navbar-nav {
        transform: none !important;
        direction: rtl !important;
        text-align: right !important;
    }

    /* Fix nav links - no transform, just proper RTL alignment */
    [dir="rtl"] .header-navbar-nav .nav-link {
        text-align: right !important;
        justify-content: flex-end !important;
        transform: none !important;
        direction: rtl !important;
    }

    /* Fix phone number text */
    [dir="rtl"] .phone-number-text {
        transform: none !important;
    }

    /* Keep icons in original position */
    [dir="rtl"] .language-switcher,
    [dir="rtl"] .language-switcher img,
    [dir="rtl"] .bell-phone-wrapper,
    [dir="rtl"] .dish-icon-mobile,
    [dir="rtl"] .bell-phone-wrapper img,
    [dir="rtl"] .dish-icon-mobile img {
        transform: scaleX(-1) !important;
    }

    /* Ensure the text alignment is correct */
    [dir="rtl"] .header-navbar-nav .nav-link {
        text-align: right !important;
        justify-content: flex-end !important;
    }

    [dir="rtl"] .header.switched-header .header-navbar .navbar-brand {
        border-right: 0 !important;
        border-left: 0px !important;
    }

    [dir="rtl"] .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 1rem !important;
    }
}
/* ===== FIX TEXT CONTENT ONLY - SPECIFIC ===== */
@media (max-width: 991px) {
    /* Flip back the text content */
    [dir="rtl"] .nav-link span,
    [dir="rtl"] .nav-link[data-i18n] {
        transform: scaleX(-1) !important;
        display: inline-block;
    }
    [dir="rtl"] .nav-link .no-transform {
        transform: none !important;
    }
    /* Ensure proper text alignment */
    [dir="rtl"] .header-navbar-nav .nav-link {
        text-align: right !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 991px) {
    .language-text-en {
        color: rgb(113, 113, 113) !important;
    }

    /* For RTL mobile specifically */
    [dir="rtl"] .language-text-en {
        color: rgb(113, 113, 113) !important;
    }
}
/* Mobile Phone Number Color */
@media (max-width: 991px) {
    .phone-number-text {
        color: rgb(113, 113, 113) !important;
    }

    /* For RTL mobile specifically */
    [dir="rtl"] .phone-number-text {
        color: rgb(113, 113, 113) !important;
    }
}

[dir="rtl"] h1.display-4 {
    font-size: 4rem !important;
}

[dir="rtl"] .banner-text {
    font-size: 1rem !important;
}

[dir="rtl"] .hero-kicker {
    letter-spacing: 0;
}

/* Unified Tajawal Font for RTL - Add this to rtl.css */
[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] div,
[dir="rtl"] a,
[dir="rtl"] li,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select,
[dir="rtl"] label,
[dir="rtl"] .navbar-nav .nav-link,
[dir="rtl"] .btn,
[dir="rtl"] .form-control,
[dir="rtl"] .display-4,
[dir="rtl"] .banner-text,
[dir="rtl"] .industry-card,
[dir="rtl"] .brand-content,
[dir="rtl"] .vision-content,
[dir="rtl"] .footer,
[dir="rtl"] .menu-price,
[dir="rtl"] .special-inner,
[dir="rtl"] .application-form,
[dir="rtl"] .label-title-edit,
[dir="rtl"] .section-title,
[dir="rtl"] .our-brands-title,
[dir="rtl"] .steakquette-title,
[dir="rtl"] .vision-title,
[dir="rtl"] .hero-content,
[dir="rtl"] .company-overview,
[dir="rtl"] .values-section,
[dir="rtl"] .brand-frame,
[dir="rtl"] .more-about-link,
[dir="rtl"] .phone-number-text,
[dir="rtl"] .language-text-en,
[dir="rtl"] .reservation-card,
[dir="rtl"] .flip-card-back,
[dir="rtl"] .nav-menu-tabs,
[dir="rtl"] .media-body,
[dir="rtl"] .testimonial,
[dir="rtl"] .font-alt,
[dir="rtl"] .font-weight-700,
[dir="rtl"] .letter-spacing-medium {
    font-family: "Tajawal", sans-serif !important;
}

@media (min-width: 992px) {
    [dir="rtl"] #CompanyOverview .col-lg-5.mb-6.mb-lg-0 {
        height: 590px !important;
    }
}
@media (max-width: 991px) {
    [dir="rtl"] .footer .text-sm-right p {
        text-align: right !important;
    }
}

[dir="rtl"] .flip-card-back .row .col-sm-6 {
    padding-left: 0 !important;
}

/* ===== FIX ARABIC PHONE NUMBER ORDER ===== */
[dir="rtl"] .phone-number-text {
    direction: ltr !important;
    unicode-bidi: embed !important;
    text-align: left !important;
}

/* Mobile specific fix */
@media (max-width: 991px) {
    [dir="rtl"] .phone-number-text {
        direction: ltr !important;
        unicode-bidi: embed !important;
        transform: none !important ;
    }
}

/* If using data-i18n attribute directly */
[dir="rtl"] [data-i18n="contact.phone"] {
    direction: ltr !important;
    unicode-bidi: embed !important;
}

/* Remove "|" specifically from Home in RTL */
[dir="rtl"] .navbar-expand-lg .navbar-nav li:first-child .nav-link:before {
    content: none !important;
}

.english-image-margin-left {
    margin-left: 10rem !important;
}
