/*========== GOOGLE FONTS ==========*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*========== VARIABLES CSS ==========*/
:root {
    --header-height: 3.5rem;
    --nav-width: 219px;

    /*========== Colors ==========*/
    --first-color: #6923D0;
    --first-color-light: #F4F0FA;
    --title-color: #fffcfc;
    --text-color: #58555E;
    --text-color-light: #A5A1AA;
    --body-color: #F9F6FD;
    --container-color: #FFFFFF;

    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;
    --normal-font-size: .938rem;
    --small-font-size: .75rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;

    /*========== z index ==========*/
    --z-fixed: 100;
}

@media screen and (min-width: 1024px) {
    :root {
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*========== BASE ==========*/
*, ::before, ::after {
    box-sizing: border-box;
}

body {
    margin: var(--header-height) 0 0 0;
    padding: 1rem 0;
    font-family: arial, serif;
    font-size: var(--normal-font-size);
    background-color: #948c13;
    color: var(--text-color);
}

h3 {
    margin: 0;
}

a {
    text-decoration: none;
    text-align: left;
}

img {
    max-width: 100%;
    height: auto;
}

/*========== HEADER ==========*/
.header {
    position: fixed;
    width: 100%;
    background-color: rgba(51, 51, 51, 0.8);
    box-shadow: 0 1px 0 rgba(22, 8, 43, 0.1);
    padding: 10px;
    z-index: var(--z-fixed);
}

.header__container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-evenly;
    position: relative;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}


.header__img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.header__logo {
    color: white;
    display: none;
    padding: 5px 0;
}

.header__logo:hover {
    background-color: #ff0707;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, padding 0.5s ease; /* Add transition properties */
}

/* Default styles for .header__logo-1 */
.header__logo-1 {
    background-color: #948C13;
    color: white;
    padding: 5px 7px;
    border-radius: 5px;
}
@media screen and (max-width: 768px) {
    .header {
        background-color: rgb(52, 52, 52);
    }
}

/* Media Query for smaller screens */
@media screen and (max-width: 768px) {
    .header__logo-1 {
        font-size: 14px; /* Reduce font size for smaller screens */
        padding: 3px 5px; /* Adjust padding for smaller screens */
        background-color: transparent;
    }
}


.header__search {
    display: flex;
    padding: .40rem .75rem;
    background-color: var(--first-color-light);
    border-radius: .25rem;
}

.header__input {
    width: 100%;
    border: none;
    outline: none;
    background-color: var(--first-color-light);
}

.header__input::placeholder {
    font-family: var(--body-font);
    color: var(--text-color);
}

.header__icon,
.header__toggle {
    font-size: 1.2rem;
}

.header__toggle {
    color: var(--title-color);
    cursor: pointer;
}

/*========== NAV ==========*/
.nav {
    position: fixed;
    top: 0;
    left: -120%;
    height: 100vh;
    width: 16.5rem;
    padding: 1rem 1rem 0;
    background-color: rgba(10, 10, 10, 0.8);
    box-shadow: 1px 0 0 rgba(22, 8, 43, 0.1);
    z-index: var(--z-fixed);
    transition: .4s;
    display: block;
}

.nav__container {
    height: 100%;
    display: block;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 3rem;
    overflow: auto;
    scrollbar-width: none; /* For mozilla */
    color: white;
}

/* For Google Chrome and others */
.nav__container::-webkit-scrollbar-track:hover {
    display: none;
    width: 10px;
    background: #555;
}

.nav__logo {
    font-weight: var(--font-semi-bold);
    margin-bottom: 2.5rem;
}

.nav__logo:hover {
    font-weight: var(--font-semi-bold);
    margin-bottom: 2.5rem;
    background-color: none;
}

.nav__list,
.nav__items {
    display: grid;
}

.nav__list {
    row-gap: 2.5rem;
}

.nav__items {
    row-gap: 1.5rem;
}

.nav__subtitle {
    font-size: var(--normal-font-size);
    text-transform: uppercase;
    letter-spacing: .1rem;
    color: var(--text-color-light);
}

.nav__link {
    display: flex;
    align-items: center;
    color: #b9b9b9;
    padding: 2px 0;
    text-decoration: none;
    position: relative; /* Make sure the ::before pseudo-element is positioned relative to this element */
    transition: color 0.3s; /* Only transitioning color for this example */
}

.nav__link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    border-radius: 5px;
    background-color: #a99e0d;
    transition: width 0.7s; /* Transition the width property for the side hover effect */
    z-index: -1; /* Place it behind the text */
}

.nav__link:hover {
    color: white;
    padding: 8px 0;
    border-radius: 5px;
}

.nav__link:hover::before {
    width: 100%;
}


.nav__icon {
    font-size: 1.2rem;
    margin-right: .5rem;
}

.nav__name {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.nav__name-1 {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.nav__logout {
    margin-top: 5rem;
}

/* Dropdown */
.nav__dropdown {
    overflow: hidden;
    max-height: 21px;
    transition: .4s ease-in-out;
}

.nav__dropdown-collapse {
    background-color: var(--first-color-light);
    border-radius: .25rem;
    margin-top: 1rem;
}

.nav__dropdown-content {
    display: grid;
    row-gap: .5rem;
    padding: .75rem 2.5rem .75rem 1.8rem;
}

.nav__dropdown-item {
    font-size: var(--smaller-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
}

.nav__dropdown-item:hover {
    color: white;
}

.nav__dropdown-icon {
    margin-left: auto;
    transition: .4s;
}

/* Show dropdown collapse */
.nav__dropdown:hover {
    max-height: 100rem;
}

/* Rotate icon arrow */
.nav__dropdown:hover .nav__dropdown-icon {
    transform: rotate(180deg);
}

/*===== Show menu =====*/
.show-menu {
    left: 0;
}

/*===== Active link =====*/
.nav__link.active {
    color: #ffffff;
    padding: 10px 0;
    border-radius: 5px;
    background: rgba(68, 68, 68, 0.72);
    text-indent: 90px;
}

/* ========== MEDIA QUERIES ==========*/
/* For small devices reduce search*/
@media screen and (max-width: 320px) {
    .header__search {
        width: 70%;
    }
}

@media screen and (min-width: 768px) {
    body {
        padding: 1rem 3rem 0 6rem;
    }
    .header {
        padding: 0 3rem 0 6rem;
    }
    .header__container {
        height: calc(var(--header-height) + .5rem);
    }
    .header__search {
        width: 300px;
        padding: .55rem .75rem;
    }
    .header__toggle {
        display: none;
    }
    .header__logo,
    .header__logo-1{
        display: block;
    }
    .header__img {
        width: 40px;
        height: 40px;
        order: 1;
    }
    .nav {
        left: 0;
        padding: 1.2rem 1.5rem 0;
        width: 68px; /* Reduced navbar */
        display: none;
    }
    .nav__items {
        row-gap: 1.7rem;
    }
    .nav__icon {
        font-size: 1.3rem;
    }

    /* Element opacity */
    .nav__logo-name,
    .nav__name,
    .nav__subtitle,
    .nav__dropdown-icon {
        opacity: 0;
        transition: .3s;
    }

    .nav__name-1{

    }

        /* Navbar expanded */
    .nav:hover {
        width: var(--nav-width);
    }

    /* Visible elements */
    .nav:hover .nav__logo-name {
        opacity: 1;
    }
    .nav:hover .nav__subtitle {
        opacity: 1;
    }
    .nav:hover .nav__name {
        opacity: 1;
    }
    .nav:hover .nav__dropdown-icon {
        opacity: 1;
    }
}
