/* Base Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    margin-bottom: 15px;
}

section {
    padding: 80px 0;
}

.btn-primary, .btn-secondary, .btn-booking {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #25a25a;
    transform: translateY(-3px);
}

.btn-booking {
    background-color: var(--dark-color);
    color: white;
    margin: 5px;
}

.btn-booking:hover {
    background-color: #1a252f;
    transform: translateY(-3px);
}
/* Dropdown Menu - General Styles for both LTR and RTL */
.dropdown {
    display: none; /* Hidden by default, shown on mobile */
    position: relative;
}

.dropbtn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
    padding: 10px;
    font-size: 24px;
}

.dropbtn:focus {
    outline: none;
}

.dropdown-content {
    display: none; /* Hidden by default, shown when menu is active */
    position: absolute;
    /* For LTR (English), it defaults to right: 0 */
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
}

/* Ensure dropdown content links remain block-level for stacking */
.dropdown-content a {
    color: var(--dark-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block; /* IMPORTANT: Makes each link take full width and stack */
    text-align: left; /* Default text alignment for LTR */
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.show {
    display: block; /* Class added by JavaScript to show the dropdown */
}

/* Language selector within the dropdown (mobile) */
.dropdown-language-selector {
    padding: 12px 16px;
    display: flex; /* Use flexbox to arrange language buttons side-by-side */
    justify-content: center; /* Center the language buttons horizontally */
    gap: 10px; /* Space between the language buttons */
    border-top: 1px solid #f1f1f1; /* Visual separator from navigation links */
    margin-top: 10px; /* Space from above navigation links */
}

.dropdown-language-selector .lang-btn {
    width: 100%; /* Make buttons fill the available space within their flex container */
    box-sizing: border-box; /* Include padding and border in the width calculation */
    padding: 8px 12px;
    font-size: 0.9em;
    /* General styles for lang-btn, also used by desktop version */
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark-color); /* Ensure readability */
}

/* RTL (Hebrew) Specific Adjustments */
body.rtl .dropdown-content {
    right: auto; /* Override right:0 for RTL */
    left: 0;    /* Position dropdown from the left edge */
}

body.rtl .dropdown-content a,
body.rtl .dropdown-language-selector .lang-btn {
    direction: rtl; /* Set text direction to Right-to-Left */
    text-align: right; /* Align text to the right within the elements */
}

.show {
    display: block;
}

/* Header */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    position: relative;
    display: inline-block;
}

.logo-image {
    height: 50px;
    width: auto;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

.toggle-logo-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: var(--dark-color);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.toggle-logo-btn:hover {
    opacity: 1;
}

.logo-hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    width: 0;
    margin: 0;
    padding: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.logo p {
    font-size: 0.9rem;
    color: var(--dark-color);
}

/* Desktop Navigation */
.desktop-nav ul {
    display: flex;
}

.desktop-nav ul li {
    margin-left: 20px;
}

/* Language Selector */
/* Remove the comment block around this */
.language-selector {
    margin-left: 20px; /* Adjust as needed for desktop */
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: white;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Ensure text is readable */
    color: var(--dark-color);
    font-size: 0.9rem; /* Adjust font size if necessary */
}

.lang-btn:hover {
    background-color: #f0f0f0;
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* New styles for language selector inside dropdown */
.dropdown-language-selector {
    padding: 12px 16px; /* Match dropdown link padding */
    display: flex;
    justify-content: center; /* Center the buttons */
    gap: 10px; /* Space between buttons */
    border-top: 1px solid #f1f1f1; /* Add a separator */
    margin-top: 10px; /* Space from above links */
}

.dropdown-language-selector .lang-btn {
    width: 100%; /* Make buttons fill the space */
    box-sizing: border-box; /* Include padding and border in width */
    padding: 8px 12px;
    font-size: 0.9em;
}

/* Adjust desktop nav language buttons */
.desktop-nav ul li .lang-btn {
    /* Ensure these are styled similarly to the main lang-btn */
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: white;
    color: var(--dark-color);
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.desktop-nav ul li .lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/general/c6ab987f-3918-4e43-87c9-a27dbbe3d6e3.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 0;
    padding-top: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* About Section */
.about h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.feature {
    text-align: center;
    padding: 15px;
    border-radius: 5px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* Apartments Section */
.apartments {
    background-color: #f1f1f1;
}

.apartments h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.apartment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.apartment-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.apartment-card:hover {
    transform: translateY(-10px);
}

.apartment-image {
    height: 250px;
    overflow: hidden;
}

.apartment-image img {
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.apartment-card:hover .apartment-image img {
    transform: scale(1.1);
}

.apartment-content {
    padding: 20px;
}

.apartment-content h3 {
    color: var(--primary-color);
}

.apartment-features {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0;
}

.apartment-features span {
    margin-right: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.apartment-features i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* Gallery Section */
.gallery h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    height: 250px;
}

.gallery-item img {
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Location Section */
.location {
    background-color: #f1f1f1;
}

.location h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.location-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
}

.location-map {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.location-info {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.location-info h3 {
    color: var(--primary-color);
}

.location-features {
    margin-top: 20px;
}

.location-features li {
    margin-bottom: 10px;
}

.location-features i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Booking Section */
.booking h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.booking-intro {
    text-align: center;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.booking-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.booking-option {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.booking-option:hover {
    transform: translateY(-10px);
}

.booking-option img {
    height: 80px;
    object-fit: contain;
    margin: 0 auto 20px;
}

.booking-option h3 {
    margin-bottom: 20px;
}

.booking-links {
    display: flex;
    flex-direction: column;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    color: var(--primary-color);
}

.footer-links h4, .footer-contact h4 {
    color: var(--light-color);
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #bbb;
}

.footer-links ul li a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-contact a {
    color: #bbb;
}

.footer-contact a:hover {
    color: white;
}

.social-links {
    display: flex;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.social-links i {
    color: white;
    font-size: 1.2rem;
    margin-right: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content,
    .location-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    header .container {
        flex-wrap: wrap;
    }
    
    .logo {
        margin-bottom: 10px;
    }
    
    .language-selector {
        margin: 15px 0 0 0;
    }
}

@media (max-width: 768px) {
    /* Show dropdown, hide desktop nav */
    .dropdown {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
    
    /* Header layout */
    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Logo adjustments */
    .logo {
        flex: 1;
        margin-bottom: 0;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .toggle-logo-btn {
        top: -3px;
        right: -3px;
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    /* Language selector positioning */
    .language-selector {
        position: absolute;
        top: 15px;
        right: 70px;
        margin: 0;
    }
    
    /* Other mobile adjustments */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    /* Header adjustments */
    header {
        padding: 10px 0;
    }
    
    /* Content adjustments */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    /* Logo adjustments */
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    .toggle-logo-btn {
        top: -2px;
        right: -2px;
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
    
    /* Uncomment and improve the small screen logo adjustments */
    .logo {
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }
    
    .logo-image {
        height: 30px;
    }
    
    /* Adjust language selector */
    .language-selector {
        right: 60px;
    }
    
    .lang-btn {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    /* Further reduce header elements */
    .logo-text p {
        display: none; /* Hide subtitle on extremely small screens */
    }
    
    .logo-image {
        height: 25px;
    }
    
    /* Adjust language selector */
    .language-selector {
        right: 55px;
    }
}

/* RTL Support for Hebrew */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl nav ul li {
    margin-right: 20px;
    margin-left: 0;
}

.rtl .language-selector {
    margin-right: 20px;
    margin-left: 0;
}

.rtl .feature i,
.rtl .location-features i,
.rtl .apartment-features i,
.rtl .footer-contact i {
    margin-left: 10px;
    margin-right: 0;
}

.rtl .social-links a {
    margin-left: 10px;
    margin-right: 0;
}

/* Translation Modal Styles */
.translate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.translate-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.translate-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.language-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.language-list button {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-list button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}