/* ===== Blog base ===== */
:root{
  --blog-max: 1100px;
  --gap: 20px;
  --gap-lg: 28px;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0,0,0,.08);
  --shadow-hover: 0 14px 40px rgba(0,0,0,.12);
  --c-text: #111;
  --c-sub: #5b5b5b;
  --c-muted: #8b8b8b;
  --c-line: #e9ecef;
  --c-bg: #fff;
  --c-accent: #1B3D6D; /* MyWash/Oristyle фирм. синий можно править */
}

@media (prefers-color-scheme: dark){
  :root{
    --c-text: #e8e8e8;
    --c-sub: #b7b7b7;
    --c-muted: #9aa0a6;
    --c-line: #2c2f33;
    --c-bg: #0f1113;
    --shadow: 0 8px 30px rgba(0,0,0,.35);
    --shadow-hover: 0 14px 40px rgba(0,0,0,.45);
  }
}

.blog, .post{
  width: min(100% - 32px, var(--blog-max));
  margin: 32px auto 56px;
  color: var(--c-text);
}

.blog__head, .post__head{
  margin-bottom: 18px;
}

.blog__head h1, .post__title{
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.blog__subtitle, .post__meta{
  color: var(--c-sub);
  font-size: 14.5px;
}

/* ===== List grid ===== */
.blog__list{
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 680px){
  .blog__list{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px){
  .blog__list{ grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
}

/* ===== Card ===== */
.blog-card{
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: clip;
  transform: translateY(0);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.blog-card__link{ display:block; color:inherit; text-decoration:none; }

.blog-card__thumb{
  aspect-ratio: 16/9;
  background: #f6f7f8;
  overflow: hidden;
}
.blog-card__thumb img{
  width: 100%; height: 100%; object-fit: cover; display:block;
  transform: scale(1.02);
  transition: transform .5s ease;
}

.blog-card__body{
  padding: 14px 16px 16px;
}
.blog-card__title{
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.25;
  margin: 0 0 6px;
}
.blog-card__excerpt{
  margin: 0 0 10px;
  color: var(--c-sub);
  font-size: 14.5px;
}
.blog-card__date{
  font-size: 12.5px;
  color: var(--c-muted);
}

/* Hover */
@media (hover:hover){
  .blog-card:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(27,61,109,.25);
  }
  .blog-card:hover .blog-card__thumb img{
    transform: scale(1.06);
  }
}

/* ===== Pager ===== */
.pager{
  margin: 24px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pager__item{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--c-text);
  background: var(--c-bg);
  box-shadow: var(--shadow);
  transition: background .25s, border-color .25s, transform .25s;
}
.pager__item:hover{ transform: translateY(-2px); }
.pager__item--current{
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  pointer-events:none;
}

/* ===== Post ===== */
.post__meta{ margin-top: 6px; font-size: 13.5px; }
.post__meta time{ white-space: nowrap; }

.post__hero{
  margin: 14px 0 18px;
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow);
}
.post__hero img{ width:100%; height:auto; display:block; }

/* hero layout модификаторы */
.post--hero-none .post__hero{ display:none; }
.post--hero-inline .post__hero{ margin: 18px 0; }
.post--hero-full-bleed .post__hero{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

/* Article body */
.post__body{
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.75;
}
.post__body p{ margin: 0 0 1.05em; }
.post__body h2{
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25; margin: 1.4em 0 .5em;
}
.post__body h3{
  font-size: clamp(19px, 2vw, 22px);
  margin: 1.3em 0 .45em;
}
.post__body img{
  max-width: 100%; height: auto; display:block; margin: 16px auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.post__body blockquote{
  margin: 1.2em 0; padding: 14px 16px;
  border-left: 4px solid var(--c-accent);
  background: linear-gradient(90deg, rgba(27,61,109,.06), transparent 60%);
  border-radius: 8px;
  color: var(--c-sub);
}
.post__body a{
  color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px;
}

/* Files */
.post__files{ margin-top: 26px; }
.post__files h3{ margin: 0 0 10px; }
.files{ list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.files__item{
  display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center;
  padding: 10px 12px; border:1px solid var(--c-line); border-radius: 12px;
  background: var(--c-bg); box-shadow: var(--shadow);
}
.files__item a{ font-weight: 600; text-decoration: none; color: var(--c-text); }
.files__item a:hover{ color: var(--c-accent); text-decoration: underline; }
.files__item small{ color: var(--c-muted); }

/* Tags */
.tags{
  margin: 26px 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:8px;
}
.tags a{
  display:inline-flex; align-items:center; height: 34px; padding: 0 12px;
  border:1px solid var(--c-line); border-radius: 999px; text-decoration:none;
  color: var(--c-text); background: var(--c-bg);
  box-shadow: var(--shadow);
}
.tags a:hover{ border-color: var(--c-accent); color: var(--c-accent); }

/* ===== Subtle reveal animation ===== */
.reveal{ opacity: 0; transform: translateY(10px); }
.reveal--shown{ opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce){
  .reveal, .reveal--shown{ opacity:1; transform:none; }
}
