/* ============================================================================
   BLOG PAGES STYLES
   ============================================================================ */

/* CSS Custom Properties */
:root {
  --primary: var(--brand-primary);
  --color-primary: var(--brand-primary);
  --color-primary-dark: #e8442a;
  --color-background: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --background-light: #f8fafc;
  --background-dark: #2B2B2B;
  --border-light: #e5e7eb;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --transition: all 0.3s ease;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-xxl: 32px;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Active navbar link */
.navbar__link--active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Breadcrumb Navigation */
/* ============================================================================
   BLOG (NOTES) STYLES – CLEANED (Option A: keep effects, remove unused blocks)
   ============================================================================ */

/* 1. CSS VARIABLES (preserved) */
:root {
  --primary: var(--brand-primary);
  --color-primary: var(--brand-primary);
  --color-primary-dark: #e8442a;
  --color-background: #fff;
  --color-surface: #fff;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --background-light: #f8fafc;
  --background-dark: #2B2B2B;
  --border-light: #e5e7eb;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --radius: 12px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --transition: .3s ease;
  --spacing-xs: .25rem;
  --spacing-sm: .5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-xxl: 32px;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Breadcrumb */
.breadcrumb {
	font-size: 14px;
	background: rgb(241 131 48 / 8%);
	padding: 8px 16px;
	border-radius: 20px;
	display: inline-flex;
}

.breadcrumb__link {
	color: #6b7280;
	text-decoration: none;
	transition: all 0.3s ease;
	font-weight: 600;
	position: relative;
}

.breadcrumb__link:hover {
	color: var(--brand-primary);
}

.breadcrumb__separator {
	color: #9ca3af;
	margin: 0 4px;
	font-weight: 400;
}

.breadcrumb__current {
	color: black;
	font-weight: 700;
}

/* 3. BLOG HEADER */
.blog-header {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
  padding: 25px 0 45px;
  position: relative;
  overflow: hidden;

}
.blog-header__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.blog-header__title {
  font-family: 'Manrope', sans-serif;
  font-size: 48px;
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.1;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-header__subtitle {
  font-size: 18px;
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
  font-weight: 500;
}

/* 4. FILTERS (widget + categories + active filter tags) */
.blog-widget {
  padding: 24px;
  margin: 0 0 24px;
  transition: .3s;
}
.blog-widget__title {
  font: 700 18px/1.2 'Manrope', sans-serif;
  color: #1f2937;
  margin: 0 0 20px;
  position: relative;
  padding-bottom: 12px;
}
.blog-widget__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  border-radius: 2px;
}
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* Используем общий чип: базовый стиль перенесён в .category-chip (index.css) */
.blog-category {
  font-size: 14px;
}
.category-chip {
    border-radius: 20px !important;
}
.blog-category__input {
  margin-right: 8px;
  accent-color: var(--brand-primary);
  width: 16px;
  height: 16px;
}
.blog-category__label {
  color: inherit;
}
.blog-category__count {
  color: inherit;
}
.blog-category:has(.blog-category__input:checked),
.blog-category__input:checked + .blog-category__label + .blog-category__count {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.blog-category:has(.blog-category__input:checked) .blog-category__label {
  color: #fff;
}
.blog-category:has(.blog-category__input:checked) .blog-category__count {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}
.blog-category.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.blog-category.active .blog-category__label {
  color: #fff;
}
.blog-category.active .blog-category__count {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}
.blog-tag-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0 0 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid initial;
}
.blog-tag-filter h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
}
.tag-name {
  background: var(--color-primary, var(--brand-primary));
  color: #fff;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
}
.tag-clear {
  background: #dc3545;
  color: #fff;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: .2s;
}
.tag-clear:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* 5. BLOG POST CARDS */
.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 0 0 3rem;
}
.blog-post-card {
  max-width: 350px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  transition: .3s cubic-bezier(.4, 0, .2, 1);
  animation: fadeInUp .6s ease forwards;
}
.blog-post-card:nth-child(1) {
  animation-delay: .1s;
}
.blog-post-card:nth-child(2) {
  animation-delay: .2s;
}
.blog-post-card:nth-child(3) {
  animation-delay: .3s;
}
.blog-post-card:nth-child(4) {
  animation-delay: .4s;
}
.blog-post-card:nth-child(5) {
  animation-delay: .5s;
}
.blog-post-card:nth-child(6) {
  animation-delay: .6s;
}
.blog-post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
}
.blog-post-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}
.blog-post-card__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  z-index: 1;
}
.blog-post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  z-index: 2;
}
.blog-post-card:hover .blog-post-card__image img {
  transform: scale(1.08);
}
.blog-post-card__category {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  box-shadow: 0 4px 12px rgba(254, 79, 50, .3);
  backdrop-filter: blur(10px);
}
.blog-post-card__content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.blog-post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}
.blog-post-card__date,
.blog-post-card__read-time {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1833014;
  padding: 4px 10px;
  border-radius: 12px;
  color: initial;
  font-weight: 600;
}
.blog-post-card__title {
  margin: 0 0 16px;
  line-height: 1.4;
}
.blog-post-card__title a {
  color: #1f2937;
  text-decoration: none;
  font: 700 20px/1.3 'Manrope', sans-serif;
  display: block;
  transition: color .3s;
}
.blog-post-card__title a:hover {
  color: var(--brand-primary);
}
.blog-post-card__excerpt {
  color: #6b7280;
  line-height: 1.7;
  margin: 0 0 20px;
  flex: 1;
  font-size: 15px;
}
.blog-post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.blog-tag {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: .3s cubic-bezier(.4, 0, .2, 1);
  font-weight: 600;
  text-transform: capitalize;
  display: inline-block;
}
.blog-tag:hover {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 79, 50, .3);
}
.blog-post-card__link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: .5px;
  position: relative;
  transition: .3s;
}
.blog-post-card__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-primary);
  transition: width .3s;
}
.blog-post-card__link:hover {
  color: #e23e1d;
  transform: translateX(4px);
}
.blog-post-card__link:hover::after {
  width: 100%;
}

/* 6. PAGINATION */
.pagination {
  font-size: 1.1rem;
}
.pagination-prev,.pagination-next {
  border: 2px solid var(--color-primary,var(--brand-primary));
};
.pagination-prev:hover,.pagination-next:hover {
  box-shadow: 0 4px 12px rgba(254,79,50,.3);
}
.pagination-prev:not([href]),.pagination-next:not([href]) {
  box-shadow: none;
}

/* 7. SINGLE POST HEADER */
.post-header {
  overflow: hidden;
}
.post-header::before {
  background: radial-gradient(circle at 20% 80%, rgb(115 254 50 / 10%) 0%, transparent 50%), 
   radial-gradient(circle at 80% 20%, rgb(199 236 170 / 8%) 0%, transparent 50%);
   pointer-events: none;

}
.post-header__content {
  z-index: 2;
}
.post-header__meta {
  font-size: 14px;
}
.post-header__category {
  text-transform: uppercase;
};
.post-header__date,.post-header__read-time {
  font-weight: 600;
};
.post-header__title {
  background-clip: text;
}
.post-header__excerpt {
  font-weight: 500;
}

/* 8. SINGLE POST IMAGE */
.post-image {
  padding: 0 24px;
}
.post-image__figure {
  background: #f8fafc;
};
.post-image__img {
  transition: .3s;
};
.post-image__img:hover {
  box-shadow: 0 25px 35px -5px rgba(0,0,0,.15),0 15px 15px -5px rgba(0,0,0,.06);
}
.post-image__caption {
  font-weight: 500;
}

/* 9. LAYOUT / SIDEBAR */
.post-layout {
  align-items: start;
}
.post-main {
  overflow-x: hidden;
}
.post-sidebar {
  top: 120px;
}

/* 10. ARTICLE CONTENT */
.post-article__content {
  overflow-x: hidden;
}
.post-article__content h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin: 48px 0 24px;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
}
.post-article__content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  border-radius: 2px;
}
.post-article__content h3 {
  font: 700 24px/1.4 'Manrope', sans-serif;
  margin: 32px 0 16px;
}
.post-article__content h4 {
  font: 600 20px/1.3 'Manrope', sans-serif;
  margin: 24px 0 12px;
}
.post-article__content p {
  margin: 0 0 24px;
}
.post-article__content ul,.post-article__content ol {
  padding-left: 24px;
}
.post-article__content li {
  line-height: 1.7;
}
.post-article__content a {
  transition: .3s;
}
.post-article__content a:hover {
  color: #e23e1d;
}
.post-article__content figure {
  position: relative;
}
.post-article__content figure img {
  transition: .3s;
};
.post-article__content figure img:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
.post-article__content img {
  border-radius: 8px;
};
.post-article__content figure.large img {
  height: 400px;
}
.post-article__content figure.square img {
  height: 250px;
}
.post-article__content .img-caption {
  text-align: center;
}

/* 11. QUOTE / HIGHLIGHT / TIP */
.post-quote {
  background: linear-gradient(135deg, rgba(254, 79, 50, .05) 0%, rgba(254, 79, 50, .02) 100%);
  border-left: 6px solid var(--brand-primary);
  padding: 32px;
  margin: 48px 0;
  border-radius: 0 16px 16px 0;
  font-size: 20px;
  font-style: italic;
  color: #374151;
  position: relative;
  box-shadow: 0 4px 12px rgba(254, 79, 50, .1);
}
.post-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--brand-primary);
  position: absolute;
  top: -10px;
  left: 32px;
  line-height: 1;
  font-family: serif;
  opacity: .7;
}
.post-highlight {
  background: linear-gradient(135deg, rgba(254, 79, 50, .08) 0%, rgba(254, 79, 50, .03) 100%);
  border: 2px solid rgba(254, 79, 50, .2);
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}
.post-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
}
.post-highlight h4 {
  margin: 0 0 8px;
  color: var(--brand-primary);
  font-weight: 700;
}
.post-tip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: initial;
  padding: initial;
  margin: var(--spacing-xl) 0;
}
.post-tip h4 {
  margin: 0 0 .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* 12. FOOTER ELEMENTS (tags/share/author/related/sidebar widgets) */
.post-tags__list {
  gap: var(--spacing-sm);
}
.post-tag {
  transition: .3s;
};
.post-tag:hover {
  border-color: var(--color-primary);
}
.post-share {
  margin: 0 0 var(--spacing-xl);
}
.post-share__links {
  flex-wrap: wrap;
}
.post-share__link {
  transition: .3s;
};
.post-share__link:hover {
  transform: translateY(-2px);
}
.post-author {
  align-items: center;
};
.post-author__name {
  margin: 0 0 var(--spacing-xs);
}
.post-author__bio {
  margin: 0;
}
.post-related {
  margin: var(--spacing-md) 0;
}
.post-related__item {
  padding: .4rem 0;
}
.post-related__image {
  flex-shrink: 0;
};
.post-related__title {
  line-height: 1.3;
}
.post-related__title a {
  font-weight: 600;
}
.post-related__title a:hover {
  color: var(--color-primary);
}
.post-related__date {
  color: var(--color-text-light);
}
/* moved to global styles (assets/css/index.css): .post-widget, .post-widget--cta, .post-widget__title */

/* 13. UTILITIES & EFFECTS */
.invisible {
  display: none !important;
}
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 14. RESPONSIVE */
@media (max-width: 992px) {
  .blog-posts {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  .post-layout {
    gap: 32px;
  }
  .post-sidebar {
    order: 2;
  }
  .post-header {
    padding: 60px 0 40px;
  }
  .post-header__title {
    font-size: 40px;
  }
  .post-header__excerpt {
    font-size: 18px;
  }
  .post-article__content {
    font-size: 16px;
  }
  .post-article__content h2 {
    font-size: 28px;
  }
  .post-article__content h3 {
    font-size: 22px;
  }
  .post-author {
    text-align: center;
  }
  .blog-post-card {
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .blog-posts {
    gap: 1.5rem;
  }
  .blog-header {
    padding: 60px 0 40px;
  }
  .blog-header__title {
    font-size: 36px;
  }
  .blog-header__subtitle {
    font-size: 16px;
  }
  .blog-post-card {
    max-width: 100%;
  }
  .blog-post-card__content {
    padding: 20px;
  }
  .blog-post-card__title a {
    font-size: 18px;
  }
  .blog-post-card__excerpt {
    font-size: 14px;
  }
  .post-layout {
    padding: 0 1rem;
  }
  .post-header {
    padding: 40px 0 30px;
  }
  .post-header__title {
    line-height: 1.3;
  }
  .post-image__img {
    height: 250px;
  }
  .post-article__content {
    font-size: 15px;
  }
  .post-article__content h2 {
    font-size: 24px;
  }
  .post-article__content h3 {
    font-size: 20px;
  }
  .post-article__content figure img {
    border-radius: 6px;
  }
  .post-article__content .img-caption {
    font-size: 13px;
  }
}
@media (max-width:480px){
.blog-header {
  padding: 40px 0 30px;
}
.blog-header__title {
  font-size: 28px;
}
.blog-category {
  font-size: 12px;
}
.blog-post-card__content {
  padding: 16px;
}
.blog-post-card__category {
  left: 12px;
}
.post-header__title {
  font-size: 24px;
}
.post-article__content figure img {
  border-radius: 0px;
};
.post-image__img {
  height: 200px;
}
.post-article__content .img-caption {
  font-size: 12px;
}
.pagination {
  margin: 2rem 0;
}
.pagination-prev,.pagination-next {
  font-size: 1rem;
}
}

.blog-post-card__link:hover {
  color: var(--brand-primary);
  transform: translateX(4px);
}

.blog-post-card__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-primary);
  transition: width 0.3s ease;
}

.blog-post-card__link:hover::after {
  width: 100%;
}

/* Blog Tags */
.blog-tag {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
  padding: 6px 12px;
  border-radius: 0px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-weight: 600;
  text-transform: capitalize;
}

.blog-tag:hover {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  color: white;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 79, 50, 0.3);
}

/* Blog Sidebar */
.blog-widget {
  padding: 24px;
  margin-bottom: 24px;
}

.blog-widget__title {
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: 'Manrope', sans-serif;
  position: relative;
  padding-bottom: 12px;
}

.blog-widget__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  border-radius: 0px;
}

/* Search Widget */
.blog-search {
  display: flex;
  gap: var(--spacing-xs);
}

.blog-search__input {
  flex: 1;
  padding: var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: initial;
  font-size: initial;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.blog-search__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.blog-search__input::placeholder {
  color: var(--color-text-light);
}

.blog-search__button {
  padding: var(--spacing-sm);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: initial;
  cursor: pointer;
  transition: background-color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
}

.blog-search__button:hover {
  background: var(--color-primary-dark);
}

.blog-search__button svg {
  width: 16px;
  height: 16px;
}

/* Categories Widget */
.blog-categories {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-category {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 0px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 14px;
}

.blog-category:hover {
  background: rgb(57 254 50 / 8%);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(57 254 50 / 8%);
}

.blog-category__input {
  margin-right: 8px;
  accent-color: var(--brand-primary);
  width: 16px;
  height: 16px;
}

.blog-category__label {
  color: #374151;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-right: 6px;
}

.blog-category:hover .blog-category__label {
  color: var(--brand-primary);
}

.blog-category__count {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  background: rgba(254, 79, 50, 0.1);
  padding: 2px 6px;
  border-radius: 0px;
  transition: all 0.3s ease;
}

.blog-category:hover .blog-category__count {
  background: var(--brand-primary);
  color: white;
}

/* Active/Checked state for categories */
.blog-category:has(.blog-category__input:checked),
.blog-category__input:checked + .blog-category__label + .blog-category__count {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

.blog-category:has(.blog-category__input:checked) .blog-category__label {
  color: white;
}

.blog-category:has(.blog-category__input:checked) .blog-category__count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Fallback for browsers that don't support :has() */
.blog-category.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

.blog-category.active .blog-category__label {
  color: white;
}

.blog-category.active .blog-category__count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Tags Widget */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

/* Recent Posts Widget */
.blog-recent {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.blog-recent__item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  border-radius: initial;
  transition: background-color initial;
}

.blog-recent__item:hover {
  background: var(--color-surface);
}

.blog-recent__image {
  width: 60px;
  height: 45px;
  border-radius: initial;
  object-fit: cover;
  flex-shrink: 0;
}

.blog-recent__content {
  flex: 1;
  min-width: 0;
}

.blog-recent__title {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.blog-recent__title a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.blog-recent__title a:hover {
  color: var(--color-primary);
}

.blog-recent__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

/* Tag Filter Styles */
.blog-tag-filter {
  margin: 0 0 2rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0px;
  border-left: 4px solid initial;
}

.blog-tag-filter h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag-name {
  background: var(--color-primary, var(--brand-primary));
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 0px;
  font-size: 0.9rem;
  font-weight: 500;
}

.tag-clear {
  background: #dc3545;
  color: #fff;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  margin-left: auto;
  transition: all 0.2s ease;
}

.tag-clear:hover {
  background: #c82333;
  transform: scale(1.1);
}


/* Pagination */

/* Pagination Styles */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0 2rem;
  font-size: 1.1rem;
}

.pagination-prev,
.pagination-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  background: var(--color-primary, var(--brand-primary));
  color: #fff;
  text-decoration: none;
  border-radius: 0px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--color-primary, var(--brand-primary));
}

.pagination-prev:hover,
.pagination-next:hover {
  background: #e8442a;
  border-color: #e8442a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 79, 50, 0.3);
}

.pagination-prev:not([href]),
.pagination-next:not([href]) {
  background: #e9ecef;
  color: #6c757d;
  border-color: #e9ecef;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination-prev:not([href]):hover,
.pagination-next:not([href]):hover {
  background: #e9ecef;
  border-color: #e9ecef;
  transform: none;
  box-shadow: none;
}



/* .blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xxl);
}

.blog-pagination__button {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-background);
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: initial;
  font-size: initial;
  font-weight: 500;
  transition: all var(--transition);
}

.blog-pagination__button:hover:not(.blog-pagination__button--disabled) {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.blog-pagination__button--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.blog-pagination__button svg {
  width: 16px;
  height: 16px;
}

.blog-pagination__numbers {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.blog-pagination__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-background);
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: initial;
  font-size: initial;
  font-weight: 500;
  transition: all var(--transition);
}

.blog-pagination__number:hover,
.blog-pagination__number--active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.blog-pagination__dots {
  color: var(--color-text-light);
  font-weight: 500;
  padding: 0 var(--spacing-xs);
} */

/* ============================================================================
   POST PAGE STYLES
   ============================================================================ */


.invisible {
  display: none !important;
}

/* Post Header */
.post-header {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
  padding: 25px 0 45px 0;
  position: relative;
  overflow: hidden;
}


.post-header__content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 15px 0px;
  font-size: 14px;
  flex-wrap: wrap;
}

.post-header__category {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ffffff 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
}

.post-header__date,
.post-header__read-time {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1833014;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.post-header__title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 24px;
  line-height: 1.1;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-header__excerpt {
  font-size: 20px;
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
  font-weight: 500;
}

/* Post Featured Image */
.post-image {
  margin-bottom: 48px;
  padding: 0 24px;
}

.post-image__figure {
  margin: 40px auto 16px auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0px;
  background: #f8fafc;
}

.post-image__img {
  width: 100%;
  max-width: 1000px;
  height: 400px; /* Фиксированная высота для широкоформатности */
  object-fit: cover; /* Обрезка с сохранением пропорций */
  object-position: center; /* Центрирование изображения */
  border-radius: 0px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-image__img:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15), 0 15px 15px -5px rgba(0, 0, 0, 0.06);
}

.post-image__caption {
  margin-top: 16px;
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
  font-weight: 500;
}

/* Post Layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.post-main {
  min-width: 0;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.post-navigation {
  position: sticky;
  top: 120px;
}

.post-sidebar {
  position: sticky;
  top: 120px;
  /* Debug: add border to verify styles are applied */
  /* border: 2px solid red; */
}

/* Post Article Content */
.post-article__content {
  max-width: none;
  font-size: 18px;
  line-height: 1.8;
  color: #374151;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.post-article__content h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin: 48px 0 24px 0;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
}

.post-article__content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  border-radius: 2px;
}

.post-article__content h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 32px 0 16px 0;
  line-height: 1.4;
}

.post-article__content h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 24px 0 12px 0;
}

.post-article__content p {
  margin-bottom: 24px;
  text-align: left;
}

.post-article__content ul,
.post-article__content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.post-article__content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.post-article__content strong {
  font-weight: 600;
  color: #1f2937;
}

.post-article__content a {
  color: var(--brand-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 600;
}

.post-article__content a:hover {
  border-bottom-color: var(--brand-primary);
  color: #e23e1d;
}

/* Image blocks in post content */
.post-article__content figure {
  margin: 32px 0;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.post-article__content figure img {
  width: 100%;
  max-width: 100%;
  object-fit: cover; /* Обрезка с сохранением пропорций */
  object-position: center; /* Центрирование изображения */
  border-radius: 0px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-article__content figure img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.post-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 0px;
}

/* Для больших изображений - более высокие */
.post-article__content figure.large img {
  height: 400px;
}

/* Для квадратных изображений - меньше высота */
.post-article__content figure.square img {
  height: 250px;
}

.post-article__content .img-caption {
  margin-top: 12px;
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

/* Post Quote */
.post-quote {
  background: linear-gradient(135deg, rgba(254, 79, 50, 0.05) 0%, rgba(254, 79, 50, 0.02) 100%);
  border-left: 6px solid var(--brand-primary);
  padding: 32px;
  margin: 48px 0;
  border-radius: 0px;
  font-size: 20px;
  font-style: italic;
  color: #374151;
  position: relative;
  box-shadow: 0 4px 12px rgba(254, 79, 50, 0.1);
}

.post-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--brand-primary);
  position: absolute;
  top: -10px;
  left: 32px;
  line-height: 1;
  font-family: serif;
  opacity: 0.7;
}

/* Post Highlight Box */
.post-highlight {
  background: linear-gradient(135deg, rgba(254, 79, 50, 0.08) 0%, rgba(254, 79, 50, 0.03) 100%);
  border: 2px solid rgba(254, 79, 50, 0.2);
  border-radius: 0px;
  padding: 24px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.post-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
}

.post-highlight h4 {
  margin-top: 0;
  color: var(--brand-primary);
  font-weight: 700;
}

.post-highlight ul {
  margin-bottom: 0;
}

/* Post Tip Box */
.post-tip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: initial;
  padding: initial;
  margin: var(--spacing-xl) 0;
  position: relative;
}

.post-tip h4 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text);
}

.post-tip p {
  margin-bottom: 0;
}

/* Post Figure */
.post-figure {
  margin: var(--spacing-xxl) 0;
  text-align: center;
}

.post-figure__img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: initial;
  box-shadow: initial;
}

.post-figure__caption {
  margin-top: var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-style: italic;
}

/* Post Footer */
.post-footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-xxl);
  margin-top: var(--spacing-xxl);
}

.post-tags {
  margin-bottom: var(--spacing-xl);
}

.post-tags__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--spacing-md) 0;
}

.post-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.post-tag {
  background: var(--color-surface);
  color: var(--color-text-light);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: initial;
  font-size: initial;
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  font-weight: 500;
}

.post-tag:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Post Share */
.post-share {
  margin-bottom: var(--spacing-xl);
}

.post-share__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--spacing-md) 0;
}

.post-share__links {
  display: flex;
  gap: var(--spacing-sm);
}

.post-share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-surface);
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
  border-radius: initial;
  text-decoration: none;
  transition: all var(--transition);
}

.post-share__link:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.post-share__link svg {
  width: 20px;
  height: 20px;
}

/* Post Author */
.post-author {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: initial;
  padding: initial;
  margin: var(--spacing-xxl) 0;
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.post-author__avatar {
  flex-shrink: 0;
}

.post-author__image {
  width: 80px;
  height: 80px;
  border-radius: 0px;
  object-fit: cover;
  border: 3px solid var(--color-primary-light);
}

.post-author__info {
  flex: 1;
}

.post-author__name {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--spacing-xs) 0;
}

.post-author__title {
  color: var(--color-primary);
  font-weight: 500;
  margin: 0 0 var(--spacing-sm) 0;
  font-size: var(--font-size-sm);
}

.post-author__bio {
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0 0 var(--spacing-md) 0;
}

.post-author__social {
  display: flex;
  gap: var(--spacing-sm);
}

.post-author__link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: color var(--transition);
}

.post-author__link:hover {
  color: var(--color-primary-dark);
}

/* Related Posts */
.post-related {
  margin: var(--spacing-md) 0;
}

.post-related__title {
  font-family: var(--font-heading);
    font-size: var(--font-size-md);
    font-weight: 400;
    color: var(--color-text);
    /* margin: 0 0 var(--spacing-sm) 0; */
    text-align: left;
}

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.related-post {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: initial;
  overflow: hidden;
  transition: all var(--transition);
}

.related-post:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.related-post__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.related-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.related-post__content {
  padding: var(--spacing-lg);
}

.related-post__category {
  background: var(--color-primary);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: initial;
  font-size: initial;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: var(--spacing-sm);
}

.related-post__title {
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.4;
}

.related-post__title a {
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: var(--font-size-md);
  font-weight: 600;
  transition: color var(--transition);
}

.related-post__title a:hover {
  color: var(--color-primary);
}

.related-post__excerpt {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
}

.related-post__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

/* Post Navigation Widgets */
.post-widget {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.post-widget:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.post-widget--cta {
  background: linear-gradient(135deg, rgb(67 210 116 / 8%) 0%, rgb(109 160 95 / 3%) 100%);
  border-color: rgb(161 209 139 / 20%);
  text-align: center;
}
.post-widget__title {
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px 0;
  font-family: 'Manrope', sans-serif;
  position: relative;
  padding-bottom: 12px;
}

.post-widget__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  border-radius: 2px;
}

.post-widget__text {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 15px;
}

.post-widget__button {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 0px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-widget__button:hover {
  background: linear-gradient(135deg, #e23e1d 0%, #e23e1d 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 79, 50, 0.4);
}

/* Table of Contents */
.post-toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-toc__link {
  color: #6b7280;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 0px;
  font-size: 14px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-weight: 500;
}

.post-toc__link:hover,
.post-toc__link--active {
  color: var(--brand-primary);
  background: rgba(254, 79, 50, 0.08);
  border-left-color: var(--brand-primary);
  transform: translateX(4px);
}

.post-toc__link--sub {
  margin-left: 16px;
  font-size: 13px;
  opacity: 0.8;
}

/* Widget Tags */
.post-widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-widget-tag {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
  padding: 6px 12px;
  border-radius: 0px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-weight: 600;
  text-transform: capitalize;
}

.post-widget-tag:hover {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%);
  color: white;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 79, 50, 0.3);
}

/* Widget Recent Posts */
.post-widget-recent {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.widget-recent-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  border-radius: initial;
  transition: background-color initial;
}

.widget-recent-item:hover {
  background: var(--color-surface);
}

.widget-recent-item__image {
  width: 50px;
  height: 38px;
  border-radius: initial;
  object-fit: cover;
  flex-shrink: 0;
}

.widget-recent-item__content {
  flex: 1;
  min-width: 0;
}

.widget-recent-item__title {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: var(--font-size-xs);
  line-height: 1.3;
}

.widget-recent-item__title a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.widget-recent-item__title a:hover {
  color: var(--color-primary);
}

.widget-recent-item__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

/* ============================================================================
   RESPONSIVE DESIGN FOR BLOG PAGES
   ============================================================================ */

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

@media (max-width: 992px) {
  .blog-layout,
  .post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .blog-filters,
  .post-navigation {
    order: -1;
  }

  .post-sidebar {
    order: 2;  /* Sidebar after main content on tablets */
  }

  .post-header {
    padding: 60px 0 40px 0;
  }

  .post-header__title {
    font-size: 40px;
  }

  .post-header__excerpt {
    font-size: 18px;
  }

  .post-article__content {
    font-size: 16px;
  }

  .post-article__content h2 {
    font-size: 28px;
  }

  .post-article__content h3 {
    font-size: 22px;
  }
  
  .post-navigation {
    position: static;
    order: -1;
  }
}

@media (max-width: 992px) {
  .blog-header__title,
  .post-header__title {
    font-size: var(--font-size-xxl);
  }

  .blog-controls {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;
  }

  .blog-posts {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .post-author {
    flex-direction: column;
    text-align: center;
  }

  .post-related__grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

  .blog-header {
    padding: 60px 0 40px 0;
  }

  .blog-header__title {
    font-size: 36px;
  }

  .blog-header__subtitle {
    font-size: 16px;
  }

  .blog-post-card__content {
    padding: 20px;
  }

  .blog-post-card__title a {
    font-size: 18px;
  }

  .blog-post-card__excerpt {
    font-size: 14px;
  }

  .blog-categories {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .blog-category {
    padding: 6px 10px;
    font-size: 13px;
  }

  .blog-widget {
    padding: 20px;
    margin-bottom: 20px;
  }

  .breadcrumb {
    font-size: 13px;
    padding: 6px 12px;
  }

  .blog-pagination__numbers {
    display: none;
  }

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

  .post-article__content {
    font-size: 15px;
  }

  .post-article__content h2 {
    font-size: 24px;
  }

  .post-article__content h3 {
    font-size: 20px;
  }

  .post-navigation {
    position: static;
    width: 100%;
    order: 2;  /* Move sidebar after main content */
    margin-top: 2rem;
  }

  .post-sidebar {
    order: 2;  /* Move sidebar after main content */
    margin-top: 2rem;
  }

  .post-layout {
    padding: 0 1rem;
  }

  .post-header {
    padding: 40px 0 30px 0;
  }

  .post-header__title {
    font-size: 28px;
    line-height: 1.3;
  }

  .post-author {
    gap: 0.75rem;
  }

  .post-author__avatar {
    width: 40px;
    height: 40px;
  }

  .post-meta {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .post-share {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: initial;
  }

  .post-toc {
    position: static;
    background: var(--background-light);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: initial;
  }
  .pagination {
    gap: 0.75rem;
    margin: 2rem 0;
  }
  .pagination-prev,
  .pagination-next {
    min-width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  /* Мобильная оптимизация порядка элементов */
  .post-layout {
    display: flex;
    flex-direction: column;
  }

  .post-main {
    order: 1;  /* Main content first */
  }

  .post-navigation {
    order: 2;  /* Sidebar second */
    display: flex;
    flex-direction: column;
  }

  .post-sidebar {
    order: 2;  /* Sidebar second */
    display: flex;
    flex-direction: column;
  }

  /* Скрыть "Последние статьи" на мобильных */
  .post-widget--recent {
    display: none !important;
  }

  /* Переместить теги и консультацию в конец */
  .post-widget--tags {
    order: 10;
    margin-top: 2rem;
  }

  .post-widget--cta {
    order: 11;
    margin-top: 1rem;
  }

  /* Mobile image optimization */
  .post-image__img {
    height: 250px; /* Меньше на мобильных */
    border-radius: 0px;
  }
  
  .post-article__content figure img {
    height: 200px; /* Меньше на мобильных */
    border-radius: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .post-article__content .img-caption {
    font-size: 13px;
    margin-top: 8px;
  }

  /* Оглавление перемещается в сайдбар */
  .post-widget:first-child {
    order: 1;  /* First widget in sidebar */
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .blog-header {
    padding: 40px 0 30px 0;
  }

  .blog-header__title {
    font-size: 28px;
  }

  .blog-controls {
    gap: 1rem;
  }

  .blog-search {
    order: -1;
  }

  .blog-categories {
    gap: 4px;
  }

  .blog-category {
    padding: 4px 8px;
    font-size: 12px;
  }

  .post-header__title {
    font-size: 24px;
  }

  .post-meta {
    font-size: 13px;
  }

  .post-tags {
    gap: 4px;
  }

  .post-tag {
    padding: 4px 8px;
    font-size: 11px;
  }

  /* Мобильная оптимизация для очень маленьких экранов */
  .post-navigation {
    margin-top: 0;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
  }

  /* Скрыть "Последние статьи" на маленьких экранах тоже */
  .post-widget--recent {
    display: none !important;
  }

  /* Компактные теги на маленьких экранах */
  .post-widget--tags {
    order: 8;
    margin-top: 1.5rem;
  }

  .post-widget--cta {
    order: 9;
    margin-top: 1rem;
  }

  .post-widget {
    padding: 12px;
    margin-bottom: 12px;
  }

  .post-widget__title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .post-widget {
    padding: 15px;
    margin-bottom: 15px;
  }

  .post-widget__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .post-related__item {
    padding: 12px;
  }

  .post-related__title {
    font-size: 14px;
    line-height: 1.4;
  }

  .post-navigation__item {
    padding: 12px;
  }

  .post-navigation__title {
    font-size: 14px;
  }

  /* Mobile sidebar optimization */
  .post-sidebar {
    order: 2;
    margin-top: 1.5rem;
  }

  /* Extra small screen image optimization */
  .post-article__content {
    overflow-x: hidden; /* Extra safety for very small screens */
  }

  .post-article__content figure {
    margin: 20px 0;
  }

  .post-article__content figure img {
    height: 180px; /* Еще меньше для очень маленьких экранов */
    border-radius: 0px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  }
  
  .post-image__img {
    height: 200px; /* Главное изображение тоже меньше */
  }

  .post-article__content .img-caption {
    font-size: 12px;
    margin-top: 6px;
  }
}

/* Дополнительные интерактивные элементы */
.post-article__content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, rgba(254, 79, 50, 0.05) 0%, rgba(254, 79, 50, 0.02) 100%);
  border-radius: 0px;
  font-style: italic;
  position: relative;
}

.post-article__content blockquote::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary);
  position: absolute;
  top: -10px;
  left: 15px;
  font-family: Georgia, serif;
  opacity: 0.3;
}

.post-article__content code {
  background: rgba(254, 79, 50, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--primary);
}

.post-article__content pre {
  background: var(--background-dark);
  padding: 1.5rem;
  border-radius: initial;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 4px solid var(--primary);
}

.post-article__content pre code {
  background: none;
  padding: 0;
  color: #fff;
}

.post-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  border-radius: initial;
  overflow: hidden;
}

.post-article__content table th,
.post-article__content table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.post-article__content table th {
  background: linear-gradient(135deg, var(--primary) 0%, rgba(254, 79, 50, 0.8) 100%);
  color: white;
  font-weight: 600;
}

.post-article__content table tbody tr:hover {
  background: rgba(254, 79, 50, 0.05);
  transition: var(--transition);
}

/* Улучшенная навигация по постам */
.post-navigation__prev,
.post-navigation__next {
  position: relative;
  overflow: hidden;
}

.post-navigation__prev::before,
.post-navigation__next::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition);
}

.post-navigation__prev:hover::before,
.post-navigation__next:hover::before {
  left: 100%;
}

/* Анимация для кнопок социальных сетей */
.post-share__button {
  position: relative;
  overflow: hidden;
}

.post-share__button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 0px;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.post-share__button:hover::after {
  width: 300px;
  height: 300px;
}

@media (max-width: 480px) {
  .blog-widget {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 0px;
  }

  .blog-post-card {
    border-radius: 12px;
  }

  .blog-post-card__content {
    padding: 16px;
  }

  .blog-post-card__category {
    padding: 6px 10px;
    font-size: 11px;
    top: 12px;
    left: 12px;
  }

  .blog-header__title {
    font-size: 28px;
  }

  .blog-header__subtitle {
    font-size: 15px;
  }

  .blog-tag {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 0px;
  }

  .blog-category {
    padding: 6px 8px;
    font-size: 12px;
  }

  .blog-category__label {
    font-size: 12px;
  }

  .blog-category__count {
    font-size: 10px;
    padding: 2px 4px;
  }

  .breadcrumb {
    font-size: 12px;
    padding: 6px 10px;
    margin-bottom: 20px;
  }

  .blog-posts {
    gap: 1rem;
  }

  .post-share__links {
    flex-wrap: wrap;
  }

  .blog-pagination {
    gap: 8px;
  }

  .blog-pagination__button {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================================================
   СОВРЕМЕННЫЕ ЭФФЕКТЫ И УЛУЧШЕНИЯ
   ============================================================================ */

/* Эффект загрузки изображений */
.blog-post-card__image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  z-index: 1;
}

.blog-post-card__image img {
  position: relative;
  z-index: 2;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Улучшенная типографика */
.blog-post-card__excerpt::first-line {
  font-weight: 500;
}

/* Эффект фокуса для доступности */
.blog-category:focus-within,
.blog-tag:focus,
.blog-post-card__link:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Анимация появления карточек */
.blog-post-card {
  animation: fadeInUp 0.6s ease forwards;
}

.blog-post-card:nth-child(1) { animation-delay: 0.1s; }
.blog-post-card:nth-child(2) { animation-delay: 0.2s; }
.blog-post-card:nth-child(3) { animation-delay: 0.3s; }
.blog-post-card:nth-child(4) { animation-delay: 0.4s; }
.blog-post-card:nth-child(5) { animation-delay: 0.5s; }
.blog-post-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Улучшенный hover эффект для категорий */
.blog-post-card__category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* Стилизация scrollbar для webkit браузеров */
.blog-filters::-webkit-scrollbar {
  width: 8px;
}

.blog-filters::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.blog-filters::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, initial 0%, #ff6b47 100%);
  border-radius: 0px;
}

.blog-filters::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #e23e1d 0%, #e23e1d 100%);
}

/* ============================================================================
   LINK VISIBILITY IMPROVEMENTS
   ============================================================================ */

/* Обеспечиваем видимость всех ссылок на белом фоне */
.blog-pagination__number:hover,
.blog-pagination__number--active {
  background: var(--brand-primary) !important;
  background: var(--color-primary) !important;
  color: white !important;
  border-color: var(--brand-primary) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 8px rgba(254, 79, 50, 0.3);
}

.post-tag:hover {
  background: var(--brand-primary) !important;
  background: linear-gradient(135deg, var(--color-primary) 0%, #ff6b47 100%) !important;
  color: white !important;
  border-color: var(--brand-primary) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 8px rgba(254, 79, 50, 0.3);
  transform: translateY(-1px);
}

.blog-tag:hover {
  background: var(--brand-primary) !important;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ff6b47 100%) !important;
  color: white !important;
  border-color: var(--brand-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 79, 50, 0.3);
}

/* Улучшаем видимость ссылок в виджетах */
.post-widget-tag:hover {
  background: var(--brand-primary) !important;
  background: linear-gradient(135deg, var(--color-primary) 0%, #ff6b47 100%) !important;
  color: white !important;
  border-color: var(--brand-primary) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 8px rgba(254, 79, 50, 0.3);
}

/* Убеждаемся, что базовые стили ссылок не конфликтуют */
.blog-pagination a,
.post-tags a,
.blog-tags a,
.post-widget a {
  color: inherit;
  text-decoration: none;
}

.blog-pagination a:hover,
.post-tags a:hover,
.blog-tags a:hover,
.post-widget a:hover {
  color: inherit;
  text-decoration: none;
}

/* Стили для тегов */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.tag-list__item {
  background: #f3f4f6;
  color: #374151;
  padding: 4px 12px;
  border-radius: 0px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
  transition: all 0.2s ease;
}

.tag-list__item:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Улучшенные стили для макетов */
.post-content__layout {
  margin-top: 2rem;
}

/* Стили для layouts snippet */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter, 1.5rem);
}

.column {
  grid-column: span var(--columns, 12);
}

.margin-xl {
  margin: 2rem 0;
}

.text {
  line-height: 1.6;
}

/* Блоки внутри layout */
.text .blocks {
  margin: 0;
}

.text .block {
  margin-bottom: 1.5rem;
}

.text .block:last-child {
  margin-bottom: 0;
}

/* Стили для блоков внутри layout */
.text .block-heading h1,
.text .block-heading h2,
.text .block-heading h3,
.text .block-heading h4,
.text .block-heading h5,
.text .block-heading h6 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.text .block-text p {
  margin-bottom: 1rem;
}

.text .block-image {
  margin: 1.5rem 0;
}

.text .block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0px;
}

/* Стили для изображений в блоках - ограничение размера */
.post-content__text figure,
.post-content__layout figure,
.text figure {
  max-width: 100%;
  margin: 1.5rem 0;
  overflow: hidden;
}

.post-content__text figure img,
.post-content__layout figure img,
.text figure img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0px;
  display: block;
}

.post-content__text img,
.post-content__layout img,
.text img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0px;
}

/* Ограничение высоты для больших изображений */
.post-content__text figure img,
.post-content__layout figure img {
  max-height: 400px;
}

.text figure img {
  max-height: 350px;
}

/* На мобильных устройствах ещё меньше */
@media (max-width: 768px) {
  .post-content__text figure img,
  .post-content__layout figure img {
    max-height: 250px;
  }
  
  .text figure img {
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  .column {
    grid-column: span 12;
  }
}
