/* Critical Banner Styles to prevent FOUT - Must be at the top for highest priority */
body.blog .banner-image {
  height: 45px !important;
  width: auto !important;
  max-width: 350px !important;
  min-width: 0 !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 1 !important;
}

@media (max-width: 768px) {
  body.blog .banner-image {
    height: 25px !important;
    max-width: 120px !important;
  }
}

/* Blog Header Styles - Override main styles with better specificity */
body.blog .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

body.blog .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
}

body.blog .nav-logo h2 {
  color: #667eea;
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
}

body.blog .logo-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

body.blog .logo-link:hover {
  opacity: 0.8;
}

body.blog .nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

body.blog .nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
}

body.blog .nav-menu a:hover {
  color: #667eea;
}

body.blog .nav-menu a.active {
  color: #667eea;
}

body.blog .has-dropdown {
  position: relative;
}

/* Dropdown styles inherited from main CSS */

body.blog .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 20px;
}

body.blog .btn-envelope {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

body.blog .btn-envelope:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

body.blog .btn-envelope svg {
  width: 20px;
  height: 20px;
}

body.blog .mobile-menu-toggle {
  display: none; /* Сховано на десктопі */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

body.blog .mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

body.blog .mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

body.blog .mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

body.blog .mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}



/* Blog Styles */
body.blog .blog-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

body.blog .blog-hero-content {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

body.blog .blog-hero-category {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid #bbdefb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.blog .blog-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 20px;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  padding: 1rem 2rem;
  border-radius: 15px;
  display: inline-block;
}

body.blog .blog-hero-meta {
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

body.blog .blog-hero-description {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  margin: 0 0.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-weight: 500;
  font-size: 1.25rem;
  display: inline-block;
}

/* Blog Categories */
body.blog .blog-categories {
  padding: 40px 0;
  background: #f8f9fa;
}

body.blog .categories-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

body.blog .category-btn {
  padding: 12px 24px;
  border: 2px solid #667eea;
  background: transparent;
  color: #667eea;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

body.blog .category-btn:hover,
body.blog .category-btn.active {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

/* Blog Articles */
body.blog .blog-articles {
  padding: 60px 0;
}

body.blog .articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

body.blog .article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

body.blog .article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body.blog .article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

body.blog .article-content {
  padding: 25px;
}

body.blog .article-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #6c757d;
}

body.blog .article-category {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

body.blog .article-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #1a1a1a;
  line-height: 1.3;
}

body.blog .article-excerpt {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 20px;
}

body.blog .article-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

body.blog .article-link:hover {
  color: #5a6fd8;
}

body.blog .article-link svg {
  width: 16px;
  height: 16px;
}

/* Article Card Link - Making entire card clickable */
body.blog .article-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

body.blog .article-card-link:hover {
  text-decoration: none;
  color: inherit;
}

body.blog .article-card-link:hover .article-card {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body.blog .article-card-link:hover .article-link {
  color: #5a6fd8;
}

/* Load More Button */
body.blog .load-more-wrapper {
  text-align: center;
}

body.blog .load-more-btn {
  padding: 15px 40px;
  font-size: 1.1rem;
}



/* Responsive Design */
@media (max-width: 768px) {
  /* Мобільні стилі для навігації */
  body.blog .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e9ecef;
    z-index: 1001;
  }

  body.blog .nav-menu.active {
    display: flex;
  }


  


  body.blog .nav-menu li {
    margin: 0.5rem 0;
  }

  body.blog .nav-menu a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
    display: block;
    width: 100%;
  }

  /* Мобільні стилі для dropdown успадковуються з основного CSS */

  body.blog .mobile-menu-toggle {
    display: flex;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
  }

  body.blog .header-actions {
    margin-right: 75px !important;
    margin-left: 5px !important;
    flex-shrink: 0 !important;
    gap: 0.25rem !important;
  }

  body.blog .btn-envelope {
    width: auto;
    height: auto;
    padding: 10px 16px;
    font-size: 0.85rem;
    margin-right: 10px;
  }

  body.blog .btn-envelope svg {
    width: 16px;
    height: 16px;
  }

  body.blog .nav-container {
    position: relative !important;
    padding-right: 10px !important;
    padding-left: 15px !important;
  }
  
  body.blog .nav-logo {
    padding-left: 0 !important;
    margin-right: 5px !important;
    flex-shrink: 0 !important;
  }
  
  body.blog .logo-image {
    height: 60px !important;
  }
  
  body.blog .header-banner {
    margin-right: 8px !important;
    flex-shrink: 1 !important;
  }
  
  body.blog .banner-image {
    height: 35px !important;
    max-width: 150px !important;
  }

  body.blog .nav-menu.active {
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .blog-hero {
    padding: 60px 0;
    margin-bottom: 1rem;
  }
  
  .blog-hero-title {
    font-size: 1.8rem;
    padding: 0.8rem 1.5rem;
    margin-bottom: 0.8rem;
  }
  
  .blog-hero-category {
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
  }
  
  .blog-hero-description {
    padding: 0.3rem 0.6rem;
    margin: 0 0.3rem;
    font-size: 0.85rem;
  }
  
  .categories-wrapper {
    gap: 10px;
  }
  
  .category-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  

}

@media (max-width: 480px) {
  .blog-hero {
    padding: 40px 0;
  }
  
  .blog-hero-title {
    font-size: 1.5rem;
    padding: 0.6rem 1rem;
  }
  
  .blog-hero-category {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .blog-hero-description {
    padding: 0.25rem 0.5rem;
    margin: 0 0.2rem;
    font-size: 0.8rem;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .article-title {
    font-size: 1.2rem;
  }
  
  body.blog .header-actions {
    margin-right: 50px !important;
    margin-left: 5px !important;
    flex-shrink: 0 !important;
    gap: 0.25rem !important;
  }
  
  body.blog .mobile-menu-toggle {
    right: 10px !important;
  }
  
  body.blog .banner-image {
    height: 25px !important;
    max-width: 120px !important;
  }
  
  body.blog .btn-envelope {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
  }
}

/* Main content spacing for blog */
body.blog #main-content {
  padding-top: 80px; /* Space for fixed header */
}

/* Breadcrumbs for Blog */
body.blog .breadcrumbs {
  background: #f8f9fa;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
  margin-top: 0; /* No top margin needed since main has padding-top */
}

.breadcrumbs-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.breadcrumbs-item {
  display: flex;
  align-items: center;
}

.breadcrumbs-item:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: #6c757d;
  font-weight: 300;
}

.breadcrumbs-link {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.breadcrumbs-link:hover {
  color: #667eea;
  background: #e3f2fd;
}

.breadcrumbs-current {
  color: #1a1a1a;
  font-weight: 500;
  padding: 4px 8px;
  background: #e3f2fd;
  border-radius: 4px;
}

/* Responsive breadcrumbs */
@media (max-width: 768px) {
  body.blog #main-content {
    padding-top: 70px; /* Slightly less space on mobile */
  }
  
  .breadcrumbs {
    padding: 10px 0;
  }
  
  .breadcrumbs-list {
    font-size: 0.8rem;
    gap: 6px;
  }
  
  .breadcrumbs-item:not(:last-child)::after {
    margin-left: 6px;
  }
  
  .article-header {
    padding: 30px 0 60px 0; /* Reduced padding on mobile */
  }
}

@media (max-width: 480px) {
  body.blog #main-content {
    padding-top: 60px; /* Even less space on small mobile */
  }
  
  .article-header {
    padding: 20px 0 60px 0; /* Further reduced padding on small mobile */
  }
  
  body.blog .header-actions {
    margin-right: 50px !important;
    margin-left: 5px !important;
    flex-shrink: 0 !important;
    gap: 0.25rem !important;
  }
  
  body.blog .mobile-menu-toggle {
    right: 10px !important;
  }
  
  body.blog .banner-image {
    height: 25px !important;
    max-width: 120px !important;
  }
}

/* Article Page Specific Styles */
.article-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0 80px 0; /* Reduced top padding since main has padding-top */
  text-align: center;
  margin-top: 0px; /* Removed margin for fixed header */
}

.article-header-content {
  max-width: 1000px;
  margin: 0 auto;
}

.article-header .article-category {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid #bbdefb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-header-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 20px;
  color: white;
}

.article-header-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.article-content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 15px;
}

.article-content-wrapper h2 {
  color: #1a1a1a;
  margin: 40px 0 20px 0;
  font-size: 1.8rem;
}

.article-content-wrapper h3 {
  color: #1a1a1a;
  margin: 30px 0 15px 0;
  font-size: 1.4rem;
}

.article-content-wrapper p {
  margin-bottom: 20px;
  line-height: 1.7;
  color: #333;
}

.article-content-wrapper ul,
.article-content-wrapper ol {
  margin: 20px 0;
  padding-left: 30px;
}

.article-content-wrapper li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.article-content-wrapper blockquote {
  border-left: 4px solid #667eea;
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: #6c757d;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 0 8px 8px 0;
}

.article-content-wrapper code {
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.article-content-wrapper pre {
  background: #f1f3f4;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-content-wrapper pre code {
  background: none;
  padding: 0;
}

/* Related Articles */
.related-articles {
  background: #f8f9fa;
  padding: 60px 0;
}

.related-articles h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #1a1a1a;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Back to Blog Button */
.back-to-blog-section {
  margin: 13px 0 20px 0; /* Reduced top margin by 3 times (from 40px to 13px) */
}

.back-to-blog {
  text-align: left; /* Changed from center to left to align with paragraph text */
  margin: 0; /* Remove default margins */
}

.back-to-blog .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.back-to-blog svg {
  width: 18px;
  height: 18px;
}

/* Article Tags */
.article-tags {
  margin: 40px 0;
  padding: 20px 0;
  border-top: 1px solid #e9ecef;
}

.article-tags h3 {
  margin-bottom: 15px;
  color: #1a1a1a;
  font-size: 1.2rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #bbdefb;
  transition: all 0.3s ease;
}

.tag:hover {
  background: #1976d2;
  color: white;
  transform: translateY(-2px);
}

/* Article CTA */
.article-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  margin-top: 60px;
}

/* In-content course-specific CTA: compact height and full-bleed width */
.article-content .article-cta.secondary {
  padding: 12px 0; /* slight vertical space */
  width: auto; /* align with text width */
  margin-left: 0;
  margin-right: 0;
  margin-top: 20px; /* compact spacing above */
  margin-bottom: 20px; /* compact spacing below */
}

/* Constrain inner container to article width */
.article-content .article-cta.secondary .container {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

.article-content .article-cta.secondary .cta-content {
  padding: 0; /* no extra padding in content wrapper */
}

.article-content .article-cta.secondary h2 {
  font-size: 1.2rem; /* compact heading */
  margin: 4px 0; /* tighter spacing */
  line-height: 1.2;
}

.article-content .article-cta.secondary p {
  font-size: 0.95rem;
  margin: 4px 0 8px; /* reduce vertical space */
}

.article-content .article-cta.secondary .btn-large {
  padding: 10px 20px;
  font-size: 1rem;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: white;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
}

/* In-article TOC (Зміст) */
.article-content nav[aria-label="Зміст"] {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #667eea;
  padding: 16px 18px;
  border-radius: 10px;
  margin: 20px 0 24px 0;
}

.article-content nav[aria-label="Зміст"] ol {
  margin: 0;
  padding-left: 18px;
}

.article-content nav[aria-label="Зміст"] a {
  color: #4f46e5;
  text-decoration: none;
}

.article-content nav[aria-label="Зміст"] a:hover {
  text-decoration: underline;
}

/* Table captions for better readability */
.article-content table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  padding: 6px 0 8px 0;
}

/* Article Images and Header Background */
.article-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.article-header {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 4rem 0;
  position: relative;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.article-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.article-header-title {
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  padding: 1rem 2rem;
  border-radius: 15px;
  display: inline-block;
}

.article-category {
  color: white;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.article-header-meta {
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.article-header-meta span {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  margin: 0 0.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-weight: 500;
}

/* Додаткові стилі для заголовка */
.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 1;
  border-radius: 8px;
}

/* Анімація для заголовка */
.article-header-title {
  animation: fadeInUp 0.8s ease-out;
}

.article-category {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.article-header-meta {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

/* Мобільні стилі для заголовка статті */
@media (max-width: 768px) {
  .article-header {
    padding: 2rem 0;
    margin-bottom: 1rem;
  }
  
  .article-header-title {
    font-size: 1.8rem;
    padding: 0.8rem 1.5rem;
    margin-bottom: 0.8rem;
  }
  
  .article-category {
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
  }
  
  .article-header-meta span {
    padding: 0.3rem 0.6rem;
    margin: 0 0.3rem;
    font-size: 0.85rem;
  }
  
  .article-header-content {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .article-header {
    padding: 1.5rem 0;
  }
  
  .article-header-title {
    font-size: 1.5rem;
    padding: 0.6rem 1rem;
  }
  
  .article-category {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .article-header-meta span {
    padding: 0.25rem 0.5rem;
    margin: 0 0.2rem;
    font-size: 0.8rem;
  }
}

/* Стилі для логотипу */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-link:hover .logo-icon {
  transform: scale(1.1);
}

/* Мобільні стилі для breadcrumbs */
@media (max-width: 768px) {
  .breadcrumbs-current {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
  
  .logo-container {
    gap: 0.3rem;
  }
  
  .logo-icon {
    width: 28px;
    height: 28px;
  }
  
  /* Мобільні стилі для назви компанії */
  .nav-logo h2 {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
    font-size: 1rem;
  }
  
  /* Додаткові стилі для дуже маленьких екранів */
  @media (max-width: 480px) {
    .nav-logo h2 {
      font-size: 1rem;
      line-height: 0.8;
    }
  }
}

@media (max-width: 480px) {
  .breadcrumbs-current {
    max-width: 80px;
  }
  
  .breadcrumbs-list {
    font-size: 0.85rem;
  }
  
  .breadcrumbs-item {
    margin-right: 0.5rem;
  }
  
  .breadcrumbs-item:not(:last-child)::after {
    margin: 0 0.3rem;
  }
}

/* Специфічні стилі для мобільних пристроїв у блозі */
@media (max-width: 768px) {
  body.blog .nav-logo h2 {
    font-size: 0; /* Приховуємо оригінальний текст */
    line-height: 0.9;
  }
  
  body.blog .nav-logo h2 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body.blog .nav-logo h2 {
    font-size: 0; /* Приховуємо оригінальний текст */
    line-height: 0.8;
  }
  
  body.blog .nav-logo h2 {
    font-size: 1rem;
  }
}

/* Додаткові специфічні стилі для забезпечення пріоритету */
@media (max-width: 768px) {
  body.blog .nav-logo .logo-container h2 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body.blog .nav-logo .logo-container h2 {
    font-size: 1rem;
  }
}

/* Стилі для span елементів логотипу */
.logo-part {
  display: inline;
  transition: all 0.3s ease;
  /* Для десктопу - об'єднуємо в один напис */
  margin: 0;
  padding: 0;
  letter-spacing: -0.02em; /* Невелике зближення літер для кращого вигляду */
}

/* Десктопні стилі для об'єднання логотипу в один напис */
@media (min-width: 769px) {
  body.blog .nav-logo h2 {
    display: inline;
    white-space: nowrap; /* Запобігає переносу рядків */
    /* Додаткові стилі для кращого об'єднання */
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    /* Усуваємо пробіли між span елементами */
    font-size: 0;
    line-height: 1;
  }
  
  body.blog .logo-part {
    display: inline-block;
    margin: 0;
    padding: 0;
    /* Відновлюємо розмір шрифту для span елементів */
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    /* Додаємо невеликі відступи між частинами логотипу */
    margin-right: 0em;
    /* Покращення читабельності */
    font-feature-settings: "kern" 1, "liga" 1;
    /* Додаткові стилі для кращого об'єднання */
    vertical-align: top;
  }
  
  /* Останній елемент не має правого відступу */
  body.blog .logo-part:last-child {
    margin-right: 0;
  }
}

/* Адаптивні стилі для мобільних пристроїв */
@media (max-width: 768px) {
  body.blog .container {
    max-width: 100%;
    padding: 0 8px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .breadcrumbs-container {
    max-width: 100%;
    padding: 0 8px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .article-content-wrapper {
    max-width: 100%;
    padding: 10px 8px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .article-header-content {
    max-width: 100%;
    padding: 0 8px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .related-grid {
    max-width: 100%;
    gap: 20px;
    padding: 0 8px;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Кращі стилі для тексту на мобільних */
  body.blog .article-content-wrapper h2 {
    font-size: 1.6rem;
    margin: 30px 0 15px 0;
  }
  
  body.blog .article-content-wrapper h3 {
    font-size: 1.3rem;
    margin: 25px 0 12px 0;
  }
  
  body.blog .article-content-wrapper p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 18px;
  }
  
  /* Стилі для заголовків статей на мобільних */
  body.blog .article-header-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 20px;
  }
  
  body.blog .article-header-subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 25px;
  }
}

@media (max-width: 480px) {
  body.blog .container {
    max-width: 100%;
    padding: 0 5px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .breadcrumbs-container {
    max-width: 100%;
    padding: 0 5px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .article-content-wrapper {
    max-width: 100%;
    padding: 10px 5px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .article-header-content {
    max-width: 100%;
    padding: 0 5px;
    margin-left: 0;
    margin-right: 0;
  }
  
  body.blog .related-grid {
    max-width: 100%;
    gap: 15px;
    padding: 0 5px;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Ще кращі стилі для дуже малих екранів */
  body.blog .article-content-wrapper h2 {
    font-size: 1.4rem;
    margin: 25px 0 12px 0;
  }
  
  body.blog .article-content-wrapper h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
  }
  
  body.blog .article-content-wrapper p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  
  /* Стилі для заголовків статей на дуже малих екранах */
  body.blog .article-header-title {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 18px;
  }
  
  body.blog .article-header-subtitle {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 20px;
  }
}

/* Стилі для таблиць в статтях блогу */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.article-content table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.article-content table thead th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
}

.article-content table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f1f5f9;
}

.article-content table tbody tr:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-content table tbody tr:last-child {
  border-bottom: none;
}

.article-content table tbody td {
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  border: none;
  vertical-align: top;
}

.article-content table tbody td:first-child {
  font-weight: 600;
  color: #2d3748;
  background: #f8fafc;
}

.article-content table tbody td:nth-child(2),
.article-content table tbody td:nth-child(3) {
  text-align: center;
  font-weight: 500;
  color: #4a5568;
}

.article-content table tbody td:nth-child(4) {
  text-align: center;
  font-weight: 500;
  color: #4a5568;
}

.article-content table tbody td:last-child {
  font-size: 0.9rem;
  color: #718096;
  font-style: italic;
}

/* Спеціальні стилі для четвертої колонки */
.article-content table tbody td:nth-child(4) {
  color: #4a5568;
  font-weight: 500;
}

/* Додаткові стилі для покращення таблиці */
.article-content .table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-content .comparison-table {
  min-width: 600px;
}

.article-content .savings {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  color: #4a5568;
  font-weight: 500;
  border-radius: 6px;
}

/* Мобільні стилі для таблиць */
@media (max-width: 768px) {
  .article-content table {
    font-size: 0.85rem;
    margin: 1.5rem 0;
  }
  
  .article-content table thead th,
  .article-content table tbody td {
    padding: 0.75rem 0.5rem;
  }
  
  .article-content table thead th {
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem;
  }
  
  .article-content table tbody td {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .article-content table {
    font-size: 0.75rem;
    margin: 1rem 0;
  }
  
  .article-content table thead th,
  .article-content table tbody td {
    padding: 0.5rem 0.25rem;
  }
  
  .article-content table thead th {
    font-size: 0.7rem;
  }
  
  .article-content table tbody td {
    font-size: 0.7rem;
  }
  
  /* Горизонтальний скрол для дуже маленьких екранів */
  .article-content {
    overflow-x: auto;
  }
}

/* ============================================
   Floating Table of Contents (Desktop only)
   ============================================ */

.floating-toc {
  position: fixed;
  top: 120px;
  right: 30px;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  z-index: 900;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-toc.hidden {
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
}

.floating-toc-header {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.floating-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.floating-toc-item {
  margin-bottom: 8px;
}

.floating-toc-link {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #4a5568;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.floating-toc-link:hover {
  color: #667eea;
  background: #f7fafc;
  border-left-color: #667eea;
  padding-left: 16px;
}

.floating-toc-link.active {
  color: #667eea;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
  border-left-color: #667eea;
  padding-left: 16px;
}

/* Підрівні (H3) */
.floating-toc-item.level-3 {
  margin-left: 15px;
}

.floating-toc-item.level-3 .floating-toc-link {
  font-size: 12px;
  color: #718096;
  padding: 6px 12px;
}

.floating-toc-item.level-3 .floating-toc-link.active {
  color: #764ba2;
  border-left-color: #764ba2;
}

/* Прогрес бар */
.toc-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #f0f0f0;
  border-radius: 12px 12px 0 0;
}

.toc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px 0 0 0;
  width: 0%;
  transition: width 0.3s ease;
}

/* Скролбар для TOC */
.floating-toc::-webkit-scrollbar {
  width: 4px;
}

.floating-toc::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.floating-toc::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.floating-toc::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Ховаємо TOC на планшетах і мобільних */
@media (max-width: 1400px) {
  .floating-toc {
    display: none;
  }
}

/* Для дуже широких екранів — трохи далі вправо */
@media (min-width: 1600px) {
  .floating-toc {
    right: calc((100vw - 1400px) / 2 - 300px);
  }
}

/* ============================================
   Scroll to Top Button
   ============================================ */

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.scroll-to-top:active {
  transform: translateY(-2px);
}

/* Стрілка всередині кнопки */
.scroll-to-top::before {
  content: "↑";
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  
  .scroll-to-top::before {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .scroll-to-top::before {
    font-size: 22px;
  }
}

