/* Блог LoftVip: список статей і сторінка статті. Підключається лише на сторінках блогу (base.html), після site.css. */

/* ---------- список статей ---------- */
.blog__intro{max-width:60ch;margin:14px 0 0;color:var(--mute);font-size:clamp(16px,1.3vw,19px);line-height:1.5}
/* сітка на 6 колонок: звичайна картка займає 2 (три в ряд), у неповному останньому ряду дві картки по 3,
   одна — на всю ширину (клас ставить blog.html), тож рядів із «дірою» немає */
.posts{list-style:none;margin:0;padding:0;display:grid;gap:clamp(16px,2vw,28px);grid-template-columns:repeat(6,minmax(0,1fr))}
.post-card{grid-column:span 2;display:flex;min-width:0;background:var(--panel);border-radius:var(--r);overflow:hidden}
.post-card--half{grid-column:span 3}
.post-card--half .post-card__media{aspect-ratio:16/9}
@media (max-width:1023px){
  .post-card{grid-column:span 3}
  .posts--more>li:nth-child(3){display:none}
}
@media (max-width:639px){.post-card,.post-card--half{grid-column:1/-1}.posts--more>li:nth-child(3){display:flex}}
.post-card__link{display:flex;flex-direction:column;width:100%;color:var(--ink)}
.post-card__link:hover{color:var(--ink)}
.post-card__media{display:block;position:relative;aspect-ratio:3/2;overflow:hidden;background:var(--tile)}
.post-card__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .35s}
.post-card__link:hover .post-card__media img{transform:scale(1.04)}
.post-card__body{display:flex;flex-direction:column;gap:10px;padding:clamp(18px,1.6vw,26px);flex:1}
.post-card__meta{font-size:14px;color:var(--mute)}
.post-card__title{font-family:var(--display);font-weight:var(--hw);text-transform:var(--tt);letter-spacing:var(--ls);font-size:clamp(21px,1.7vw,26px);line-height:1.15;text-wrap:balance;transition:color .15s}
.post-card__link:hover .post-card__title{color:var(--acc)}
.post-card__text{color:var(--mute);font-size:15px;line-height:1.5;text-wrap:pretty}
.post-card__more{margin-top:auto;padding-top:6px;color:var(--acc);font-weight:500;font-size:15px}
.post-card__link:focus-visible{outline-offset:-2px}

/* перша (свіжа) стаття — велика картка на всю ширину */
.post-card--big{grid-column:1/-1}
.post-card--big .post-card__title{font-size:clamp(26px,3vw,46px);line-height:1.08}
.post-card--big .post-card__text{font-size:clamp(15px,1.2vw,18px);max-width:52ch}
@media (min-width:900px){
  .post-card--big .post-card__link{flex-direction:row}
  .post-card--big .post-card__media{flex:0 0 58%;aspect-ratio:16/10}
  .post-card--big .post-card__body{justify-content:center;gap:16px;padding:clamp(28px,3.4vw,64px)}
  .post-card--big .post-card__more{margin-top:8px}
}

/* ---------- стаття ---------- */
.post-top,.post{max-width:calc(1100px + 2*var(--pad))}
.post{margin-inline:auto}
.post-top{margin-inline:auto}
.post__head{display:flex;flex-direction:column;gap:14px;max-width:820px;margin:0 auto clamp(24px,3vw,40px)}
.post__meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0;font-size:14px;color:var(--mute)}
.post__meta a{color:var(--acc);font-weight:600;letter-spacing:.1em;text-transform:uppercase;font-size:13px}
.post__meta time{color:var(--mute)}
.post__title{font-size:clamp(32px,4.6vw,66px);line-height:1.04}
.post__cover{width:auto;margin:0 0 clamp(28px,4vw,56px);border-radius:0}
.post__cover img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:var(--r);background:var(--panel)}

/* текст статті: вузька колонка для читання */
.post__body{max-width:720px;margin-inline:auto;font-size:18px;line-height:1.7;text-wrap:pretty}
.post__body p,.post__body ul,.post__body ol{margin:0 0 1.1em}
.post__body .lead{font-size:clamp(19px,1.6vw,22px);line-height:1.55;margin-bottom:1.6em;color:var(--ink)}
.post__body h2{margin:2.1em 0 .6em;font-size:clamp(26px,2.6vw,36px);line-height:1.1}
.post__body h3{margin:1.7em 0 .5em;font-size:clamp(20px,1.7vw,24px);line-height:1.2}
.post__body h2+h3{margin-top:1em}
.post__body ul,.post__body ol{padding-left:1.4em}
.post__body li{margin-bottom:.45em;padding-left:.2em}
.post__body ol li::marker{font-family:var(--display);font-weight:500}
.post__body a{text-decoration-thickness:1px;text-underline-offset:4px}
.post__body a:hover{text-decoration-thickness:2px}

/* фото з підписом; на широкому екрані трохи ширші за колонку тексту */
.post__body figure{margin:2em 0 2.2em}
.post__body figure img{display:block;width:auto;max-width:100%;height:auto;max-height:min(78vh,720px);margin-inline:auto;border-radius:var(--r);background:var(--tile)}
/* студійний кадр на білому: плашка кольору картки товару, біле тло «розчиняється» через multiply */
.post__body .fig-tile{display:block;max-width:600px;margin-inline:auto;padding:clamp(8px,2vw,24px);background:var(--tile);border-radius:var(--r)}
.post__body .fig-tile img{max-height:480px;border-radius:0;background:none;mix-blend-mode:multiply}
.post__body figcaption{margin-top:12px;padding-left:14px;border-left:2px solid var(--acc);font-size:15px;line-height:1.5;color:var(--mute)}
@media (min-width:1100px){.post__body figure{margin-inline:-80px}.post__body figcaption{margin-inline:80px}}
/* фото з малого оригіналу: build.py ставить ширину не більшу за природну (style на img), а фігуру
   й підпис звужує до фото (--fw), щоб кадр не губився в широкій колонці */
@media (min-width:601px){
  .post__body figure.fig--narrow{max-width:var(--fw);margin-inline:auto}
  .post__body .fig--narrow figcaption{margin-inline:0}
}

.post__foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 24px;max-width:720px;margin:clamp(32px,4vw,56px) auto 0;padding-top:20px;border-top:1px solid var(--line)}
.post__back,.post__call{display:inline-block;margin:0;padding:10px 0;font-weight:500}
.post__back{color:var(--acc)}
.post__call{color:var(--mute)}
.post__call:hover{color:var(--acc)}

/* товари зі статті й інші статті */
.post-goods,.post-more{margin-top:clamp(48px,6vw,96px);padding-top:clamp(32px,4vw,56px);border-top:1px solid var(--line)}
@media (min-width:1600px){
  .post-goods__grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - 4*var(--gap))/5.25);overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding-bottom:10px}
  .post-goods__grid>*{scroll-snap-align:start}
}
.posts--more .post-card__title{font-size:clamp(19px,1.5vw,23px)}

@media (max-width:600px){
  .post__body{font-size:17px;line-height:1.65}
  .post__body figure{margin-inline:calc(-1*var(--pad))}
  .post__body figure img{border-radius:0}
  .post__body figcaption{margin-inline:var(--pad)}
  .post__cover{margin-inline:calc(-1*var(--pad))}
  .post__cover img{border-radius:0;aspect-ratio:4/3}
}
