nav.list { display:flex; flex-direction: row; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; width: 100%; margin-left: 3em; @include media-mobile { margin-left: 0px; } h1 { width: 100%; font-size: 2.5em; color: $color-header-primary; @include media-mobile { text-align: center; } } a { width: 32em; margin-bottom: 1em; color: inherit; text-decoration: none; transition: all 0.5s ease-in; text-align: center; @include media-desktop { margin-right: 3em; } h2 { font-size: 1.5em; } img { width: 100%; max-height: 12em; object-fit: cover; } .header { transition: background-color 0.25s ease-in, border-color 0.25s ease-in; padding: 1em; background-color: $color-item-primary; display: flex; flex-wrap: wrap; justify-content: center; position: relative; border-width: 1px; border-style: solid; border-color: $color-item-primary; color: $color-text-secondary; &::after { transition: background-color 0.25s ease-in, border-color 0.25s ease-in; content: ""; width: $size-arrow; height: $size-arrow; background-color: $color-item-primary; position: absolute; bottom: -($size-arrow/2)-1px; left: 0px; right: 0px; margin-left: auto; margin-right: auto; transform: rotate(45deg); border-style: solid; border-color: $color-item-primary; border-width: 1px; } > .content { padding-bottom: 1.5em; } > * { width: 100%; } } &:hover { .header { border-color: $color-item-secondary; background-color: $color-item-secondary; } .header::after { border-color: transparent $color-item-secondary $color-item-secondary transparent; background-color: $color-item-secondary; } } } }