.header {
    margin-bottom: 20px;
}

.header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.header-row a{
    text-decoration: none;
}

.header-logo {
    display: flex;
}

.header-nav {
    display: flex;
    align-items: center;
}

.header-nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    padding: 0;
    margin: 0;
}

.header-nav li:not(:last-child) {
    margin-right: 2.5rem; /* Equivalent to 40px */
}

.header-nav ul li a,
a .header-menu {
    color: var(--text-dark-color);
    position: relative;
    text-decoration: none;
}

.header-nav ul li a::after,
a .header-menu::after {
    content: '';
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: -0.3125rem; /* Equivalent to 5px */
    height: 0.125rem; /* Equivalent to 2px */
    background-color: var(--text-dark-color);
    transition: left 0.35s ease, right 0.35s ease;
}

.header-nav ul li a:hover::after,
a .header-menu::after {
    left: 0;
    right: 0;
}

.header-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu {
    margin-right: 0.5rem; /* Equivalent to 8px */
}

.overlay,
.burger-menu {
    display: none;
}

/* Media query for screens between 768px and 1439px (tablets) */
@media screen and (max-width: 1439px) and (min-width: 768px) {
    nav.header-nav,
    .menu-link {
        display: none;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1;
    }

    .burger-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 4.75rem; /* Equivalent to 60px */
        left: 26%;
        /* max-width: 688px; */
        height: 1004px;
        background-color: var(--body-background-color);
        z-index: 2;
        overflow-y: auto;
    }

    .burger-nav ul {
        text-decoration: none;
        margin: 0;
        padding: 0;
        padding-top: 4.375rem; /* Equivalent to 70px */
        display: flex;
        justify-content: center;
        flex-direction: column;
        font-size: 2rem;
    }

    .burger-nav li {
        text-decoration: none;
        margin: 0;
        text-align: center;
        margin-bottom: 3.125rem; /* Equivalent to 100px */
    }

    .burger-nav li a {
        color: var(--text-dark-color);
    }

    .burger-nav li:nth-child(4) {
        margin-bottom: 6.25rem; /* Equivalent to 100px */
    }

    .burger-icon {
        padding: 0.3125rem 0.5625rem; /* Equivalent to 5px 9px */
        border-radius: 100%;
        border: 1px solid var(--container-background-color);
        font-size: 1.25rem; /* Equivalent to 20px */
        margin-right: 0.5rem; /* Equivalent to 8px */
        cursor: pointer;
    }

    .burger-icon:hover {
        border: 2px solid var(--container-background-color);
    }

    .burger-menu {
        display: flex;
        align-items: center;
    }

    .burger-menu.active .overlay {
        display: block;
    }

    .burger-menu.active .burger-nav {
        display: flex;
    }

    .header-menu-burger {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Media query for screens between 380px and 767px (smaller tablets and large mobiles) */
@media screen and (max-width: 767px) and (min-width: 380px) {
    nav.header-nav,
    .menu-link {
        display: none;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1;
    }

    .burger-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 4.75rem; /* Equivalent to 60px */
        left: 36%;
        width: 23.75rem; /* Equivalent to 380px */
        height: 50.25rem; /* Equivalent to 804px */
        background-color: var(--body-background-color);
        z-index: 2;
        overflow-y: auto;
    }

    .burger-nav ul {
        text-decoration: none;
        margin: 0;
        padding: 0;
        padding-top: 5rem; /* Equivalent to 80px */
        display: flex;
        justify-content: center;
        flex-direction: column;
        font-size: 2rem;
    }

    .burger-nav li {
        text-decoration: none;
        margin: 0;
        text-align: center;
        margin-bottom: 60px;
    }

    .burger-nav li a {
        color: var(--text-dark-color);
    }

    .burger-nav li:nth-child(4) {
        margin-bottom: 3.125rem; /* Equivalent to 100px */
    }

    .burger-icon {
        padding: 0.3125rem 0.5625rem; /* Equivalent to 5px 9px */
        border-radius: 100%;
        border: 1px solid var(--container-background-color);
        font-size: 1.25rem; /* Equivalent to 20px */
        margin-right: 0.5rem; /* Equivalent to 8px */
        cursor: pointer;
    }

    .burger-icon:hover {
        border: 2px solid var(--container-background-color);
    }

    .burger-menu {
        display: flex;
        align-items: center;
    }

    .burger-menu.active .overlay {
        display: block;
    }

    .burger-menu.active .burger-nav {
        display: flex;
    }

    .header-menu-burger {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Media query for screens below 380px (small mobiles) */
@media screen and (max-width: 379px) {
    body {
        zoom: 0.5;
        font-size: 0.5rem;
    }
}
