/* «Olart в медіа»: журнальная раскладка карточек публикаций. */

.posts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(3rem,6vw,6rem) clamp(1rem,2.4vw,2.4rem);padding:0 var(--pad) clamp(4rem,8vw,7rem)}
.post{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:0;text-decoration:none}
.post img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:1.6rem;filter:saturate(1.05);transition:transform .35s var(--spring)}
.post:hover img{transform:rotate(-1.2deg)}
.post__txt{display:flex;flex-direction:column;gap:.8rem;min-width:0}
.post__meta{display:flex;gap:.8rem;align-items:baseline;font:700 .85rem/1 var(--body);letter-spacing:.06em;text-transform:uppercase}
.post__meta i{font-style:normal;color:var(--red)}
.post__t{font:900 clamp(1.8rem,3vw,3.2rem)/.92 var(--disp);text-transform:uppercase;text-wrap:balance}
.post__go{align-self:flex-start;margin-top:auto;font:900 1.25rem/1 var(--disp);text-transform:uppercase;text-decoration:underline;text-underline-offset:.18em}
.post:nth-child(even){margin-top:clamp(0rem,8vw,8rem)}

/* первая — во всю ширину, текст поверх фото */
.post:first-child{display:block;grid-column:1/-1;margin-top:0;overflow:hidden;border-radius:2rem;color:var(--cream)}
.post:first-child::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgb(14 8 32/.05) 25%,rgb(14 8 32/.88) 100%);pointer-events:none}
.post:first-child img{display:block;height:100%;aspect-ratio:21/10;border-radius:0}
.post:first-child:hover img{transform:scale(1.02)}
.post:first-child .post__txt{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:clamp(1.2rem,3vw,3rem)}
.post:first-child .post__meta{align-self:flex-start;padding:.5rem .9rem;border-radius:999px;background:var(--cream);color:var(--navy)}
.post:first-child .post__t{max-width:22ch;font-size:clamp(2rem,4.4vw,4.8rem)}
.post:first-child .post__go{align-self:auto;color:var(--cream)}

/* четвёртая — во всю ширину, фото слева */
.post:nth-child(4){display:grid;grid-column:1/-1;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:1rem clamp(1.2rem,3vw,3rem);align-items:center;margin-top:0}
.post:nth-child(4) img{aspect-ratio:16/10}
.post:nth-child(4) .post__t{font-size:clamp(2rem,4vw,4.6rem)}

@media (max-width:760px){
  .posts{grid-template-columns:1fr}
  .post:nth-child(even){margin-top:0}
  .post:first-child img{aspect-ratio:3/4}
  .post:first-child .post__t{font-size:clamp(1.8rem,8vw,2.6rem)}
  .post:nth-child(4){display:flex}
}
