/* ==========================================================================
   BLOG & NEWS STYLES - РОССАВТОХИМ PRO
   ========================================================================== */

/* 1. БЛОГ: ВЕРХНИЙ БЛОК И ХЛЕБНЫЕ КРОШКИ */
.blog-header-section {
  padding: 30px 0 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 36px;
}

.blog-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 14px;
}

.blog-breadcrumbs a {
  color: #475569;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-breadcrumbs a:hover {
  color: #0f172a;
}

.blog-breadcrumbs .sep {
  color: #94a3b8;
  font-size: 0.75rem;
}

.blog-breadcrumbs .current {
  color: #0f172a;
  font-weight: 600;
}

.blog-hero-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: rgba(251, 216, 10, 0.15);
  color: #854d0e;
  border: 1px solid rgba(251, 216, 10, 0.4);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
}

.blog-page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}

.blog-page-desc {
  font-size: 1rem;
  color: #64748b;
  max-width: 780px;
  line-height: 1.55;
  margin: 6px 0 0;
}

/* Навигационные табы категорий блога */
.blog-nav-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.blog-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.blog-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.blog-tab-btn.is-active {
  background: #fbd80a;
  color: #111216;
  border-color: #fbd80a;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(251, 216, 10, 0.35);
}

.blog-tab-btn .tab-count {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 12px;
}

.blog-tab-btn.is-active .tab-count {
  background: rgba(0, 0, 0, 0.15);
}

/* 2. СЕТКА РАЗМЕЩЕНИЯ (LAYOUT) */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 3. КАРТОЧКИ СТАТЕЙ (POSTS GRID) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.post-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
  box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

/* Миниатюра */
.post-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.post-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Заглушка, если нет фото */
.post-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #94a3b8;
  gap: 10px;
}

.post-placeholder svg {
  width: 44px;
  height: 44px;
  opacity: 0.6;
  color: #fbd80a;
}

.post-placeholder span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Бейджи поверх фото */
.post-badge-date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.post-badge-cat {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fbd80a;
  color: #111216;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Тело карточки */
.post-card-body {
  padding: 22px 24px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 10px;
}

.post-meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.post-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
}

.post-title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card:hover .post-title a {
  color: #d97706;
}

.post-excerpt {
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.read-more-btn svg {
  transition: transform 0.25s ease;
}

.post-card:hover .read-more-btn {
  color: #d97706;
}

.post-card:hover .read-more-btn svg {
  transform: translateX(4px);
}

.post-read-time {
  font-size: 0.8rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 4. БОКОВАЯ ПАНЕЛЬ (BLOG SIDEBAR) */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 22px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.sidebar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #fbd80a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Поиск по блогу */
.blog-search-form {
  position: relative;
  display: flex;
  width: 100%;
}

.blog-search-input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s;
  outline: none;
}

.blog-search-input:focus {
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.blog-search-submit {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  background: #fbd80a;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111216;
  cursor: pointer;
  transition: background 0.2s;
}

.blog-search-submit:hover {
  background: #e6c400;
}

/* B2B Баннер в сайдбаре */
.sidebar-b2b-banner {
  background: linear-gradient(135deg, #181920 0%, #111216 100%);
  border: 1px solid rgba(251, 216, 10, 0.3);
  border-radius: 16px;
  padding: 24px 20px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.sidebar-b2b-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(251, 216, 10, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-b2b-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 216, 10, 0.2);
  color: #fbd80a;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.sidebar-b2b-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin: 0 0 10px;
}

.sidebar-b2b-text {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 18px;
}

.sidebar-b2b-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: #fbd80a;
  color: #111216;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-b2b-btn:hover {
  background: #e6c400;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 216, 10, 0.35);
}

/* Свежие новости в сайдбаре */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s;
}

.recent-post-item:hover {
  transform: translateX(4px);
}

.recent-post-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #fbd80a;
}

.recent-post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.recent-post-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.recent-post-item:hover .recent-post-title {
  color: #d97706;
}

.recent-post-date {
  font-size: 0.78rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Рубрики блога в сайдбаре */
.sidebar-cats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-cat-item:hover,
.sidebar-cat-item.is-active {
  background: #f1f5f9;
  color: #0f172a;
}

.sidebar-cat-item.is-active {
  border-left: 3px solid #fbd80a;
}

.sidebar-cat-badge {
  font-size: 0.75rem;
  padding: 2px 7px;
  background: #e2e8f0;
  border-radius: 10px;
  color: #64748b;
}

/* Быстрые контакты в сайдбаре */
.sidebar-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
}

.sidebar-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
}

.sidebar-contact-row a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-contact-row a:hover {
  color: #d97706;
}

.sidebar-contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  flex-shrink: 0;
}

/* 5. ПАГИНАЦИЯ (PAGINATION) */
.pagination-wrap {
  margin-top: 44px;
  display: flex;
  justify-content: center;
}

.pagination-wrap .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-wrap .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.pagination-wrap .page-numbers:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.pagination-wrap .page-numbers.current {
  background: #fbd80a;
  color: #111216;
  border-color: #fbd80a;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(251, 216, 10, 0.4);
}

.pagination-wrap .page-numbers.dots {
  border: none;
  background: transparent;
  color: #94a3b8;
}

/* 6. СТРАНИЦА ОТДЕЛЬНОЙ СТАТЬИ (SINGLE POST) */
.single-post-container {
  max-width: 880px;
  margin: 0 auto;
}

.single-article {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

@media (max-width: 768px) {
  .single-article {
    padding: 24px 18px;
    border-radius: 14px;
  }
}

.single-article-header {
  margin-bottom: 28px;
}

.single-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 16px;
}

.single-article-meta .meta-pill {
  background: rgba(251, 216, 10, 0.2);
  color: #854d0e;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.single-article-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 16px;
}

@media (max-width: 768px) {
  .single-article-title {
    font-size: 1.6rem;
  }
}

.single-article-thumb {
  margin-bottom: 32px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.single-article-thumb img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.single-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.single-article-content p {
  margin-bottom: 20px;
}

.single-article-content h2,
.single-article-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #0f172a;
  margin: 36px 0 16px;
  line-height: 1.3;
}

.single-article-content h2 {
  font-size: 1.5rem;
}

.single-article-content h3 {
  font-size: 1.25rem;
}

.single-article-content ul,
.single-article-content ol {
  margin: 0 0 24px 20px;
  padding: 0;
}

.single-article-content li {
  margin-bottom: 8px;
}

.single-article-content blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  background: #f8fafc;
  border-left: 4px solid #fbd80a;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #1e293b;
}

/* CTA блок в конце статьи */
.article-b2b-cta {
  margin-top: 40px;
  padding: 32px;
  background: linear-gradient(135deg, #181920 0%, #111216 100%);
  border: 1px solid rgba(251, 216, 10, 0.3);
  border-radius: 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .article-b2b-cta {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
}

.article-b2b-cta h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px;
}

.article-b2b-cta p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.article-b2b-cta .cta-btn {
  flex-shrink: 0;
  padding: 14px 28px;
  background: #fbd80a;
  color: #111216;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.article-b2b-cta .cta-btn:hover {
  background: #e6c400;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 216, 10, 0.4);
}

/* Навигация между статьями */
.single-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

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

.post-nav-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 18px 20px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-nav-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-2px);
}

.post-nav-dir {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-nav-card:hover .post-nav-title {
  color: #d97706;
}
