/* ================================================
   HEADER & NAVIGATION STYLES (Binghatti Inspired)
================================================ */

/* --- Base & Scrollbar Styles --- */
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #fff;
    overflow-x: hidden;
}
body.no-scroll {
    overflow: hidden;
}

/* --- Header Bar --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.4s ease;
}

#main-header .logo img {
    height: 70px;
    width: auto;
    transition: height 0.4s ease;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.8));
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-icon {
    cursor: pointer;
    color: #fff;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.8));
}
.search-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}
.search-icon:hover {
    transform: scale(1.1);
}

/* --- Menu Toggle Icon --- */
#menu-toggle {
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1001;
}

#menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.8));
}

#menu-toggle span:nth-child(1) { top: 0px; }
#menu-toggle span:nth-child(2) { top: 9px; }
#menu-toggle span:nth-child(3) { top: 18px; }

/* The 'X' state for the close icon */
#menu-toggle.open span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}
#menu-toggle.open span:nth-child(2) {
    opacity: 0;
    left: -30px;
}
#menu-toggle.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

/* --- Navigation Panel (New Style) --- */
#main-nav {
    position: fixed;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 200px 60px 50px 60px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.7, 0, 0.2, 1);
}

#main-nav.open {
    opacity: 1;
    visibility: visible;
    left: 0;
}

/* --- Links Styling --- */
.nav-left {
    text-align: right;
    margin-bottom: auto;
}
.nav-left ul {
    list-style: none;
    padding: 0;
}

.nav-left ul li {
    margin: 18px 0;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#main-nav.open .nav-left ul li {
    opacity: 1;
    transform: translateX(0);
}

/* حركة ظهور الروابط بالتتابع */
#main-nav.open .nav-left ul li:nth-child(1) { transition-delay: 0.30s; }
#main-nav.open .nav-left ul li:nth-child(2) { transition-delay: 0.35s; }
#main-nav.open .nav-left ul li:nth-child(3) { transition-delay: 0.40s; }
#main-nav.open .nav-left ul li:nth-child(4) { transition-delay: 0.45s; }
#main-nav.open .nav-left ul li:nth-child(5) { transition-delay: 0.50s; }
#main-nav.open .nav-left ul li:nth-child(6) { transition-delay: 0.55s; }

.nav-left ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease, padding-right 0.3s ease;
}

.nav-left ul li a:hover {
    color: #fff;
    padding-right: 10px;
}

/* --- Social Links (at the bottom) --- */
.nav-right {
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.8s, transform 0.5s ease 0.8s;
}

#main-nav.open .nav-right {
    opacity: 1;
    transform: translateY(0);
}

.nav-right .contact-info {
    display: none;
}

.nav-right .social-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 22px;
    margin-right: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-right .social-links a:hover {
    color: #fff;
    transform: scale(1.1);
}

/* --- تصميم الشاشات الصغيرة --- */
@media (max-width: 768px) {
    #main-header {
        padding: 15px 10px; /* ✨ التعديل الأخير: تم تقليل المسافة الجانبية أكثر ✨ */
        position: absolute !important; 
    }
    #main-nav { 
        width: 85%;
        padding: 120px 40px 40px 40px;
    }
}

/* --- New Translation Button Style --- */
.lang-toggle-btn {
    font-size: 16px; /* حجم مناسب للنص */
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    /* تنسيق الزر ليتماشى مع الأيقونات */
    padding: 5px 10px; 
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
    line-height: 1; /* لضمان محاذاة النص بشكل صحيح */
}

.lang-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

/* تعديل المسافة بين عناصر التحكم في الشاشات الصغيرة */
@media (max-width: 768px) {
    .header-controls {
        gap: 15px; /* تقليل المسافة في الشاشات الصغيرة */
    }
    .lang-toggle-btn {
        font-size: 14px;
        padding: 3px 8px;
    }
}