/* ── Shared Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 14vh;
    width: 100%;
    z-index: 10000;
    direction: rtl;
    transition: background 0.3s var(--transition-smooth), backdrop-filter 0.3s var(--transition-smooth);
    background: linear-gradient(135deg, #3293e3 0%, #145dff 45%, #040eff 100%);
}
.nav-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-right {
    display: flex;
    gap: 16px;
    align-items: center;
}
.search-wrap {
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
.search-wrap.is-open {
    width: 220px;
    opacity: 1;
}
.search-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white, #fff);
    padding: 0 16px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white, #fff);
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.nav-btn:hover {
    background: var(--white, #fff);
    color: var(--primary-blue, #3293e3);
    transform: translateY(-2px);
}
.search-btn {
    width: 44px;
    padding: 0;
    border-radius: 50%;
    flex: 0 0 44px;
}
.hamburger-btn {
    display: none;
}
.nav-links {
    display: flex;
    gap: 75px;
    list-style: none;
    align-items: center;
}
.nav-links li {
    position: relative;
}
.nav-links li a {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--white, #fff);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover {
    color: var(--white, #fff);
}
.nav-links a:hover::after {
    width: 100%;
}
.harts svg:hover {
    color: red;
}
.has-dropdown {
    position: relative;
}
.dropdown-menu {
    background: #040eff;
    position: absolute;
    top: calc(100% + 20px);
    right: 0;
    z-index: 10001;
    border-radius: 16px;
    padding: 12px;
    min-width: 200px;
    box-shadow: 0 20px 60px rgba(4, 14, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dropdown-item:hover {
    background: rgba(50, 147, 227, 0.1);
    color: var(--primary-blue, #3293e3);
    transform: translateX(-4px);
}
.dropdown-menu a:hover {
    color: gold;
}
.logo {
    width: 90px;
    height: 90px;
}
.logo img {
    width: 100%;
    height: 100%;
}

/* ── Mobile Nav Overlay ── */
.mobile-nav-overlay {
    display: none;
}

/* ── Bottom Menu ── */
.menu-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    top: auto;
    right: 14px;
    left: 14px;
    z-index: 9998;
    background: rgba(0, 90, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 28px 28px 0 0;
    padding: 0 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    height: auto;
    min-height: 65px;
    align-items: stretch;
    justify-content: space-between;
    direction: rtl;
    list-style: none;
    margin: 0;
    gap: 0;
    box-shadow: 0 2px 20px rgba(0, 50, 150, 0.25);
}
.menu-bottom li {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    width: auto;
    height: auto;
    display: flex;
    align-items: stretch;
}
.menu-right-item,
.menu-left-item {
    display: flex;
    gap: 2px;
    align-items: stretch;
}
.menu-right-item a,
.menu-left-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #07006A;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding: 0 8px;
    border-radius: 16px;
    flex: 1;
    min-width: 0;
}
.menu-right-item svg,
.menu-left-item svg {
    width: 30px;
    height: 30px;
    display: block;
}
.menu-right-item:nth-child(2) {
    margin-left: 22px;
}
.menu-left-item:nth-child(4) {
    margin-right: 22px;
}
.menu-center-item {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -12px;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}
.logo1 {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    position: relative;
    bottom: 8px;
    right: 3px;
    background: #f2f7ff;
}

/* ── Responsive: tablet ── */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 20px;
    }
    .nav-links {
        gap: 25px;
    }
}

/* ── Responsive: mobile ── */
@media (max-width: 768px) {
    .navbar {
        top: 0 !important;
        bottom: auto !important;
        height: auto;
        min-height: 44px;
        padding: 0 6px;
        padding-top: env(safe-area-inset-top, 0px);
        display: flex;
        align-items: center;
    }
    .nav-container {
        padding: 0;
        justify-content: center;
        width: 100%;
        gap: 0;
        position: relative;
    }
    .nav-links {
        display: none !important;
    }
    .nav-right {
        display: flex !important;
        gap: 6px;
    }
    .nav-btn {
        height: 32px;
        padding: 4px 8px;
        font-size: 12px;
    }
    .search-btn {
        width: 32px;
        flex: 0 0 32px;
        padding: 0;
        border-radius: 50%;
    }
    .login-btn {
        display: none !important;
    }
    .hamburger-btn {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        flex: 0 0 32px;
        padding: 0;
        border-radius: 50%;
        background: none !important;
        border: none !important;
        align-items: center;
        justify-content: center;
    }
    .hamburger-btn svg {
        width: 18px;
        height: 18px;
    }
    .logo {
        display: none !important;
    }
    .search-wrap {
        width: 0;
        overflow: hidden;
        opacity: 0;
        transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }
    .search-wrap.is-open {
        width: 160px;
        opacity: 1;
    }
    .search-input {
        height: 32px;
        font-size: 12px;
        padding: 0 10px;
    }
    .menu-bottom {
        display: flex;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 90, 255, 0.75);
        bottom: 12px;
        right: 8px;
        left: 8px;
        min-height: 68px;
        border-radius: 35px;
        padding: 0 10px;
    }
    .menu-right-item a,
    .menu-left-item a {
        color: #fff;
    }
    .menu-center-item .logo1 {
        width: 60px;
        height: 60px;
        border-radius: 50%;
    }
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }
    .mobile-nav-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .mobile-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 290px;
        height: 100%;
        background: #001e5e;
        padding: 80px 20px 20px;
        z-index: 10000;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    .mobile-nav-panel.open {
        transform: translateX(0);
    }
    .mobile-nav-panel a {
        display: block;
        padding: 14px 0;
        color: rgba(255,255,255,0.9);
        text-decoration: none;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .mobile-nav-panel .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: none;
        box-shadow: none;
        padding: 0 10px;
        min-width: auto;
    }
    .mobile-nav-panel .dropdown-menu a {
        font-size: 14px;
        padding: 10px 0;
    }
    .mobile-nav-close {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255,255,255,0.1);
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .menu-bottom {
        bottom: 12px;
        right: 8px;
        left: 8px;
        min-height: 68px;
        border-radius: 35px;
        padding: 0 10px;
    }
    .menu-center-item {
        top: -10px;
    }
    .menu-center-item .logo1 {
        width: 65px;
        height: 65px;
    }
    .menu-right-item a,
    .menu-left-item a {
        font-size: 12px;
        padding: 0 8px;
    }
    .menu-right-item svg,
    .menu-left-item svg {
        width: 32px;
        height: 32px;
    }
    .menu-right-item span,
    .menu-left-item span {
        font-size: 11px;
    }
    .menu-right-item:nth-child(2) {
        margin-left: 22px;
    }
    .menu-left-item:nth-child(4) {
        margin-right: 22px;
    }
    .menu-center-item {
        top: -10px;
    }
    .menu-center-item .logo1 {
        width: 65px;
        height: 65px;
    }
}

@media (max-width: 360px) {
    .menu-bottom {
        bottom: 12px;
        right: 8px;
        left: 8px;
        min-height: 68px;
        border-radius: 36px;
        padding: 0 10px;
    }
    .menu-center-item {
        top: -8px;
    }
    .menu-center-item .logo1 {
        width: 61px;
        height: 61px;
    }
    .menu-right-item a,
    .menu-left-item a {
        font-size: 11px;
        padding: 0 6px;
    }
    .menu-right-item svg,
    .menu-left-item svg {
        width: 28px;
        height: 28px;
    }
    .menu-right-item span,
    .menu-left-item span {
        font-size: 10px;
    }
    .menu-right-item:nth-child(2) {
        margin-left: 18px;
    }
    .menu-left-item:nth-child(4) {
        margin-right: 18px;
    }
}
