/* RemTeam - blog / "Полезное" section */

.blog-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.blog-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 74px;
}

.blog-header .brand__logo {
  height: 40px;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

.blog-nav a {
  padding-block: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  transition: color 0.2s var(--ease);
}

.blog-nav a:hover,
.blog-nav a.is-active {
  color: var(--brand-700);
}

.blog-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.blog-header .header-phone {
  color: var(--ink);
}

.blog-header .header-phone:hover {
  color: var(--brand-700);
}

.blog-header .mobile-toggle {
  display: none;
  border-color: var(--line-strong);
  color: var(--ink);
}

.blog-header .mobile-toggle:hover {
  background: var(--surface-2);
}

.blog-hero {
  display: grid;
  gap: 14px;
  max-width: 780px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.blog-hero h1 {
  font-size: var(--step-3);
}

.blog-hero p {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 66ch;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-grid--two {
  grid-template-columns: 1fr 1fr;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.post-card:hover .post-card__media img {
  transform: scale(1.03);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.post-card__cat {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.post-card__title {
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-card__title a {
  color: var(--ink);
  transition: color 0.2s var(--ease);
}

.post-card__title a:hover {
  color: var(--brand-700);
}

.post-card__excerpt {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.post-card__meta span + span::before {
  content: "·";
  margin-right: 8px;
}

.section__more {
  display: flex;
  justify-content: center;
  margin-top: clamp(26px, 4vw, 40px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: clamp(24px, 4vw, 40px);
  margin-bottom: 26px;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--brand-700);
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumbs .breadcrumbs__sep {
  color: var(--line-strong);
}

.breadcrumbs span[aria-current] {
  color: var(--muted);
}

.post {
  max-width: 860px;
  margin-inline: auto;
}

.post__head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(24px, 4vw, 34px);
}

.post__head h1 {
  font-size: var(--step-3);
}

.post__lead {
  max-width: 68ch;
  font-size: var(--step-1);
  color: var(--muted);
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

.post__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.post__meta svg {
  width: 15px;
  height: 15px;
  color: var(--brand-600);
}

.post__cover {
  margin: 0 0 clamp(26px, 4vw, 38px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.post__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post__body {
  max-width: 760px;
  margin-inline: auto;
}

.post__body h2,
.post__body h3 {
  scroll-margin-top: 96px;
}

.post__body h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-size: var(--step-2);
}

.post__body h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: var(--step-1);
}

.post__body p,
.post__body li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.post__body p + p {
  margin-top: 14px;
}

.post__body ul {
  margin-top: 10px;
}

.post__body ol {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-left: 24px;
  list-style: decimal;
}

.post__body li + li {
  margin-top: 4px;
}

.post__body img {
  width: 100%;
  height: auto;
  margin: 18px 0;
  border-radius: var(--r-md);
}

.post__body a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post__body strong {
  color: var(--ink);
}

.post__body blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  background: var(--brand-50);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--r-sm);
}

.post__body blockquote p {
  margin: 0;
  color: var(--ink-soft);
}

.post__body code {
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 0.9em;
}

.post__body hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 860px;
  margin: clamp(36px, 6vw, 52px) auto 0;
  padding: clamp(22px, 4vw, 30px);
  background: linear-gradient(120deg, var(--brand-800), var(--brand-600));
  border-radius: var(--r-lg);
  color: var(--white);
}

.post-cta h2 {
  margin-bottom: 6px;
  font-size: var(--step-1);
  color: var(--white);
}

.post-cta p {
  max-width: 52ch;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

.post-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-related {
  max-width: 860px;
  margin: clamp(36px, 6vw, 52px) auto 0;
}

.post-related__title {
  margin-bottom: 18px;
  font-size: var(--step-1);
}

.post__back {
  max-width: 860px;
  margin: 34px auto 0;
}

.post__back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-700);
}

.post__back svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
  transition: transform 0.25s var(--ease);
}

.post__back a:hover svg {
  transform: rotate(180deg) translateX(3px);
}

@media (max-width: 1024px) {
  .blog-nav {
    display: none;
  }

  .blog-header .mobile-toggle {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  .blog-header__actions .btn {
    display: none;
  }
}

@media (max-width: 980px) {
  .post-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .blog-header .header-phone {
    display: none;
  }

  .post-grid,
  .post-grid--two {
    grid-template-columns: 1fr;
  }

  .post-cta {
    align-items: flex-start;
  }

  .post-cta__actions {
    width: 100%;
  }

  .post-cta__actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .blog-header__actions .btn {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 0.78rem;
  }

  .post-card__body {
    padding: 18px 18px 20px;
  }
}
