.product-card, .gamme-card { display: flex; position: relative; height: 300px; margin-bottom: 20px; overflow: hidden; > img { display: block; width: 100%; height: 100%; object-fit: cover; max-width: none; } a { top: 0; z-index: 9; } .overlay { display: flex; align-items: center; justify-content: center; position: absolute; width: 100%; height: 50%; font-weight: bold; transition: bottom 0.4s; } } .product-card > img { object-fit: contain; } .product-card { height: 354px; margin-right: 20px; .product-card__title, a { position: absolute; right: 0; bottom: 0; left: 0; } .product-card__title { padding: 1em 0.2em; background-color: rgba($color-light, 0.5); } .overlay { bottom: -200px; span { width: 50%; padding-top: 1em; padding-bottom: 1em; background-color: $color-light; border-radius: 2em; } } &:hover .overlay { bottom: 0; } } .gamme-card { .gamme-card__title, a { position: absolute; right: 0; bottom: 0; left: 0; } .gamme-card__title { padding: 1em 0.2em; background-color: rgba($color-light, 0.5); } .overlay { bottom: -50px; span { color: $color-light; font-size: 30px; font-family: $fontbarlow-bold; padding-bottom: 50px; } } &:hover .overlay { bottom: 50px; } } #list { .wrapper > div:first-child { padding-top: 0; } .title { color: $color-light; font-size: calc(#{$globalfont} * 2); } .is-flex { margin-bottom: 60px; column-gap: 20px; flex-wrap: wrap; flex-direction: initial; } .section-header { color: $color-light; .title { margin-bottom: 5px; } & > img { object-fit: cover; max-height: 243px; } } } .overlay { span { color: $color-brown; } } #posts { position: relative; .sectiontitle:after { content: ""; background-color: $color-dark; } } .posts-list { max-width: 1120px; width: 100%; margin: 0 auto; justify-content: space-evenly; align-items: center; flex-wrap: wrap; column-gap: 20px; } .post-card { width: 360px; margin-bottom: 50px; } @media (min-width: 769px) { #list .title { font-size: calc(#{$globalfont} * 3.25); } .product-card { width: 30%; max-width: 30%; } .gamme-card { &:nth-child(n) { width: 32%; max-width: 32%; } } .gammes-3 .gamme-card, .gammes-6 .gamme-card, .gammes-9 .gamme-card { &:nth-child(1), &:nth-child(2), &:nth-child(3), &:nth-child(4), &:nth-child(5), &:nth-child(6), &:nth-child(7), &:nth-child(8), &:nth-child(9) { width: 32%; max-width: 32%; } } .gammes-1 .gamme-card, .gammes-2 .gamme-card, .gammes-4 .gamme-card { &:nth-child(1), &:nth-child(2), &:nth-child(3), &:nth-child(4) { width: 49%; max-width: 49%; } } .gammes-5 .gamme-card, .gammes-8 .gamme-card { &:nth-child(4), &:nth-child(5) { width: 49%; max-width: 49%; } } .gammes-7 .gamme-card { &:nth-child(1), &:nth-child(2), &:nth-child(6), &:nth-child(7) { width: 49%; max-width: 49%; } } #list { .section-header { margin-bottom: 80px; .content { position: absolute; width: 100%; padding-top: 1rem; padding-bottom: 1rem; } } } #posts { > img { position: absolute; top: 0; left: 0; z-index: -1; object-fit: cover; } } } @media (max-width: 1024px) { #list { .is-flex { justify-content: center; } } .posts-list.is-flex{ flex-direction: initial; } } @media (max-width: 768px) { #posts { > img { position: absolute; top: 0; left: 0; height: 14%; z-index: -1; object-fit: cover; } } .posts-list.is-flex { flex-direction: column; } .post-card { width: 100%; max-width: 360px; } } @media (max-width: 480px) { #posts > img { height: 8%; } }