/* RTL Styles for ShalomTemple */

/* RTL Body and HTML */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* RTL Mode Class */
.rtl-mode {
    direction: rtl;
    text-align: right;
}

/* RTL Typography */
[dir="rtl"] .font-heading {
    font-family: 'Playfair Display', 'David Libre', 'Frank Ruehl CLM', serif !important;
}

[dir="rtl"] .font-body {
    font-family: 'Inter', 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif !important;
}

/* RTL Spacing Utilities */
[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

[dir="rtl"] .space-x-8 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 2rem !important;
}

/* RTL Margin Utilities */
[dir="rtl"] .ml-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

[dir="rtl"] .ml-3 {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

[dir="rtl"] .mr-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .mr-3 {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

/* RTL Padding Utilities */
[dir="rtl"] .pl-4 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

[dir="rtl"] .pl-6 {
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}

[dir="rtl"] .pr-4 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

[dir="rtl"] .pr-6 {
    padding-right: 0 !important;
    padding-left: 1.5rem !important;
}

/* RTL Border Utilities */
[dir="rtl"] .border-l-4 {
    border-left-width: 0 !important;
    border-right-width: 4px !important;
}

[dir="rtl"] .border-r-4 {
    border-right-width: 0 !important;
    border-left-width: 4px !important;
}

/* RTL Text Alignment */
[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

/* RTL Dropdown Positioning */
[dir="rtl"] .dropdown-menu,
[dir="rtl"] .group .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

[dir="rtl"] .group:hover .dropdown-menu {
    transform: translateY(0) !important;
}

/* RTL Dropdown for rtl-mode class */
.rtl-mode .dropdown-menu,
.rtl-mode .group .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

.rtl-mode .group:hover .dropdown-menu {
    transform: translateY(0) !important;
}

/* RTL Mobile Menu */
[dir="rtl"] #mobile-menu .fixed {
    right: 0 !important;
    left: auto !important;
}

/* RTL Mobile Menu for rtl-mode class */
.rtl-mode #mobile-menu .fixed {
    right: 0 !important;
    left: auto !important;
}

/* RTL Flex Direction */
[dir="rtl"] .flex-row-reverse {
    flex-direction: row-reverse !important;
}

/* RTL Transform Utilities */
[dir="rtl"] .transform {
    transform: scaleX(-1) !important;
}

/* RTL Icon Positioning */
[dir="rtl"] .fas.fa-chevron-down {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* RTL Navigation Adjustments */
[dir="rtl"] .header-sticky .justify-between {
    flex-direction: row-reverse !important;
}

/* RTL Mobile Menu Positioning */
[dir="rtl"] .mobile-dropdown {
    padding-right: 1rem !important;
    padding-left: 0 !important;
}

/* RTL Form Elements */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right !important;
}

[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder {
    text-align: right !important;
}

/* RTL Button Adjustments */
[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-secondary,
[dir="rtl"] .btn-outline {
    text-align: center !important;
}

/* RTL Grid Adjustments */
[dir="rtl"] .grid {
    direction: rtl !important;
}

/* RTL Footer Adjustments */
[dir="rtl"] footer .flex {
    flex-direction: row-reverse !important;
}

/* RTL Social Icons */
[dir="rtl"] .social-icons {
    flex-direction: row-reverse !important;
}

/* RTL Card Content */
[dir="rtl"] .card {
    text-align: right !important;
}

[dir="rtl"] .card .text-center {
    text-align: center !important;
}

/* RTL Animation Adjustments */
[dir="rtl"] .fade-right {
    transform: translateX(30px) !important;
}

[dir="rtl"] .fade-left {
    transform: translateX(-30px) !important;
}

/* RTL Responsive Adjustments */
@media (max-width: 1024px) {
    [dir="rtl"] .lg\:flex {
        flex-direction: row-reverse !important;
    }
}

@media (max-width: 768px) {
    [dir="rtl"] .md\:flex-row {
        flex-direction: column-reverse !important;
    }
    
    [dir="rtl"] .mobile-menu {
        left: 0 !important;
        right: auto !important;
    }
}

/* RTL Scroll Behavior */
[dir="rtl"] html {
    scroll-behavior: smooth !important;
}

/* RTL List Styles */
[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-right: 1.5rem !important;
    padding-left: 0 !important;
}

/* RTL Table Styles */
[dir="rtl"] table {
    direction: rtl !important;
}

[dir="rtl"] th,
[dir="rtl"] td {
    text-align: right !important;
}

/* RTL Modal Adjustments */
[dir="rtl"] .modal-content {
    text-align: right !important;
}

/* RTL Tooltip Adjustments */
[dir="rtl"] .tooltip {
    direction: rtl !important;
    text-align: right !important;
}

/* RTL Breadcrumb */
[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse !important;
}

/* RTL Progress Bar */
[dir="rtl"] .progress-bar {
    direction: rtl !important;
}

/* RTL Carousel/Slider */
[dir="rtl"] .carousel,
[dir="rtl"] .slider {
    direction: rtl !important;
}

/* RTL Tab Navigation */
[dir="rtl"] .tab-nav {
    flex-direction: row-reverse !important;
}

/* RTL Accordion */
[dir="rtl"] .accordion-header {
    text-align: right !important;
}

/* RTL Search Box */
[dir="rtl"] .search-box {
    direction: rtl !important;
}

[dir="rtl"] .search-box input {
    text-align: right !important;
    padding-right: 2.5rem !important;
    padding-left: 1rem !important;
}

[dir="rtl"] .search-icon {
    right: auto !important;
    left: 0.75rem !important;
}

/* RTL Notification/Alert */
[dir="rtl"] .alert {
    text-align: right !important;
}

/* RTL Badge/Tag */
[dir="rtl"] .badge,
[dir="rtl"] .tag {
    direction: rtl !important;
}

/* RTL Sidebar */
[dir="rtl"] .sidebar {
    right: 0 !important;
    left: auto !important;
}

/* RTL Mega Menu */
[dir="rtl"] .mega-menu {
    right: 0 !important;
    left: auto !important;
    text-align: right !important;
}

/* RTL Sticky Elements */
[dir="rtl"] .sticky-element {
    right: 1rem !important;
    left: auto !important;
}

/* RTL Floating Action Button */
[dir="rtl"] .fab {
    right: auto !important;
    left: 1rem !important;
}

/* RTL Timeline */
[dir="rtl"] .timeline {
    direction: rtl !important;
}

[dir="rtl"] .timeline-item {
    text-align: right !important;
}

/* RTL Code Blocks */
[dir="rtl"] pre,
[dir="rtl"] code {
    direction: ltr !important;
    text-align: left !important;
}

/* RTL Email/URL Links */
[dir="rtl"] a[href^="mailto:"],
[dir="rtl"] a[href^="http://"],
[dir="rtl"] a[href^="https://"] {
    direction: ltr !important;
    unicode-bidi: embed !important;
}

/* RTL Numbers and Dates */
[dir="rtl"] .number,
[dir="rtl"] .date,
[dir="rtl"] .time {
    direction: ltr !important;
    unicode-bidi: embed !important;
}

/* RTL Phone Numbers */
[dir="rtl"] .phone,
[dir="rtl"] a[href^="tel:"] {
    direction: ltr !important;
    unicode-bidi: embed !important;
}

/* RTL Social Media Links */
[dir="rtl"] .social-link {
    direction: ltr !important;
}

/* RTL Video/Audio Controls */
[dir="rtl"] video,
[dir="rtl"] audio {
    direction: ltr !important;
}

/* RTL Map Containers */
[dir="rtl"] .map-container {
    direction: ltr !important;
}

/* RTL Chart/Graph Containers */
[dir="rtl"] .chart,
[dir="rtl"] .graph {
    direction: ltr !important;
}
/* Ad
ditional RTL Support for rtl-mode class */

/* RTL Typography for rtl-mode */
.rtl-mode .font-heading {
    font-family: 'Playfair Display', 'David Libre', 'Frank Ruehl CLM', serif !important;
}

.rtl-mode .font-body {
    font-family: 'Inter', 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif !important;
}

/* RTL Spacing Utilities for rtl-mode */
.rtl-mode .space-x-3 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

.rtl-mode .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

.rtl-mode .space-x-8 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 2rem !important;
}

/* RTL Margin Utilities for rtl-mode */
.rtl-mode .ml-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

.rtl-mode .ml-3 {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

.rtl-mode .mr-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

.rtl-mode .mr-3 {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

/* RTL Padding Utilities for rtl-mode */
.rtl-mode .pl-4 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

.rtl-mode .pl-6 {
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}

.rtl-mode .pr-4 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

.rtl-mode .pr-6 {
    padding-right: 0 !important;
    padding-left: 1.5rem !important;
}

/* RTL Border Utilities for rtl-mode */
.rtl-mode .border-l-4 {
    border-left-width: 0 !important;
    border-right-width: 4px !important;
}

.rtl-mode .border-r-4 {
    border-right-width: 0 !important;
    border-left-width: 4px !important;
}

/* RTL Text Alignment for rtl-mode */
.rtl-mode .text-left {
    text-align: right !important;
}

.rtl-mode .text-right {
    text-align: left !important;
}

/* RTL Icon Positioning for rtl-mode */
.rtl-mode .fas.fa-chevron-down {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* RTL Navigation Adjustments for rtl-mode */
.rtl-mode .header-sticky .justify-between {
    flex-direction: row-reverse !important;
}

/* RTL Mobile Menu Positioning for rtl-mode */
.rtl-mode .mobile-dropdown {
    padding-right: 1rem !important;
    padding-left: 0 !important;
}

/* RTL Form Elements for rtl-mode */
.rtl-mode input,
.rtl-mode textarea,
.rtl-mode select {
    text-align: right !important;
}

.rtl-mode input::placeholder,
.rtl-mode textarea::placeholder {
    text-align: right !important;
}

/* RTL Button Adjustments for rtl-mode */
.rtl-mode .btn-primary,
.rtl-mode .btn-secondary,
.rtl-mode .btn-outline {
    text-align: center !important;
}

/* RTL Grid Adjustments for rtl-mode */
.rtl-mode .grid {
    direction: rtl !important;
}

/* RTL Footer Adjustments for rtl-mode */
.rtl-mode footer .flex {
    flex-direction: row-reverse !important;
}

/* RTL Social Icons for rtl-mode */
.rtl-mode .social-icons {
    flex-direction: row-reverse !important;
}

/* RTL Card Content for rtl-mode */
.rtl-mode .card {
    text-align: right !important;
}

.rtl-mode .card .text-center {
    text-align: center !important;
}

/* RTL Animation Adjustments for rtl-mode */
.rtl-mode .fade-right {
    transform: translateX(30px) !important;
}

.rtl-mode .fade-left {
    transform: translateX(-30px) !important;
}

/* RTL List Styles for rtl-mode */
.rtl-mode ul,
.rtl-mode ol {
    padding-right: 1.5rem !important;
    padding-left: 0 !important;
}

/* RTL Table Styles for rtl-mode */
.rtl-mode table {
    direction: rtl !important;
}

.rtl-mode th,
.rtl-mode td {
    text-align: right !important;
}

/* RTL Modal Adjustments for rtl-mode */
.rtl-mode .modal-content {
    text-align: right !important;
}

/* RTL Tooltip Adjustments for rtl-mode */
.rtl-mode .tooltip {
    direction: rtl !important;
    text-align: right !important;
}

/* RTL Breadcrumb for rtl-mode */
.rtl-mode .breadcrumb {
    flex-direction: row-reverse !important;
}

/* RTL Progress Bar for rtl-mode */
.rtl-mode .progress-bar {
    direction: rtl !important;
}

/* RTL Carousel/Slider for rtl-mode */
.rtl-mode .carousel,
.rtl-mode .slider {
    direction: rtl !important;
}

/* RTL Tab Navigation for rtl-mode */
.rtl-mode .tab-nav {
    flex-direction: row-reverse !important;
}

/* RTL Accordion for rtl-mode */
.rtl-mode .accordion-header {
    text-align: right !important;
}

/* RTL Search Box for rtl-mode */
.rtl-mode .search-box {
    direction: rtl !important;
}

.rtl-mode .search-box input {
    text-align: right !important;
    padding-right: 2.5rem !important;
    padding-left: 1rem !important;
}

.rtl-mode .search-icon {
    right: auto !important;
    left: 0.75rem !important;
}

/* RTL Notification/Alert for rtl-mode */
.rtl-mode .alert {
    text-align: right !important;
}

/* RTL Badge/Tag for rtl-mode */
.rtl-mode .badge,
.rtl-mode .tag {
    direction: rtl !important;
}

/* RTL Sidebar for rtl-mode */
.rtl-mode .sidebar {
    right: 0 !important;
    left: auto !important;
}

/* RTL Mega Menu for rtl-mode */
.rtl-mode .mega-menu {
    right: 0 !important;
    left: auto !important;
    text-align: right !important;
}

/* RTL Sticky Elements for rtl-mode */
.rtl-mode .sticky-element {
    right: 1rem !important;
    left: auto !important;
}

/* RTL Floating Action Button for rtl-mode */
.rtl-mode .fab {
    right: auto !important;
    left: 1rem !important;
}

/* RTL Timeline for rtl-mode */
.rtl-mode .timeline {
    direction: rtl !important;
}

.rtl-mode .timeline-item {
    text-align: right !important;
}

/* RTL Back to Top Button for rtl-mode */
.rtl-mode #back-to-top {
    right: auto !important;
    left: 1.5rem !important;
}

/* RTL Responsive Adjustments for rtl-mode */
@media (max-width: 1024px) {
    .rtl-mode .lg\:flex {
        flex-direction: row-reverse !important;
    }
}

@media (max-width: 768px) {
    .rtl-mode .md\:flex-row {
        flex-direction: column-reverse !important;
    }
    
    .rtl-mode .mobile-menu {
        left: auto !important;
        right: 0 !important;
    }
}

/* Fix specific RTL issues */
.rtl-mode .absolute.top-full.right-0 {
    right: 0 !important;
    left: auto !important;
}

.rtl-mode .absolute.top-full.left-0 {
    right: 0 !important;
    left: auto !important;
}

/* RTL Flex utilities */
.rtl-mode .justify-between {
    justify-content: space-between !important;
}

.rtl-mode .items-center {
    align-items: center !important;
}

/* RTL specific fixes for navigation */
.rtl-mode nav .flex.items-center.justify-between {
    flex-direction: row !important;
}

.rtl-mode .hidden.lg\:flex.items-center {
    flex-direction: row-reverse !important;
}

/* RTL specific fixes for mobile menu positioning */
.rtl-mode #mobile-menu > div {
    right: 0 !important;
    left: auto !important;
}