/* ==========================================
   BLOG PAGE STYLES
   ========================================== */

/* Blog Header */
.blog-header {
  text-align: center;
  padding: 60px 0 40px;
  margin-bottom: 48px;
}

.blog-header h1 {
  font-size: 48px;
  font-weight: 800;
  background:#ff9c04;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}

.blog-header p {
  color: #9ca3af;
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
  background: rgba(20, 20, 30, 0.4);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: #ff9c04;
  background: rgba(139, 92, 246, 0.05);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a1a24, #12121c);
}

.blog-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  display: inline-block;
  background: rgba(255, 156, 4, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #ff9c04;
  margin-bottom: 12px;
  width: fit-content;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title:hover {
  color: #ff9c04;
}

.blog-card-excerpt {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #6b7280;
}

.blog-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card-read {
  color: #ff9c04;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.blog-card-read:hover {
  color: #ec489a;
}

/* Sidebar */
.blog-sidebar {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 156, 4, 0.2);
}

.sidebar-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  display: inline-block;
}

.sidebar-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(135deg, #ff9c04, #764ba2);
}

.sidebar-widget {
  margin-bottom: 40px;
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 12px;
}

.sidebar-list a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 8px 0;
}

.sidebar-list a:hover {
  color: #ff9c04;
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 60px;
}

.pagination-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 156, 4, 0.2);
  padding: 8px 16px;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination-item:hover,
.pagination-item.active {
  background: linear-gradient(135deg, #ff9c04, #764ba2);
  border-color: transparent;
}

/* ==========================================
   BLOG POST PAGE
   ========================================== */

/* Blog Post Container */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0 40px;
}

/* Post Header */
.post-header {
  text-align: center;
  margin-bottom: 32px;
}

.post-category {
  display: inline-block;
  background: rgba(255, 156, 4, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #ff9c04;
  margin-bottom: 16px;
}

.post-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background:#ff9c04;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Post Image */
.post-image {
  width: 100%;
  border-radius: 24px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #1a1a24, #12121c);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Post Content */
.post-content {
  color: #d1d5db;
  line-height: 1.8;
  font-size: 16px;
}

.post-content h2 {
  font-size: 28px;
  margin: 32px 0 16px;
  color: #fff;
}

.post-content h3 {
  font-size: 22px;
  margin: 24px 0 12px;
  color: #fff;
}

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

.post-content ul,
.post-content ol {
  margin: 20px 0 20px 24px;
}

.post-content li {
  margin: 8px 0;
}

.post-content a {
  color: #ff9c04;
  text-decoration: none;
}

.post-content a:hover {
  color: #ec489a;
  text-decoration: underline;
}

.post-content blockquote {
  border-left: 3px solid #ff9c04;
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 12px;
  font-style: italic;
}

/* ==========================================
   RELATED POSTS - УВЕЛИЧЕННАЯ ВЕРСИЯ
   ========================================== */

.related-posts {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 156, 4, 0.2);
  clear: both;
}

.related-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  text-align: center;
  color: #fff;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.related-card {
  background: rgba(20, 20, 30, 0.4);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: #ff9c04;
  background: rgba(139, 92, 246, 0.05);
}

.related-card-image {
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2a, #0f0f1a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.related-card-image-placeholder {
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.related-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-card .blog-card-category {
  display: inline-block;
  background: rgba(255, 156, 4, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #ff9c04;
  margin-bottom: 12px;
  width: fit-content;
}

.related-card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
  color: #fff;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-title:hover {
  color: #ff9c04;
}

.related-card-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.related-card-link {
  display: inline-block;
  color: #ff9c04;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  margin-top: auto;
}

.related-card-link:hover {
  color: #ec489a;
}

/* Responsive */
@media (max-width: 768px) {
  .related-card-image {
    height: 160px;
  }

  .related-card-content {
    padding: 16px;
  }

  .related-card-title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .related-card-image {
    height: 140px;
  }

  .related-card-content {
    padding: 14px;
  }

  .related-card-title {
    font-size: 15px;
  }

  .related-card-meta {
    font-size: 11px;
  }

  .related-card-link {
    font-size: 12px;
  }
}

/* ==========================================
   BACK TO BLOG BUTTON
   ========================================== */

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 156, 4, 0.2);
  border: 1px solid #ff9c04;
  padding: 10px 24px;
  border-radius: 40px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  margin: 0 0 32px 0;
  transition: all 0.2s;
}

.back-to-blog:hover {
  background: #ff9c04;
  border-color: #ff9c04;
}

/* ==========================================
   BACK TO TOP & FLOATING BUTTONS
   ========================================== */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #ff9c04;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.floating-generate-btn {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #ff9c04, #ff7a00);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(255, 156, 4, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.floating-generate-btn.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.floating-generate-btn:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 156, 4, 0.65), 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.floating-generate-btn:active {
  transform: translateX(-50%) translateY(0) scale(0.98);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

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

  .post-title {
    font-size: 28px;
  }

  .blog-header h1 {
    font-size: 36px;
  }

  .blog-header p {
    font-size: 16px;
  }

  .post-meta {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .related-card-image {
    height: 100px;
  }

  .back-to-blog {
    margin-bottom: 24px;
  }

  .blog-post {
    padding: 16px 0 32px;
  }

  .post-image {
    min-height: 180px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .floating-generate-btn {
    bottom: 20px;
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 550px) {
  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto 40px;
  }

  .blog-card-content {
    padding: 20px;
  }

  .blog-card-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .related-card {
    padding: 0;
  }

  .related-card-content {
    padding: 12px;
  }

  .related-card-title {
    font-size: 14px;
  }

  .related-card-meta {
    font-size: 10px;
  }

  .related-card-link {
    font-size: 12px;
  }

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

  .post-meta {
    gap: 12px;
    font-size: 12px;
  }

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

  .post-content h2 {
    font-size: 22px;
  }

  .post-content h3 {
    font-size: 18px;
  }

  .back-to-blog {
    padding: 8px 20px;
    font-size: 14px;
  }
}
