/* Background overlay */
.res-bg-close {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.res-bg-close.active {
    opacity: 1;
}

/* Sidebar container */
.res-nav-items {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(251, 255, 244, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.res-nav-items.active {
    transform: translateX(0);
}

.res-logo{
    width: 30%;
    margin-left: -5%;
}
.res-logo img{
    width: 90%;
}

.res-nav-icon {
    width: 15%;
    margin-right: 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
.res-nav-icon svg {
    width: 40px;
    height: 40px;
    padding: 1vh;
    font-size: 20px;
    border: 2px solid #709759;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.res-navbar{
    width: 100%;
    display: none;
    align-items: center;
    justify-content: space-between;
}

/* Sidebar header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(72, 119, 66, 0.1);
}

.sidebar-logo img {
    height: 70px;
    width: auto;
}

.res-nav-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(72, 119, 66, 0.1);
    color: #487742;
    cursor: pointer;
    transition: all 0.3s ease;
}

.res-nav-close:hover {
    background: #487742;
    color: white;
    transform: rotate(90deg);
}

.res-nav-close svg {
    width: 24px;
    height: 24px;
}

/* Sidebar content */
.sidebar-content {
    padding: 24px;
}

/* Sidebar menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 8px;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    text-decoration: none;
    color: #2d3748;
    font-family: farsi;
    font-size: 17px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    direction: rtl;
    border: 1px solid #6EB110;
}

.sidebar-menu-item a::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(72, 119, 66, 0.1) 0%, rgba(173, 193, 120, 0.1) 100%);
    transition: width 0.3s ease;
    z-index: 0;
}

.sidebar-menu-item a:hover::before {
    width: 100%;
}

.sidebar-menu-item a:hover {
    color: #487742;
    transform: translateX(-8px);
}

/* Sidebar footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 24px;
    border-top: 1px solid rgba(72, 119, 66, 0.1);
}

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sidebar-social a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* background: linear-gradient(135deg, #728657 0%, #7FBE2C 100%); */
    background:#e5f2df;
    color: white;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 119, 66, 0.3);
}

.sidebar-social a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(72, 119, 66, 0.4);
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: none;
    transition: all 0.3s ease;
}

.sidebar-icon {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    object-fit: contain;
}

@media screen and (min-width:992px) and (max-width:1200px) and (max-height:1400px){
    .res-navbar{
        display: none;
    }
    .nav-item{
        font-size: 12px !important;
    }
}

@media screen and (min-width:768px) and (max-width:992px) and (max-height:1400px){
    .res-navbar{
        display: none;
    }
    .nav-item{
        font-size: 12px !important;
    }
}

@media screen and (min-width:576px) and (max-width:768px) and (max-height:1200px){
    .res-navbar{
        display: flex;
    }
}

@media screen and (max-width:576px) {
    .res-navbar{
        display: flex;
    }
}

@media screen and (max-width:320px) {
    
    .sidebar-social{
        gap: 5px;
    }
}
