/* Explain: Styles for the mobile side navigation panel and its elements. */
/* ---------- زر قائمة الجوال + اللوحة المنسدلة للأسفل ---------- */
.menu-toggle {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    display: none;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.05rem;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.menu-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.menu-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

.menu-toggle.is-open {
    color: #0b1220;
    background: linear-gradient(135deg, var(--gold-soft), var(--primary-color));
    border-color: transparent;
}

/* خلفية معتمة مغبّشة خلف اللوحة المنسدلة */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 79;
    background: rgba(5, 9, 18, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* ---------- اللوحة المنسدلة: تنسدل للأسفل من تحت الترويسة ---------- */
.mobile-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.3rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 92px);
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background:
        radial-gradient(560px 300px at 100% -10%, rgba(212, 175, 55, 0.18), transparent 60%),
        radial-gradient(460px 340px at 0% 108%, rgba(36, 54, 94, 0.5), transparent 62%),
        linear-gradient(160deg, #141b2e, #0a1020);
    border-bottom: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 34px 70px -26px rgba(0, 0, 0, 0.96);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-18px);
    transition: opacity 0.34s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s ease;
}

.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* رأس اللوحة: الشعار + الاسم + زر الإغلاق */
.mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}

.mobile-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.mobile-nav-brand img {
    height: 44px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.mobile-nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.mobile-nav-brand-name {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text-color);
}

.mobile-nav-brand-sub {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary-color);
}

.menu-close {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.35s ease;
}

.menu-close:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.1);
    transform: rotate(90deg);
}

.menu-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

.mobile-nav .header-search-mobile {
    margin-bottom: 0;
}

/* أقسام اللوحة */
.mobile-nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.mobile-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding-inline-start: 0.35rem;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.mobile-nav-label i {
    color: var(--primary-color);
    font-size: 0.72rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.85rem;
    min-height: 56px;
    border-radius: 14px;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.98rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.mobile-link-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 0.95rem;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.mobile-link-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.mobile-link-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    transition: color 0.25s ease, transform 0.25s ease;
}

.mobile-link:hover,
.mobile-link:focus-visible,
.mobile-link.is-active {
    outline: none;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
    border-color: rgba(212, 175, 55, 0.34);
    transform: translateX(-3px);
}

.mobile-link:hover .mobile-link-icon,
.mobile-link.is-active .mobile-link-icon,
.mobile-link:focus-visible .mobile-link-icon {
    background: linear-gradient(135deg, var(--gold-soft), var(--primary-color));
    color: #0b1220;
    border-color: transparent;
}

.mobile-link:hover .mobile-link-arrow,
.mobile-link.is-active .mobile-link-arrow,
.mobile-link:focus-visible .mobile-link-arrow {
    color: var(--primary-color);
    transform: translateX(-3px);
}

/* تذييل اللوحة: زر الطلب + أرقام التواصل */
.mobile-nav-foot {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.16);
}

.mobile-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    padding: 0.7rem 1.2rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gold-soft), var(--primary-color));
    color: #0b1220;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.98rem;
    box-shadow: var(--shadow-gold);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.mobile-nav-cta:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f2d479, var(--primary-hover));
}

.mobile-nav-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.mobile-nav-contact a i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.mobile-nav-contact a:hover,
.mobile-nav-contact a:focus-visible {
    outline: none;
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.08);
}

@media (min-width: 1024px) {
    .mobile-nav,
    .mobile-nav-backdrop { display: none; }
}

@media (max-width: 1023px) {
    .menu-toggle { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav,
    .mobile-nav-backdrop,
    .menu-close { transition: none; }
}