/* Navbar Desktop Styles (min-width: 769px) */
#main-navbar {
    background-color: #fff;
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
}

.navbar-logo-img {
    max-height: 120px; /* Increased max-height for desktop */
    height: auto; /* Ensure aspect ratio is maintained */
    width: auto; /* Allow width to be flexible */
    margin-right: 10px; /* Keep existing margin */
}

.desktop-menu {
    display: flex; /* Explicitly show desktop menu on desktop */
    font-family: var(--navbar-font-family);
    font-size: var(--navbar-font-size);
}

.desktop-menu li {
    margin-left: 20px;
}

.desktop-menu .nav-link {
    color: var(--navbar-font-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.desktop-menu .nav-link:hover,
.desktop-menu .nav-link.active {
    color: #007bff; /* Keep a consistent hover color */
}

/* NEW: Desktop Top Right Container */
.desktop-top-right.desktop-only {
    display: flex; /* Show on desktop */
    align-items: center; /* Vertically align items */
    gap: 15px; /* Space between elements */
}

.social-icons.desktop-social { /* Targeted with desktop-social class */
    display: flex; /* Explicitly show social icons on desktop */
    gap: 15px;
    align-items: center; /* Vertically align phone number and social icons */
}

/* Styles for Navbar Phone Number */
.navbar-phone-number {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--navbar-font-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-phone-number:hover {
    color: #007bff;
}

.navbar-phone-number .fas {
    font-size: 1.2rem;
}

.social-icons a {
    color: var(--navbar-font-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #007bff; /* Consistent hover for social icons */
}

/* Language Switcher for Desktop */
.lang-switcher.desktop-only { /* Targeted with desktop-only class */
    position: relative;
    cursor: pointer;
    /* margin-left: 20px; Removed as gap is on parent */
}

.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--navbar-font-color);
    font-weight: 500;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
    background-color: #f0f0f0;
    color: #007bff;
}

.lang-toggle-btn .fas {
    font-size: 1em;
}

.lang-dropdown {
    /* CRITICAL FIX 1: Set opacity 0 and add transition for delay */
    opacity: 0; 
    visibility: hidden; /* Hide it completely when opacity is 0 */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out 0.2s; /* 0.2s delay to hide */
    
    position: absolute;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin-top: 5px; /* Space below the toggle button */
    border-radius: 5px;
    overflow: hidden; /* For rounded corners */
    /* IMPORTANT: Since JS is also used for mobile, we need to ensure this is the default for desktop. 
       Removing display: none, relying on visibility: hidden/opacity: 0 for initial hidden state. */
}

/* CRITICAL FIX 2: Define the hover state to show instantly (no delay) */
.lang-switcher:hover .lang-dropdown {
    opacity: 1; /* Show instantly */
    visibility: visible;
    transition-delay: 0s; /* No delay to show */
}

.lang-dropdown li a {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-dropdown li a:hover {
    background-color: #f1f1f1;
    color: #007bff;
}

/* Hide mobile-only elements on desktop */
.mobile-only {
    display: none !important;
}

/* Mobile bottom menu should always be hidden on desktop */
.mobile-bottom-menu {
    display: none !important;
}