/* Blog Page Styles */

/* Blog Hero */
.blog-hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, rgba(15, 20, 32, 0.95) 0%, rgba(30, 35, 50, 0.95) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(124, 92, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(1, 209, 251, 0.1) 0%, transparent 50%);
  z-index: 0;
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.blog-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-subtitle {
  font-size: 1.25rem;
  color: #a0a0c0;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c5cff, #01d1fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
}

.hero-stat .stat-label {
  color: #a0a0c0;
  font-size: 0.9rem;
  margin-top: 8px;
  opacity: 0.9;
}

.blog-search {
  max-width: 600px;
  margin: 40px auto 0;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 60px 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #7c5cff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.search-input::placeholder {
  color: rgba(160, 160, 192, 0.6);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #7c5cff, #01d1fb);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 5px 15px rgba(124, 92, 255, 0.3);
}

/* Featured Posts */
.featured-posts {
  padding: 80px 0;
  background: rgba(20, 25, 40, 0.3);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .featured-large {
    grid-column: 1 / -1;
  }
}

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

.featured-post {
  background: rgba(20, 25, 40, 0.6);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.featured-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.featured-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.featured-large .featured-image {
  height: 300px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.post-category {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 12px;
  background: rgba(124, 92, 255, 0.9);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.featured-content {
  padding: 25px;
}

.post-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: #a0a0c0;
}

.post-date,
.post-read-time {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: white;
  line-height: 1.4;
}

.featured-large .post-title {
  font-size: 1.5rem;
}

.post-excerpt {
  color: #a0a0c0;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.read-more {
  color: #7c5cff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

.read-more:hover {
  color: #8a6dff;
}

/* Blog Container */
.blog-container {
  padding: 60px 0;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 50px;
}

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

/* Main Content */
.categories-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-btn {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  color: #a0a0c0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.category-btn.active {
  background: rgba(124, 92, 255, 0.2);
  border-color: #7c5cff;
  color: #7c5cff;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.blog-post {
  background: rgba(20, 25, 40, 0.6);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.post-content {
  padding: 25px;
}

.post-category-small {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(124, 92, 255, 0.2);
  color: #7c5cff;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.post-title-small {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: white;
  line-height: 1.4;
}

.post-excerpt-small {
  color: #a0a0c0;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.9rem;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #a0a0c0;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #01d1fb);
}

/* Sidebar */
.sidebar-widget {
  background: rgba(20, 25, 40, 0.6);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
}

.widget-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: white;
  position: relative;
  padding-bottom: 10px;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #7c5cff, #01d1fb);
  border-radius: 2px;
}

.widget-content {
  color: #a0a0c0;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Subscribe Form */
.subscribe-form h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: white;
}

.subscribe-form p {
  color: #a0a0c0;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.subscribe-form input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.subscribe-form input:focus {
  outline: none;
  border-color: #7c5cff;
}

.subscribe-form .btn {
  width: 100%;
}

/* Popular Posts */
.popular-posts {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.popular-post {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.3s;
}

.popular-post:hover {
  background: rgba(255, 255, 255, 0.05);
}

.popular-rank {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #7c5cff, #01d1fb);
  border-radius: 6px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.popular-content {
  flex: 1;
}

.popular-content h4 {
  font-size: 0.9rem;
  color: white;
  margin-bottom: 5px;
  line-height: 1.4;
}

.popular-date {
  font-size: 0.8rem;
  color: #a0a0c0;
}

/* Newsletter Widget */
.newsletter-widget .btn-block {
  width: 100%;
  justify-content: center;
}

.newsletter-widget .btn svg {
  margin-right: 8px;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  color: #a0a0c0;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s;
}

.tag:hover {
  background: rgba(124, 92, 255, 0.2);
  border-color: #7c5cff;
  color: #7c5cff;
}

/* Load More */
.load-more-container {
  text-align: center;
  margin-top: 30px;
}

.load-more-container .btn {
  padding: 12px 40px;
  font-size: 1rem;
}

/* Blog CTA */
.blog-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.1) 0%, rgba(1, 209, 251, 0.1) 100%);
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-content p {
  font-size: 1.2rem;
  color: #a0a0c0;
  margin-bottom: 30px;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  min-width: 200px;
}

/* Article Modal */
.article-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.article-modal .modal-content {
  position: relative;
  background: linear-gradient(135deg, #0f1420 0%, #1e2332 100%);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.article-modal .modal-header {
  margin-bottom: 30px;
}

.article-modal .modal-title h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: white;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.article-meta span {
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

.article-category {
  background: rgba(124, 92, 255, 0.2);
  color: #7c5cff;
}

.article-date {
  background: rgba(1, 209, 251, 0.2);
  color: #01d1fb;
}

.article-read-time {
  background: rgba(255, 255, 255, 0.1);
  color: #a0a0c0;
}

.article-image {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
}

.article-content {
  color: #e0e0f0;
  line-height: 1.8;
  margin-bottom: 30px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: white;
  margin-top: 30px;
  margin-bottom: 15px;
}

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

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

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

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

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

.article-content blockquote {
  border-left: 4px solid #7c5cff;
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: #a0a0c0;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-share {
  display: flex;
  gap: 10px;
}

.share-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #a0a0c0;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.share-btn[data-platform="telegram"]:hover {
  background: #0088cc;
  border-color: #0088cc;
  color: white;
}

.share-btn[data-platform="whatsapp"]:hover {
  background: #25D366;
  border-color: #25D366;
  color: white;
}

.share-btn[data-platform="copy"]:hover {
  background: rgba(124, 92, 255, 0.2);
  border-color: #7c5cff;
  color: #7c5cff;
}

/* Toast for blog */
.blog-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 25, 40, 0.95);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  z-index: 10000;
  animation: slideUp 0.3s ease;
  border: 1px solid rgba(124, 92, 255, 0.3);
  backdrop-filter: blur(10px);
  max-width: 90%;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-hero {
    padding: 140px 0 60px;
  }
  
  .blog-title {
    font-size: 2.5rem;
  }
  
  .blog-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-stats {
    gap: 30px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .featured-posts {
    padding: 60px 0;
  }
  
  .blog-container {
    padding: 40px 0;
  }
  
  .categories-filter {
    justify-content: center;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-content h2 {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .article-modal .modal-content {
    padding: 25px;
  }
  
  .article-modal .modal-title h3 {
    font-size: 1.5rem;
  }
  
  .article-footer {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  
  .article-share {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .blog-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
  
  .featured-grid {
    gap: 20px;
  }
  
  .cta-content h2 {
    font-size: 1.8rem;
  }
}
/* Добавьте в конец файла blog.css */

/* Lazy loading для изображений */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Placeholder для изображений */
.post-image {
    position: relative;
    background: #1e2332;
    min-height: 200px;
}

.post-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 92, 255, 0.2);
    border-top-color: #7c5cff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy:not(.loaded) + .post-image::before {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Улучшаем отображение ошибок загрузки изображений */
img[src*="data:image/svg+xml"] {
    background: #1e2332;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
    .post-image {
        min-height: 180px;
    }
}