/* Top navigation header and desktop navigation */

/*-------------------------------------------------------------------------------------------------*/
/* Shared navigation header */
/*-------------------------------------------------------------------------------------------------*/
#top-navigation-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 100%;
    height: 150px;
    display: grid;
    grid-template-rows: 41px 68px 41px;
    background-color: rgba(0, 0, 0, 0.5);
    transition:
        height 0.2s ease,
        background-color 0.2s ease;
}

/*-------------------------------------------------------------------------------------------------*/
/* Utility row */
/*-------------------------------------------------------------------------------------------------*/
#top-navigation-utility-row {
    position: relative;
    z-index: 3;
    grid-row: 1;
    min-width: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.top-navigation-socials {
    min-width: 0;
    flex: 0 1 auto;
}

/*-------------------------------------------------------------------------------------------------*/
/* Primary navigation row */
/*-------------------------------------------------------------------------------------------------*/
#top-navigation-primary-row {
    position: relative;
    z-index: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*-------------------------------------------------------------------------------------------------*/
/* Secondary row */
/*-------------------------------------------------------------------------------------------------*/
#top-navigation-secondary-row {
    position: relative;
    z-index: 3;
    grid-row: 3;
    min-width: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/*-------------------------------------------------------------------------------------------------*/
/* Website logo */
/*-------------------------------------------------------------------------------------------------*/
#logo-top {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    z-index: 3;
    width: 66px;
    height: 66px;
    margin: auto 0;
    display: block;
    border-radius: 1rem;
}

#logo-top > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

/*-------------------------------------------------------------------------------------------------*/
/* Desktop navigation */
/*-------------------------------------------------------------------------------------------------*/
#top-nav-bar {
    position: static;
    z-index: auto;
    width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-align: center;
    background-color: transparent;
}

#top-nav-bar > ul {
    width: 1000px;
    min-width: 1000px;
    max-width: 1000px;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
}

#top-nav-bar > ul > li {
    min-width: 0;
    width: auto;
    display: block;
    list-style-type: none;
}

#top-nav-bar > ul > li > a {
    min-width: 0;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    color: var(--nav-text-color);
    background: rgba(20, 30, 50, 0.5);
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

#top-nav-bar > ul > li > a:hover {
    background-color: var(--nav-hover);
    cursor: pointer;
}

#top-nav-bar #blog-name {
    margin-bottom: 0;
    border-radius: 20px;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

#top-nav-bar #blog-name:hover {
    color: rgb(193, 0, 164);
}

/*-------------------------------------------------------------------------------------------------*/
/* Header while scrolling */
/*-------------------------------------------------------------------------------------------------*/
#top-navigation-header:has(#top-nav-bar.scrolled) {
    background-color: rgba(0, 0, 0, 1);
}

#top-nav-bar.scrolled {
    background-color: transparent;
}

/*-------------------------------------------------------------------------------------------------*/
/* Tablet navigation */
/*-------------------------------------------------------------------------------------------------*/
@media screen and (max-width: 1190px) {

    #top-navigation-header {
        height: 130px;
        grid-template-rows: 37px 56px 37px;
    }

    #top-nav-bar {
        display: none;
    }

    #logo-top {
        width: 54px;
        height: 54px;
    }
}

/*-------------------------------------------------------------------------------------------------*/
/* Small screens */
/*-------------------------------------------------------------------------------------------------*/
@media screen and (max-width: 768px) {

    #top-navigation-header {
        height: 120px;
        grid-template-rows: 34px 52px 34px;
    }

    #top-navigation-utility-row {
        padding: 0 8px;
        gap: 8px;
    }

    #top-navigation-primary-row {
        padding: 0 8px;
    }

    #top-navigation-secondary-row {
        padding: 0 8px;
    }

    #logo-top {
        left: 8px;

        width: 50px;
        height: 50px;
    }
}

/*-------------------------------------------------------------------------------------------------*/
/* Very small screens */
/*-------------------------------------------------------------------------------------------------*/
@media screen and (max-width: 480px) {

    #top-navigation-header {
        height: 112px;
        grid-template-rows: 32px 48px 32px;
    }

    #top-navigation-utility-row {
        padding: 0 6px;
        gap: 6px;
    }

    #top-navigation-primary-row {
        padding: 0 6px;
    }

    #top-navigation-secondary-row {
        padding: 0 6px;
    }

    #logo-top {
        left: 6px;

        width: 46px;
        height: 46px;
    }
}