header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    border-top: none !important;
    margin: 0 auto !important;
}

.header-container {
    min-width: 0;
}

.logo {
    margin: 0;
    padding: 0;
    /* height: 100%; */
    max-height: 4rem;
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    transition: 0.2s;
}

.logo:hover {
    box-shadow: 10px 10px var(--shadow);
    border-top: 1px solid var(--highlight-hover);    
    border-left: 1px solid var(--highlight-hover);   
}

.logo-square {
  display: block;
}

.logo-wide {
  display: none;
}

@media (min-width: 500px) {
  .logo-square {
    display: none;
  }
  
  .logo-wide {
    display: block;
  }
}

.menu-buttons {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    
    margin-left: 1rem;
}

.main-nav {
    grid-column: 1 / -1; /* Span from first to last col. */
    grid-row: 2;
    display: none;
    width: 100%;
    text-align: center;
}

.menu-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    color: var(--text);
    background: var(--bg-2);
    background: var(--bg-2);
    box-shadow: 6px 6px var(--shadow);
    border: var(--bg-2);
    border-top: 1px solid var(--highlight-1);
    border-left: 1px solid var(--highlight-1);

}

.menu-toggle:hover {
    cursor: pointer;
    background: var(--bg-2);
    box-shadow: 8px 8px var(--shadow);
    border-top: 1px solid var(--highlight-3);
    border-left: 1px solid var(--highlight-3);
}

.sync-button,
.add-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;

    background: var(--green);
    color: var(--text);
    border: 1px solid var(--green);
    border-top: 1px solid var(--highlight-1);
    border-left: 1px solid var(--highlight-1);
    box-shadow: 6px 6px var(--shadow);
    transition: 0.2s;
}

.sync-button:hover,
.add-button:hover {
    cursor: pointer;
    background: var(--bg-input-light);
    color: var(--text-dark);
    box-shadow: 8px 8px var(--shadow);
    border-top: 1px solid var(--highlight-3);
    border-left: 1px solid var(--highlight-3);
}    

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

.main-nav a {
    display: block;
    padding: 1rem;
    color: var(--text);
    font-size: 1.2rem;
    text-decoration: none;
}

.main-nav a:hover {
    text-decoration: underline;
    background: var(--bg-2);
    display: block;
}

.main-nav.opened {
    display: block;
}

@media (min-width: 768px) {

    header {
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto;
    }

    .main-nav {
        display: flex;
        justify-content: flex-end;
        grid-column: 2;
        grid-row: 1;
    }

    .menu-buttons {
        grid-column: 3;
        grid-row: 1;
    }

    .main-nav ul {
        display: flex;
        justify-content: end;
    }

    .main-nav a {
        font-size: 1.5rem;
        text-decoration: none;
    }

    .main-nav a:hover {
        background: none;
        text-decoration: underline;
    }

    .menu-toggle {
        display: none;
    }
    
}