/* Modern Navigation Bar - Real Estate Project
   This stylesheet implements a clean, modern navigation bar with language toggle
*/

/* Main Navigation Styles */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px; /* Fixed height to match hero padding-top */
    box-sizing: border-box;
}

/* Logo Area */
.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

.nav-logo__text {
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo__text:hover {
    color: #2c6ae5;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links__item {
    margin: 0 1rem;
}

.nav-links__link {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.2s ease;
}

.nav-links__link:hover {
    color: #2c6ae5;
}

.nav-links__link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #2c6ae5;
    transition: width 0.3s ease;
}

.nav-links__link:hover:after,
.nav-links__link.active:after {
    width: 100%;
}

/* Language Switcher */
.nav-language {
    display: flex;
    align-items: center;
    margin-left: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.nav-language:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-language__icon {
    color: #2c6ae5;
    margin-right: 0.5rem;
}

.nav-language__text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

/* Mobile Toggle Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #333;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* RTL Support */
html[dir="rtl"] .nav-logo img {
    margin-right: 0;
    margin-left: 0.75rem;
}

html[dir="rtl"] .nav-language {
    margin-left: 0;
    margin-right: 2rem;
}

html[dir="rtl"] .nav-language__icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .nav-links__link:after {
    left: auto;
    right: 0;
}

/* Adjust for hero section spacing */
.hero {
    margin-top: 70px; /* Account for fixed navbar height */
}

/* Hide old language switcher */
.language-switcher {
    display: none !important;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-close {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 4rem 1.5rem 1.5rem;
        transition: right 0.3s ease;
        z-index: 1001;
    }
    
    html[dir="rtl"] .nav-links {
        right: auto;
        left: -300px;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    html[dir="rtl"] .nav-links.active {
        left: 0;
        right: auto;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .nav-links__list {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links__item {
        margin: 0.75rem 0;
        width: 100%;
    }
    
    .nav-links__link {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }
    
    .nav-language {
        margin: 1.5rem 0 0 0;
        align-self: flex-start;
    }
}

.nav-links__link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e74c3c; /* Accent color */
    transition: width 0.3s ease;
}

.nav-links__link:hover::after,
.nav-links__link:focus::after,
.nav-links__link.active::after {
    width: 100%;
}

/* Actions Section */
.nav-actions {
    display: flex;
    align-items: center;
}

/* Language Toggle */
.nav-language {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 1.5rem;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.nav-language:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-language__icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.nav-language__text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Menu Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    color: #fff;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.8rem 1rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 4rem;
        transition: right 0.3s ease;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links__list {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links__item {
        margin: 0;
        width: 100%;
    }
    
    .nav-links__link {
        padding: 1rem 2rem;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links__link::after {
        display: none;
    }
    
    .nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.85);
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .nav-language {
        margin: 1rem 2rem;
    }
    
    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 98;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* RTL Support */
.rtl .nav-logo img {
    margin-right: 0;
    margin-left: 10px;
}

.rtl .nav-language__icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

.rtl .nav-links {
    right: auto;
    left: -100%;
}

.rtl .nav-links.active {
    right: auto;
    left: 0;
}

.rtl .nav-close {
    right: auto;
    left: 1rem;
}

.rtl .nav-links__link::after {
    left: auto;
    right: 0;
}

/* Animation for navbar on scroll */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.main-nav.scrolled-up {
    transform: translateY(-100%);
}

.main-nav.scrolled-down {
    transform: translateY(0);
    animation: slideDown 0.3s ease;
}

/* Adjust main content to account for fixed navbar */
.main-content {
    padding-top: 70px; /* Adjust based on navbar height */
}
