@use 'base/variables' as v;
@use 'base/mixins' as m;

// Header
header {
    width: 100%;
    height: 3rem;
    position: fixed;
    top: 0;
    left: 0;
    padding: 0 1.5rem;
    background-color: v.$negro;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;


    @include m.tablet {
        nav {
            position: fixed;
            top: 0;
            left: -100%;
            background-color: v.$negro;
            color: v.$blanco;
            width: 75%;
            height: 100vh;
            padding: 1.5rem 0;
            z-index: 100;
            transition: .5s;
        }
    }

    .nav-content {
        display: grid;
        height: 100%;
        grid-template-columns: max-content 1fr max-content;
        row-gap: 2rem;
        width: 100%; // Ensure it takes full width
        overflow: hidden; // Prevent overflow
        ;
    }

    .nav-close {
        position: absolute;
        right: 1.5rem;
        font-size: 2rem;
        padding: .25rem;
        background-color: v.$grisOscuro;
        border-radius: 50%;
        cursor: pointer;
    }

    .nav-img {
        margin-left: 1rem;
        display: flex;
        justify-content: center;
        padding-top: .25rem;
        margin-bottom: .8rem;
        width: 56px;
        height: 56px;
        background-color: v.$blanco;
        border-radius: 50%;
        overflow: hidden;

        img {
            width: 56px;
            height: 56px;
        }
    }

    .nav-name {
        display: block;
        color: v.$blanco;
    }

    .nav-rango {
        font-size: v.$delgada;
        margin-left: 2rem;
    }

    .nav-menu {
        align-self: center;

        .nav-list {

            li {
                ion-icon {
                    width: 24px;
                    height: 24px;
                    font-size: 1.5rem;
                    color: v.$blanco;
                    cursor: pointer;
                    transition: color .3s;
                    margin-left: 1.5rem;
    
                    &:hover {
                        color: v.$rosa;
                    }
                }
            }
        }
    }

    .nav-item {
        margin: 2.5rem 0;
    }

    .nav-link {
        font-size: 1.5rem;
        color: v.$blanco;
        transition: color .3s;

        &:hover {
            color: v.$azulOscuro;
        }
    }

    .nav-social {
        padding-top: .5rem;
        display: flex;
        align-items: center;

        .social-icon {
            font-size: 1.5rem;
            color: v.$blanco;
            margin: 0 .5rem;
            transition: color .3s;

            &:hover {
                color: v.$rosa;
            }
        }
    }

    // Aparecer menú
    .show {
        left: 0;
    }

    // Active Menu
    .active {
        color: v.$azul;
    }

    ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    a {
        text-decoration: none;
        color: v.$blanco;
        font-size: 1.5rem;
        font-weight: 700;
        padding: 1rem 2rem;
        transition: color .3s;

        &:hover {
            color: v.$rosa;
        }

        .logo {
            color: v.$rosa;
            font-size: 2rem;
        }
    }

    img {
        height: auto;
    }

    .bd-grid {
        max-width: 1024px;
        display: grid;
        grid-template-columns: 100%;
        margin-top: .5rem;
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .toggle {
        font-size: 1.5rem;
        color: v.$blanco;
        cursor: pointer;
    }
}

@include m.tabletV2 {
    body {
        margin: 0;
    }

    header {
        height: calc(3rem + 1.5rem);


        .toggle {
            display: none;
        }

        .nav {
            width: 100%;
        }
    
        .nav-content {
            grid-template-columns: repeat(3, max-content);
            grid-template-rows: 1fr;
            column-gap: 1.5rem;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            overflow: hidden;
        }
    
        .nav-close, .nav-rango {
            display: none;
        }
    
        .nav-perfil {
            display: flex;
            align-items: center;
        }
    
        .nav-img {
            width: 32px;
            height: 32px;
            margin-right: .5rem;
            margin-bottom: 0;
            align-items: center;
    
            img {
                width: 32px;
                height: 32px;
            }
        }
    
        .nav-list {
            display: flex;
            //margin-bottom: 2rem;
        }
    
        .nav-item {
            margin: 0 .25rem;
        }
    
        .nav-link {
            padding: 0.5rem .8rem;
            border-radius: .25rem;
            transition: color .3s, background-color .3s; // Add background-color to the transition
    
            &:hover {
                color: v.$blanco;
                background-color: v.$azulOscuro;
                box-shadow: 0 0 10px v.$azulOscuro; // Add glow effect
            }
        }
    
        .active {
            background-color: v.$azul;
            color: v.$blanco;
        }
    }

}

@include m.desktop {
    .nav-content {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nav-menu, .nav-social {
        display: flex;
        align-items: center;
    }
}

// Custom Scrollbar

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(#642bff, #ff22e6);
    border-radius: 10px;
    transition: background 1s ease; /* Add transition property */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(#ff22e6, #642bff);
}