* {
    font-family: 'Cairo', 'Roboto', sans-serif;
}

.header .nav-links a,
.dropdown-button {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
}

.dropdown-button::after {
    content: ' ▼ ';
    font-size: 12px;
    color: #00aaff; 
    margin-left: 15px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-button::after,
.dropdown:focus-within .dropdown-button::after {
    transform: rotate(180deg);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    min-width: 150px;
    border-radius: 5px;
    z-index: 1;
    padding: 5px 0;
}

.dropdown-content a {
    color: #ffffff;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    text-align: right;
}

.dropdown-content a:hover {
    background-color: #333;
    color: #ffd700;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

.header {
    background-color: #1a1d21;
    color: #fff;
    padding: 15px;
    text-align: center;
    position: relative;
}

.user-message {
    direction: rtl;
}

.header .logo {
    font-size: 20px;
    text-align: center;
    margin-bottom: 10px;
}

.header .logo img {
    width: 100px;  
    height: 100px;
    max-width: 100px;
    display: block; 
    margin: auto; 
    object-fit: cover; 
    border-radius: 50%; 
}

.header .nav-links {
    direction: rtl;
    display: flex; 
    justify-content: center;
    margin: 10px 0;
}

.login-btn, .register-btn, .profile-btn, .logout-btn {
    padding: 10px 20px;
    background-color: #3a9ad9;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    margin: 5px;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.login-btn { background-color: #0056b3; }
.register-btn { background-color: #218838; }
.profile-btn { background-color: #6f42c1; }
.logout-btn { background-color: #dc3545; }

.login-btn:hover { background-color: #007bff; }
.register-btn:hover { background-color: #28a745; }
.profile-btn:hover { background-color: #5a32a3; }
.logout-btn:hover { background-color: #c82333; }

.open-auth-menu-btn {
    display: none;
}

.auth-menu, .auth-menu {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.auth-menu a, .auth-menu a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

.header .nav-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
}

.auth-buttons, .user-buttons {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    justify-content: flex-start; 
    align-items: center;
}

.auth-buttons a, .user-buttons a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

.user-buttons .profile::before,
.user-buttons .logout::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
}

.translate-container {
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 1000;
    position: relative;
}
.translate-icon {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    margin-left: 20px;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 2000;
}

.translate-icon:hover {
    color: #ffcc00;
}

.hiddenx {
    display: none;
}
#google_translate_element,
#google_translate_element * {
    color: #fff !important; 
    font-weight: bold !important; 
}

#google_translate_element a {
    color: #ffcc00 !important; 
    font-weight: bold !important; 
    margin-left: 5px;
}

.goog-te-gadget select,
.goog-te-combo {
    font-family: 'Cairo', 'Roboto', sans-serif !important;
    font-size: 14px !important;
    color: #fff !important;
    background-color: #000 !important; 
    font-weight: bold;
    border: 1px solid #ffcc00;
    padding: 5px;
    border-radius: 5px;
    outline: none;
    width: auto;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    padding-right: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 10px;
}

.goog-te-combo option {
    background-color: #000;
    color: #fff;
    padding: 5px;
    border: none;
}

.goog-te-combo:focus {
    border-color: #fff;
    box-shadow: 0 0 5px #ffcc00;
}

#google_translate_element img {
    width: 42px;
    height: auto; 
    object-fit: contain;
    margin-left: 5px;
}

.goog-te-banner-frame {
    display: none !important;
}

@media (max-width: 768px) {
    .dropdown-content {
        position: absolute; 
        min-width: 70%; 
        max-width: 300px; 
        right: 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        border-radius: 5px;
        z-index: 10;
    }

    .dropdown-button {
        width: auto; 
        text-align: center;
    }

    .dropdown-content a {
        padding: 10px 15px;
        font-size: 16px;
        text-align: center;
    }

    .header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        position: relative;
    }

    .header .logo {
        margin-bottom: 15px;
        text-align: center;
        font-size: 20px;
    }

    .header .logo img {
        width: 100px;  
        height: 100px; 
    }

    .header .nav-links {
        display: none; 
    }

    .sidebar-menu {
        display: none;
        flex-direction: column;
        background-color: #3b4b51;
        position: absolute; 
        top: 50px;
        right: 15px;
        width: auto;
        padding: 10px;
        transition: right 0.3s ease;
        z-index: 1000; 
        border-radius: 15px; 
    }
    

    .sidebar-menu a {
        display: block;
        padding: 5px;
        margin: 5px 0;
        color: #fff;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
    }

    .sidebar-menu a:hover {
        background-color: #1a1d21;
        border-radius: 10px;
    }

    .sidebar-menu.show {
        display: flex;
        right: 0; 
    }

    .open-sidebar-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
    }

    .open-auth-menu-btn {
        display: block;
        position: absolute;
        top: 15px;
        left: 15px;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
    }

    .auth-menu {
        display: none;
        flex-direction: column;
        background-color: #3b4b51;
        position: absolute; 
        top: 50px;
        left: 15px;
        width: auto;
        padding: 10px;
        transition: left 0.3s ease;
        z-index: 1000;
        border-radius: 15px; 
    }

    .auth-menu a {
        display: block;
        padding: 10px;
        margin: 5px 0;
        color: #fff;
        text-align: center;
        text-decoration: none;
        font-size: 18px;
    }
    .auth-menu a:hover {
        background-color: #1a1d21;
        border-radius: 10px;
    }
    .auth-menu.show {
        display: flex;
    }

    .auth-buttons, .user-buttons {
        top: auto;
        left: auto;
        display: none; 
    }

    .open-auth-menu-btn i {
        font-size: 24px; 
        color: #fff; 
        cursor: pointer; 
    }
    .translate-icon {
        right: 50px;
    }
}

@media (min-width: 769px) {
    .open-sidebar-btn {
        display: none; 
    }
    .sidebar-menu {
        display: none; 
    }
}
