325 lines
6.8 KiB
CSS
325 lines
6.8 KiB
CSS
/* Recent Posts block styles */
|
|
|
|
.recent-posts {
|
|
--recent-posts-card-bg: color-mix(in oklch, var(--color-cwc-blue-03) 30%, white);
|
|
--recent-posts-gap: clamp(1.5rem, 3vw, 3rem);
|
|
--recent-posts-vector-height: clamp(31rem, 40vw, 37.875rem);
|
|
|
|
background: var(--color-white);
|
|
overflow: hidden;
|
|
padding: clamp(8rem, 11vw, 13.5rem) 0 clamp(4rem, 8vw, 8rem);
|
|
position: relative;
|
|
}
|
|
|
|
.recent-posts__background {
|
|
height: var(--recent-posts-vector-height);
|
|
inset-block-start: 0;
|
|
inset-inline: 0;
|
|
overflow: hidden;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
z-index: 0;
|
|
}
|
|
|
|
.recent-posts__vector {
|
|
display: block;
|
|
height: auto;
|
|
min-height: var(--recent-posts-vector-height);
|
|
object-fit: cover;
|
|
opacity: 0.75;
|
|
width: 100%;
|
|
}
|
|
|
|
.recent-posts__inner {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.recent-posts__header {
|
|
align-items: start;
|
|
display: grid;
|
|
gap: clamp(1.5rem, 5vw, 5rem);
|
|
grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
|
|
margin: 0 auto clamp(2rem, 4vw, 3.25rem);
|
|
max-width: 1280px;
|
|
}
|
|
|
|
.recent-posts__heading {
|
|
color: var(--color-cwc-blue-01);
|
|
font-family: var(--font-quincy);
|
|
font-size: clamp(2.75rem, 5vw, 4rem);
|
|
font-weight: 700;
|
|
line-height: 1;
|
|
margin: 0;
|
|
}
|
|
|
|
.recent-posts__heading span {
|
|
color: var(--color-secondary);
|
|
}
|
|
|
|
.recent-posts__intro {
|
|
color: var(--color-dark);
|
|
font-size: var(--text-20px);
|
|
line-height: 1.35;
|
|
margin: 0;
|
|
max-width: 44rem;
|
|
}
|
|
|
|
.recent-posts__grid {
|
|
container-type: inline-size;
|
|
display: grid;
|
|
gap: var(--recent-posts-gap);
|
|
grid-template-columns: repeat(3, minmax(0, 397px));
|
|
justify-content: center;
|
|
position: relative;
|
|
}
|
|
|
|
.recent-posts__grid::before {
|
|
background: var(--color-cwc-blue-03);
|
|
content: "";
|
|
height: 16px;
|
|
left: 50%;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
top: min(250px, calc(((100cqw - (2 * var(--recent-posts-gap))) / 3) * 250 / 397));
|
|
transform: translateX(-50%);
|
|
width: 100vw;
|
|
z-index: 0;
|
|
}
|
|
|
|
.recent-posts__card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 397px;
|
|
min-height: 100%;
|
|
position: relative;
|
|
width: 100%;
|
|
z-index: 1;
|
|
}
|
|
|
|
.recent-posts__image-link {
|
|
aspect-ratio: 397 / 250;
|
|
border-radius: 0.75rem 0.75rem 0 0;
|
|
display: block;
|
|
max-height: 250px;
|
|
max-width: 397px;
|
|
overflow: hidden;
|
|
width: 100%;
|
|
}
|
|
|
|
.recent-posts__image {
|
|
display: block;
|
|
height: 100%;
|
|
max-height: 250px;
|
|
max-width: 397px;
|
|
object-fit: cover;
|
|
width: 100%;
|
|
}
|
|
|
|
.recent-posts__image--placeholder {
|
|
background:
|
|
linear-gradient(
|
|
135deg,
|
|
color-mix(in oklch, var(--color-cwc-blue-03) 45%, white),
|
|
color-mix(in oklch, var(--color-cwc-blue-01) 18%, white)
|
|
);
|
|
}
|
|
|
|
.recent-posts__body {
|
|
background: var(--recent-posts-card-bg);
|
|
display: flex;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
padding: clamp(1.5rem, 3vw, 2rem);
|
|
}
|
|
|
|
.recent-posts__title {
|
|
color: var(--color-cwc-blue-01);
|
|
font-family: var(--font-quincy);
|
|
font-size: var(--text-30px);
|
|
font-weight: 700;
|
|
line-height: 1.15;
|
|
margin: 0 0 1.75rem;
|
|
}
|
|
|
|
.recent-posts__title::after {
|
|
background: var(--color-secondary);
|
|
content: "";
|
|
display: block;
|
|
height: 4px;
|
|
margin-top: 0.45rem;
|
|
width: 3rem;
|
|
}
|
|
|
|
.recent-posts__title a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.recent-posts__title a:hover,
|
|
.recent-posts__title a:focus {
|
|
color: var(--color-cwc-blue-02);
|
|
}
|
|
|
|
.recent-posts__excerpt {
|
|
color: var(--color-dark);
|
|
font-size: var(--text-18px);
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.recent-posts__excerpt p {
|
|
margin: 0;
|
|
}
|
|
|
|
.recent-posts__read-more {
|
|
align-self: flex-start;
|
|
color: var(--color-secondary);
|
|
display: inline-block;
|
|
font-size: var(--text-18px);
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
margin-top: auto;
|
|
padding-top: clamp(1.75rem, 3vw, 2.75rem);
|
|
text-decoration: underline;
|
|
text-decoration-thickness: 4px;
|
|
text-underline-offset: 0.35rem;
|
|
}
|
|
|
|
.recent-posts__read-more:hover,
|
|
.recent-posts__read-more:focus {
|
|
color: var(--color-cwc-blue-01);
|
|
}
|
|
|
|
.recent-posts__footer {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: clamp(3rem, 5vw, 4.75rem);
|
|
}
|
|
|
|
.recent-posts__blog-link.button {
|
|
background: var(--color-white);
|
|
font-size: var(--text-18px);
|
|
min-width: 10rem;
|
|
text-align: center;
|
|
}
|
|
|
|
@media (max-width: 1024px) {
|
|
.recent-posts__background {
|
|
height: clamp(33rem, 59vw, 38rem);
|
|
}
|
|
|
|
.recent-posts__vector {
|
|
min-height: clamp(33rem, 59vw, 38rem);
|
|
}
|
|
|
|
.recent-posts__header {
|
|
grid-template-columns: 1fr;
|
|
max-width: 48rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.recent-posts__intro {
|
|
margin-inline: auto;
|
|
}
|
|
|
|
.recent-posts__grid {
|
|
grid-template-columns: repeat(2, minmax(0, 397px));
|
|
}
|
|
|
|
.recent-posts__grid::before {
|
|
top: min(250px, calc(((100cqw - var(--recent-posts-gap)) / 2) * 250 / 397));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.recent-posts {
|
|
padding: 6.25rem 0 3.25rem;
|
|
}
|
|
|
|
.recent-posts__background {
|
|
height: 30rem;
|
|
}
|
|
|
|
.recent-posts__vector {
|
|
min-height: 30rem;
|
|
object-position: center top;
|
|
}
|
|
|
|
.recent-posts__header {
|
|
gap: 1rem;
|
|
margin-bottom: 1.75rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.recent-posts__heading {
|
|
font-size: var(--text-40px);
|
|
}
|
|
|
|
.recent-posts__intro {
|
|
font-size: var(--text-14px);
|
|
line-height: 1.35;
|
|
max-width: 20rem;
|
|
}
|
|
|
|
.recent-posts__grid {
|
|
grid-template-columns: minmax(0, 18.25rem);
|
|
margin-inline: auto;
|
|
max-width: 18.25rem;
|
|
}
|
|
|
|
.recent-posts__grid::before {
|
|
height: 0.75rem;
|
|
top: min(184px, calc(100cqw * 250 / 397));
|
|
}
|
|
|
|
.recent-posts__card:nth-child(n + 2) {
|
|
display: none;
|
|
}
|
|
|
|
.recent-posts__image-link {
|
|
border-radius: 0.5rem 0.5rem 0 0;
|
|
}
|
|
|
|
.recent-posts__body {
|
|
padding: 1.25rem;
|
|
}
|
|
|
|
.recent-posts__title {
|
|
font-size: var(--text-24px);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.recent-posts__excerpt,
|
|
.recent-posts__read-more {
|
|
font-size: var(--text-14px);
|
|
}
|
|
|
|
.recent-posts__read-more {
|
|
padding-top: 1.75rem;
|
|
text-decoration-thickness: 3px;
|
|
}
|
|
|
|
.recent-posts__footer {
|
|
align-items: center;
|
|
flex-direction: column;
|
|
gap: 1.25rem;
|
|
margin-top: 1.4rem;
|
|
}
|
|
|
|
.recent-posts__footer::before {
|
|
background:
|
|
radial-gradient(circle, var(--color-cwc-blue-01) 0 0.2rem, transparent 0.22rem) left center / 0.75rem 0.5rem repeat-x;
|
|
content: "";
|
|
display: block;
|
|
height: 0.5rem;
|
|
width: 2.25rem;
|
|
}
|
|
|
|
.recent-posts__blog-link.button {
|
|
font-size: var(--text-14px);
|
|
min-height: 2.25rem;
|
|
min-width: 8.5rem;
|
|
padding: 0.5rem 0.85rem;
|
|
}
|
|
}
|