/* Arabic Language Specific Styles */

/* RTL Layout for Arabic */
[dir="rtl"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation RTL */
[dir="rtl"] .navbar-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
}

[dir="rtl"] .navbar-nav .nav-link {
    padding-left: 1rem !important;
    padding-right: 0.5rem !important;
}

[dir="rtl"] .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

/* Text Alignment RTL */
[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

/* Hero Section RTL */
[dir="rtl"] .hero-buttons .btn {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .hero-buttons .btn:last-child {
    margin-left: 0;
}

/* Feature Items RTL */
[dir="rtl"] .feature-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .about-features .feature-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .package-features li {
    flex-direction: row-reverse;
    text-align: right;
}

/* Contact Items RTL */
[dir="rtl"] .contact-item h5 {
    text-align: center;
}

/* Social Links RTL */
[dir="rtl"] .social-links {
    direction: ltr; /* Keep social icons LTR */
}

/* Package Cards RTL */
[dir="rtl"] .package-card .package-body {
    text-align: right;
}

[dir="rtl"] .package-features {
    text-align: right;
}

/* Room Types RTL */
[dir="rtl"] .room-types {
    justify-content: flex-end;
}

/* Buttons RTL */
[dir="rtl"] .btn {
    text-align: center;
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
    [dir="rtl"] .hero-buttons {
        text-align: center;
    }
    
    [dir="rtl"] .hero-buttons .btn {
        margin: 0;
        margin-bottom: 1rem;
    }
    
    [dir="rtl"] .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

/* LTR Layout for English */
[dir="ltr"] {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation LTR */
[dir="ltr"] .navbar-nav {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="ltr"] .dropdown-menu {
    left: 0 !important;
    right: auto !important;
}

/* Text Alignment LTR */
[dir="ltr"] .text-start {
    text-align: left !important;
}

[dir="ltr"] .text-end {
    text-align: right !important;
}

/* Hero Section LTR */
[dir="ltr"] .hero-buttons .btn {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="ltr"] .hero-buttons .btn:last-child {
    margin-right: 0;
}

/* Feature Items LTR */
[dir="ltr"] .feature-item {
    flex-direction: row;
}

[dir="ltr"] .about-features .feature-item {
    flex-direction: row;
}

[dir="ltr"] .package-features li {
    flex-direction: row;
    text-align: left;
}

/* Package Cards LTR */
[dir="ltr"] .package-card .package-body {
    text-align: left;
}

[dir="ltr"] .package-features {
    text-align: left;
}

/* Room Types LTR */
[dir="ltr"] .room-types {
    justify-content: flex-start;
}

/* Language Specific Typography */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, 
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-weight: 600;
}

[dir="rtl"] .display-4, [dir="rtl"] .display-5 {
    font-weight: 700;
}

/* Arabic Number Formatting */
[dir="rtl"] .price-badge,
[dir="rtl"] .currency-symbol {
    direction: ltr;
    unicode-bidi: embed;
}

/* Phone Numbers in RTL - Force LTR display */
[dir="rtl"] .phone-number {
    direction: ltr !important;
    unicode-bidi: embed !important;
    display: inline-block !important;
    text-align: left !important;
}

/* Phone Input Fields */
[dir="rtl"] .phone-input,
[dir="rtl"] input[type="tel"] {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed !important;
}

/* Navbar Brand RTL/LTR */
.navbar-brand {
    order: -1;
}

[dir="rtl"] .navbar-brand {
    order: 1;
}

/* Dropdown Adjustments */
[dir="rtl"] .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 0.255em;
}

/* Form Elements RTL */
[dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea {
    text-align: right;
}

[dir="ltr"] input, [dir="ltr"] select, [dir="ltr"] textarea {
    text-align: left;
}

/* Icon Positioning */
[dir="rtl"] .fas, [dir="rtl"] .fab {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="ltr"] .fas, [dir="ltr"] .fab {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* Specific Icon Adjustments */
[dir="rtl"] .package-features i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="ltr"] .package-features i {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* Footer RTL/LTR */
[dir="rtl"] .text-md-end {
    text-align: right !important;
}

[dir="ltr"] .text-md-end {
    text-align: right !important;
}

@media (max-width: 768px) {
    [dir="rtl"] .text-md-end,
    [dir="ltr"] .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Currency and Language Selectors */
.navbar-nav .dropdown {
    direction: ltr;
}

[dir="rtl"] .navbar-nav .dropdown-menu {
    text-align: right;
}

[dir="ltr"] .navbar-nav .dropdown-menu {
    text-align: left;
}

/* Bootstrap Override for RTL */
[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Contact Section Alignment */
[dir="rtl"] .contact-item {
    text-align: center;
}

[dir="ltr"] .contact-item {
    text-align: center;
}

/* Package Filter Buttons */
[dir="rtl"] .package-filters {
    direction: rtl;
}

[dir="ltr"] .package-filters {
    direction: ltr;
}

/* Price Display */
.price-display {
    direction: ltr;
    unicode-bidi: embed;
}

/* All numeric content should be LTR in RTL layout */
[dir="rtl"] .currency-symbol,
[dir="rtl"] .phone-number,
[dir="rtl"] .price-badge {
    direction: ltr !important;
    unicode-bidi: embed !important;
    display: inline-block !important;
}

[dir="rtl"] .price-cell {
    direction: ltr !important;
    unicode-bidi: embed !important;
}

/* Numbers in contact section */
[dir="rtl"] .contact-item a[href^="tel:"],
[dir="rtl"] .contact-item a[href*="wa.me"] {
    direction: ltr !important;
    unicode-bidi: embed !important;
    display: inline-block !important;
    text-align: center !important;
}

/* Arabic Fonts Enhancement */
[dir="rtl"] {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    text-rendering: optimizeLegibility;
}

/* Line Height Adjustments for Arabic */
[dir="rtl"] p, [dir="rtl"] li {
    line-height: 1.8;
}

[dir="ltr"] p, [dir="ltr"] li {
    line-height: 1.6;
}

/* Smooth Transitions for Language Switch */
.navbar-nav, .hero-content, .package-card, .contact-item {
    transition: all 0.3s ease;
}