/* General Styles */
body {
    font-family: 'Rubik', sans-serif;
    direction: ltr; /* Default to LTR */
    transition: direction 0.3s ease;
}

body[dir="rtl"] {
    text-align: right; /* Ensure text aligns right in RTL mode */
}

/* Specific RTL adjustments for mobile menu if needed */
body[dir="rtl"] .mobile-menu nav {
    align-items: flex-end; /* Align mobile menu items to the right */
}

body[dir="rtl"] .mobile-menu-close {
    left: 1.5rem; /* Move close button to left in RTL */
    right: auto;
}

.hidden-lang {
    display: none;
}

/* Custom Colors - Consolidated and simplified */
/* These classes are used by Tailwind JIT */
.text-beit-meryam-red { color: #e53e3e; }
.bg-beit-meryam-red { background-color: #e53e3e; }
.hover\:bg-beit-meryam-red-dark:hover { background-color: #c53030; }
.text-beit-meryam-gray { color: #4a5568; } /* Example: a darker gray for contrast */

/* Language Switcher Buttons */
.lang-switcher button {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: transparent;
    color: #cbd5e0; /* gray-400 */
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.lang-switcher button.active {
    background-color: #e53e3e; /* beit-meryam-red */
    color: white;
}

/* Header and Navigation */
header {
    font-family: 'Rubik', sans-serif;
}

/* Custom Styles for Desktop Navigation Links */
.nav-link-desktop {
    display: inline-flex; /* Use inline-flex to allow side-by-side layout while respecting padding */
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem; /* Consistent padding */
    border-radius: 0.5rem; /* Consistent rounded corners */
    color: #4a5568; /* Default text color (gray-800) */
    text-decoration: none; /* Ensure no underline by default */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for both background and text color */
}

.nav-link-desktop:hover {
    background-color: #e53e3e; /* Beit Meryam Red on hover */
    color: white; /* White text on hover */
}


.mobile-menu {
    position: fixed;
    top: 0;
    left: 0; /* Always start from left edge for LTR */
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%); /* Default: slides in from right (hidden off-screen right) */
    transition: transform 0.3s ease-in-out;
    z-index: 40;
}

.mobile-menu.active {
    transform: translateX(0); /* Slides into view */
}

body[dir="rtl"] .mobile-menu {
    right: 0; /* In RTL, start from right edge */
    left: auto; /* Ensure left is not set */
    transform: translateX(-100%); /* In RTL: slides in from left (hidden off-screen left) */
}

body[dir="rtl"] .mobile-menu.active {
    transform: translateX(0); /* Slides into view */
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem; /* Default LTR position */
    font-size: 2rem;
    background: none;
    border: none;
    color: #4a5568; /* gray-700 */
    cursor: pointer;
}

body[dir="rtl"] .mobile-menu-close {
    right: auto;
    left: 1.5rem; /* RTL position */
}

.mobile-nav-link {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 600; /* font-semibold */
    color: #2d3748; /* gray-800 */
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Add text-align for mobile links for RTL */
    text-align: center; /* Default to center */
}

body[dir="rtl"] .mobile-nav-link {
    text-align: right; /* Align to right in RTL */
}

.mobile-nav-link:hover {
    background-color: #e53e3e; /* beit-meryam-red */
    color: white;
}

/* RTL Adjustments for spacing and margins */
/* Generic override for Tailwind's space-x- utilities */
body[dir="rtl"] [class*="space-x-"] > *:not([hidden]) ~ *:not([hidden]) {
    margin-left: 0 !important;
    margin-right: var(--tw-space-x-reverse, 0) !important; /* Default to 0 if variable not found */
}

/* Specific overrides for common Tailwind horizontal spacing classes */
body[dir="rtl"] .space-x-2 > *:not([hidden]) ~ *:not([hidden]) {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}
body[dir="rtl"] .space-x-4 > *:not([hidden]) ~ *:not([hidden]) {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}
body[dir="rtl"] .space-x-6 > *:not([hidden]) ~ *:not([hidden]) {
    margin-right: 1.5rem !important;
    margin-left: 0 !important;
}
body[dir="rtl"] .space-x-8 > *:not([hidden]) ~ *:not([hidden]) {
    margin-right: 2rem !important;
    margin-left: 0 !important;
}

/* Responsive space-x- overrides */
body[dir="rtl"] .md\:space-x-6 > *:not([hidden]) ~ *:not([hidden]) {
    @media (min-width: 768px) {
        margin-right: 1.5rem !important;
        margin-left: 0 !important;
    }
}
body[dir="rtl"] .md\:space-x-8 > *:not([hidden]) ~ *:not([hidden]) {
    @media (min-width: 768px) {
        margin-right: 2rem !important;
        margin-left: 0 !important;
    }
}

/* Reverse specific margin utilities */
body[dir="rtl"] .mr-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}
body[dir="rtl"] .ml-4 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}
body[dir="rtl"] .mr-3 { /* For contact page icons */
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}
body[dir="rtl"] .ml-2 { /* For button icons and camera icons */
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* RTL specific flex direction for header content */
body[dir="rtl"] #top-header-content.md\:flex-row {
    flex-direction: row-reverse;
}

body[dir="rtl"] #main-header-content {
    flex-direction: row-reverse;
}

/* New rule for desktop navigation links order in RTL */
body[dir="rtl"] #desktop-nav {
    flex-direction: row-reverse;
}

/* New rule for menu categories order in RTL */
body[dir="rtl"] #menu-categories {
    flex-direction: row-reverse;
}

/* New rule for menu item title and icon order in RTL */
body[dir="rtl"] .menu-item > div.flex.justify-between.items-center {
    flex-direction: row-reverse;
}


/* Slideshow */
.slideshow-container {
    max-width: 1200px;
    position: relative;
    margin: auto;
    border-radius: 1rem;
    overflow: hidden;
}

.mySlides {
    width: 100%;
    height: auto;
    display: none;
    border-radius: 1rem;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active-dot, .dot:hover {
    background-color: #717171;
}

/* Gallery Section */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-item img {
    display: block;
    transition: transform 0.3s ease-in-out;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 128, 114, 0.7); /* Custom red with opacity */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.5rem; /* text-2xl */
    text-align: center;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Form Styles */
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748; /* gray-800 */
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0; /* gray-300 */
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #4a5568; /* gray-700 */
    background-color: #f7fafc; /* gray-100 */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #e53e3e; /* beit-meryam-red */
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3);
}

/* Modal for Menu Item Images */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Lightbox for Gallery Images */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
}

.lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh; /* Adjust as needed */
    display: block;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

.lightbox-caption {
    color: #f2f2f2;
    font-size: 15px;
    padding: 8px 12px;
    position: absolute;
    bottom: -30px; /* Adjust based on image size and desired position */
    width: 100%;
    text-align: center;
}

/* Animation for menu items */
.menu-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.menu-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Menu Category Button Styles and Animation */
.menu-category-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background-color: #f7fafc; /* gray-100 */
    color: #2d3748; /* gray-800 */
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0; /* gray-300 */
    transition: all 0.3s ease-in-out; /* Smooth transition for all changes */
}

.menu-category-button:hover {
    background-color: #e53e3e; /* Beit Meryam Red on hover */
    color: white; /* White text on hover */
    transform: scale(1.02); /* Slightly enlarge on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow on hover */
}

.menu-category-button.active {
    background-color: #e53e3e; /* Beit Meryam Red when active */
    color: white; /* White text when active */
    transform: translateY(-3px); /* Slight lift when active */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Shadow when active */
    border-color: #e53e3e; /* Red border when active */
}


/* Reveal on scroll for sections */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer Links and Icons Hover Effect */
/* Apply hover effect to all 'a' tags within the footer */
footer a {
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block; /* Ensure transform works */
}

footer a:hover {
    color: #e53e3e; /* Beit Meryam Red on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Specific hover for social media icons if different effect is desired */
.footer .flex.space-x-4 a:hover {
    transform: scale(1.2); /* More pronounced enlarge for social icons */
}


/* Floating WhatsApp Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 1.5rem; /* 24px */
    right: 1.5rem; /* 24px */
    background-color: #25D366; /* WhatsApp green */
    color: white;
    width: 3.5rem; /* 56px */
    height: 3.5rem; /* 56px */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem; /* 32px */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 99; /* Ensure it's above other content */
}

.whatsapp-float-btn:hover {
    background-color: #1DA851; /* Darker green on hover */
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* RTL adjustment for WhatsApp button */
body[dir="rtl"] .whatsapp-float-btn {
    right: auto;
    left: 1.5rem; /* Move to left in RTL */
}
