@import url('https://fonts.googleapis.com/css2?family=Amaranth:ital,wght@0,400;0,700;1,400;1,700&family=Lexend:wght@100..900&display=swap');

/* === BASE === */
.navbar {
    background-color: #B8860b;
    color: white;
    font-family: "Lexend", sans-serif;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    opacity: 1;
    transition: background-color 0.3s ease;
}

.navbar:hover {
    background-color: #b87e0b;
}

.navbar-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
}

.navbar-left {
    justify-self: start;
}

.navbar-logo img {
    height: 120px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 0.2rem rgba(0,0,0,0.3));
}

.navbar-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 0.4rem rgba(0,0,0,0.5));
}

/* === LANGUAGE SWITCHER === */
.language-switcher {
    justify-self: center;
    position: relative;
    user-select: none;
}

.language-btn {
    font-family: "Lexend", sans-serif;
    background: transparent;
    color: white;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.language-btn:hover,
.language-btn:focus {
    transform: scale(1.1);
    background-color: rgba(255,255,255,0.15);
    outline: none;
}

.language-menu {
    position: absolute;
    right: 0;
    top: 120%;
    background-color: white;
    color: #333;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    display: none;
    z-index: 1001;
    min-width: 160px;
}

.language-menu.show {
    display: block;
}

.language-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.language-menu li a:hover,
.language-menu li a:focus {
    background-color: #f0f0f0;
    outline: none;
    border-left: 4px solid #00BFFF;
}

.flag-icon {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    flex-shrink: 0;
}

/* === HAMBURGER === */
.navbar-right {
    justify-self: end;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 26px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.navbar-toggle .bar {
    height: 3.5px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

.navbar-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === MENU === */
.navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-menu {
    display: flex;
    gap: 2.25rem;
}

.desktop-menu .navbar-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.desktop-menu .navbar-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #111111, #333333);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.desktop-menu .navbar-link:hover,
.desktop-menu .navbar-link:focus {
    background-color: #000000;
    transform: translateY(-3px);
    outline: none;
}

.desktop-menu .navbar-link:hover::after,
.desktop-menu .navbar-link:focus::after {
    width: 100%;
}

/* === MOBILE MENU === */
.mobile-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: #B8860b; /* ✅ background updated */
    transition: max-height 0.4s ease-in-out;
}

.mobile-menu.active {
    max-height: 600px;
    padding: 1rem 0;
}

.mobile-menu .navbar-item {
    width: 100%;
    padding: 0.5rem 1.5rem;
}

.mobile-menu .navbar-link {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu .navbar-link:hover,
.mobile-menu .navbar-link:focus {
    background-color: #000000; /* ✅ hover color updated */
    outline: none;
}

.mobile-menu .navbar-item + .navbar-item {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* === SCROLL TO TOP BUTTON === */
.go-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(184, 134, 11, 0.5); /* semi-transparent */
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.go-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* === RTL SUPPORT === */
.rtl-menu {
    direction: rtl;
    text-align: right;
}

.rtl-menu .navbar-item {
    float: right;
}

.rtl-menu .navbar-link {
    padding-right: 1.2rem;
    padding-left: 0.5rem;
    text-align: right;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .navbar-toggle {
        display: flex;
    }

    .desktop-menu {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    .navbar-logo img {
        height: 90px;
    }
}
