@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Grechen+Fuemen&display=swap');
/* font-family: "Grechen Fuemen", serif; */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box ;
    font-family: "Poppins", sans-serif;
}

body {
    height: 100%;
    width: 100%;
    font-family: "Poppins", sans-serif;
    min-height: 100vh;
    background: url(../img/background.jpg) no-repeat center center/cover;
    /* Add a fallback color if image fails */
    background-color: #181c24;
    backdrop-filter: blur(10px);
}

header nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    width: 100%;
    position: sticky;
    top: 0;
    background: transparent;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 999;
}
header nav .logo_ul{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 2rem;
    max-width: 700px;
}

header nav .logo_ul .logo img{
    width: 180px;
}

header nav .logo_ul ul {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
}

header nav .logo_ul ul li{
    padding: 3px 15px;
}

header nav .logo_ul ul a {
    text-decoration: none;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 500;
    padding: 3px 20px;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.7s ease;
    white-space: nowrap;

}

header nav .logo_ul ul a:hover, header nav .logo_ul ul a.active{
    color: #162530;
    background: rgb(188 , 212, 229, 0.8);
    border: 2px solid #fff;
}

/* Navbar Toggle Button */
.navbar-toggle {
    display: none; /* Hidden by default, shown in media query */
    background: transparent;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 24px; /* Icon size */
    color: #fff; /* Icon color */
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: #fff;
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Backdrop */
.menu-backdrop {
    position: fixed; /* Fixed position to cover the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    backdrop-filter: blur(3px); /* Blur effect */
    z-index: 998; /* Below the menu but above content */
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Initially hidden */
    transition: opacity 0.3s ease, visibility 0s 0.3s; /* Smooth transition */
}

/* Active state for the backdrop */
.menu-backdrop.menu-open {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it visible */
    transition: opacity 0.3s ease, visibility 0s 0s; /* Smooth transition */
}

/* Body class when menu is active */
body.menu-active-body {
    overflow: hidden; /* Prevent scrolling when menu is open */
}

@media (max-width: 480px) {
    header nav {
        height: 62px;
        padding: 0 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    header nav .logo_ul {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0;
    }
    header nav .logo_ul .logo img {
        width: 110px;
        margin: 0 auto; /* Backup centering */
        position: relative; /* Better than absolute for this layout */
        transform: none; /* Remove transform */
        left: auto; /* Reset positioning */
    }
    .navbar-toggle {
        display: block;
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }
    .logo_ul .navbar-menu {
        display: flex; /* Show menu in flex layout */
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 150px;
        height: 100vh;
        background: rgba(28, 28, 28, 0.95); /* Background color */
        backdrop-filter: blur(8px); /* Blur effect */
        z-index: 999; /* Above other content */
        padding: 5px 5px 120px; /* Padding for the menu */
        pointer-events: all; /* Allow interactions */
        transform: translateX(-100%); /* Initially off-screen */
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); /* Smooth slide-in effect */
        box-shadow: 2px 0 16px rgba(0,0,0,0.18);
    }
    .logo_ul .navbar-menu.active {
        transform: translateX(0); /* Slide in */
    }
    header nav .search_user {
        margin: 0;
        position: absolute;
        right: 0.5rem;
        top: 30%;
        transform: translateY(-50%);
        z-index: 1002;
    }
    header nav .search_user .search_box {
        width: 38px;
        padding: 6px 6px;
        background: rgba(255,255,255,0.18);
        border-radius: 50%;
        justify-content: center;
        transition: width 0.3s, border-radius 0.3s, background 0.3s;
        overflow: hidden;
        box-shadow: none;
    }
    header nav .search_user .search_box.expanded {
        width: 180px;
        border-radius: 25px;
        background: rgba(255,255,255,0.28);
        box-shadow: 0 2px 8px rgba(0,0,0,0.10);
        justify-content: flex-start;
    } 
    header nav .search_user .search_box i {
        margin-right: 0;
        font-size: 1.2rem;
        color: #fff;
        z-index: 1;
    }
    header nav .search_user .search_box.expanded i {
        margin-right: 10px;
    }
    header nav .search_user .search_box input {
        display: none;
        width: 100%;
        font-size: 1rem;
        color: #fff;
        background: transparent;
        border: none;
        outline: none;
        margin-left: 8px;
    }
    header nav .search_user .search_box.expanded input {
        display: block;
    }
    header nav .search_user .search {
        width: 95vw;
        min-width: 0;
        max-width: 360px;
        left: auto;
        right: 0;
        top: 48px;
        border-radius: 12px;
        z-index: 1003;
    }
}

@media (max-width: 880px){
    .navbar{
        backdrop-filter: none;
    }
    .logo_ul .navbar-menu {
        display: none; /* Hide by default */
        flex-direction: column;
        align-items: flex-start;
        gap: 1.7rem !important;
        position: fixed;
        height: 100vh;
        width: 150px;
        top: 0;
        right: 0;
        padding: 80px 20px 20px;
        background: rgba(28, 28, 28, 0.40); /* Background color */
        backdrop-filter: blur(0.5px); /* Blur effect */
        z-index: 999; /* Above other content */
        pointer-events: all; /* Allow interactions */
        transform: translateX(100%); /* Initially off-screen */
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); /* Smooth slide-in effect */
        box-shadow: -2px 0 16px rgba(0,0,0,0.18);
    }
    
    .logo_ul .navbar-menu.active {
        display: flex; /* Show when active */
        transform: translateX(0); /* Slide in */
    }
    
    /* Menu Items for larger screens */
    .logo_ul .navbar-menu li {
        margin: 0 0 18px 0; /* Space between items */
        width: 100%; /* Full width for items */
    }
    
    .logo_ul .navbar-menu li a {
        display: block; /* Block display for full clickable area */
        padding: 10px 15px; /* Padding for items */
        font-size: 1.1rem; /* Font size */
        font-weight: 500; /* Font weight */
        border-radius: 6px; /* Rounded corners */
        color: #fff; /* Text color */
        transition: background-color 0.2s ease; /* Smooth background change */
        text-decoration: none;
        border: 2px solid transparent;
    }
    
    /* Hover and active states for menu items */
    .logo_ul .navbar-menu li a:hover,
    .logo_ul .navbar-menu li a.active {
        background: rgba(255, 255, 255, 0.1); /* Background on hover */
        color: #fff; /* Text color on hover */
    }

    .navbar-toggle{
        display: block;
        z-index: 1001;
    }
    
    .navbar-toggle.active .bar:nth-child(2){
        opacity: 0;
    }

    .navbar-toggle.active .bar:nth-child(1){
        transform: translateY(8px) rotate(45deg);
    }

    .navbar-toggle.active .bar:nth-child(3){
        transform: translateY(-8px) rotate(-45deg);
    }
}


/* search */
header nav .search_user {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

header nav .search_user .search_box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .2);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(5px);
    width: 300px;
    transition: all 0.3s ease;
}

header nav .search_user .search_box:hover,
header nav .search_user .search_box:focus-within {
    background: rgba(255, 255, 255, .3);
}

header nav .search_user .search_box i {
    color: #fff;
    font-size: 1.1rem;
    margin-right: 10px;     
}

header nav .search_user .search_box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.7rem;
}

header nav .search_user .search_box input::placeholder {
    color: rgba(255, 255, 255, .7);
}

header nav .search_user .search {
    position: absolute;
    width: 350px;
    min-height: 50px;
    max-height: 400px;
    top: 50px;
    right: 0;
    background: rgba(22, 37, 48, 0.95);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 99999;
    padding: 8px;
    display: none;
    transition: all 0.3s ease;
}

header nav .search_user .search.active {
    display: block;
}

header nav .search_user .search::-webkit-scrollbar {
    width: 6px;
    background: rgba(255, 255, 255, .1);
    border-radius: 3px;
}

header nav .search_user .search::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .2);
    border-radius: 3px;
}

header nav .search_user .search .card {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, .05);
}

header nav .search_user .search .card:hover {
    background: rgba(255, 255, 255, .1);
    transform: translateX(5px);
}

header nav .search_user .search .card img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

header nav .search_user .search .card .cont {
    margin-left: 15px;
    color: #fff;
}

header nav .search_user .search .card .cont h3 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

header nav .search_user .search .card .cont p {
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
    line-height: 1.2;
}

header nav .search_user .search .card .cont span {
    background: #ffcc00;
    color: #162530;
    padding: 2px 5px;
    margin: 0 5px;
    font-weight: 500;
    border-radius: 3px;
    font-size: 12px;
}

header nav .search_user .search .no-results {
    color: rgba(255, 255, 255, .7);
    text-align: center;
    padding: 50px;
    font-size: 14px;
}

@media (max-width: 768px) {
    header nav .search_user .search_box {
        width: 250px;
    }
    
    header nav .search_user .search {
        width: 300px;
    }
}

@media (max-width: 480px) {
    header nav .search_user {
        margin-right: 0px;
    }
    
    header nav .search_user .search_box {
        width: 20px;
        padding: 10px 0px 10px 10px;
    }
    
    header nav .search_user .search {
        width: 250px;
    }
    
    header nav .search_user .search .card .cont h3 {
        max-width: 180px;
    }
    header nav .search_user .search_box i{
        font-size: 12px
    }

    header nav .search_user .search .card img{
        width: 30px;
        height: 40px;
    }

    header nav .search_user .search .card .cont h3{
        font-size: 10px;

    }
    header nav .search_user .search .card .cont p{
        font-size: 9px;
    }

    header nav .search_user .search .card .cont span{
        font-size: 9px;
    }
}

/* Menu Items */
.logo_ul .navbar-menu li {
    margin: 0 0 18px 0; /* Space between items */
    width: 100%; /* Full width for items */
}

.logo_ul .navbar-menu li a {
    display: block; /* Block display for full clickable area */
    padding: 10px 15px; /* Padding for items */
    font-size: 1.1rem; /* Font size */
    font-weight: 500; /* Font weight */
    border-radius: 6px; /* Rounded corners */
    color: #fff; /* Text color */
    transition: background-color 0.2s ease; /* Smooth background change */
    text-decoration: none;
    border: 2px solid transparent;
}

/* Hover and active states for menu items */
.logo_ul .navbar-menu li a:hover,
.logo_ul .navbar-menu li a.active {
    background: rgba(255, 255, 255, 0.1); /* Background on hover */
    color: #fff; /* Text color on hover */
}






