/* Blog-post Page Styles */

/* Main layout */
.blog-post-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

/* Article content area */
.article-content {
  padding: 2rem;
}

/* Back button */
.back-button-container {
  margin-bottom: 2rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--secondary-color);
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: none;
}

.back-button:hover {
  background: transparent;
  text-decoration: none;
  color: var(--primary-color);
}

.back-button i {
  font-size: 0.9rem;
}

/* Loading container */
.loading-container {
  text-align: center;
  padding: 3rem 0;
}

.loading-container h2 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.loading-container p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

/* Article styles */
.article-header {
  margin-bottom: 2rem;
}

.article-title {
  color: var(--secondary-color);
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.article-author {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 1rem;
}

.article-date {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-style: italic;
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Article featured image */
.article-image-container {
  margin: 2rem 0;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.article-featured-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 15px;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-featured-image.loaded {
  opacity: 1;
  transform: scale(1);
}

.article-featured-image.error {
  opacity: 0.7;
  transform: scale(1);
}

/* Image loading skeleton */
.article-image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(240, 240, 240, 0.1) 25%,
    rgba(224, 224, 224, 0.15) 50%,
    rgba(240, 240, 240, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: loading-shimmer 2s infinite;
  border-radius: 15px;
  z-index: -1;
  opacity: 0.3;
}

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

.article-content-text {
  color: var(--secondary-color);
  line-height: 1.7;
  font-size: 1.1rem;
  font-weight: 300;
}

.article-content-text h1,
.article-content-text h2,
.article-content-text h3,
.article-content-text h4,
.article-content-text h5,
.article-content-text h6 {
  color: var(--secondary-color);
  margin: 2rem 0 1rem 0;
  font-weight: 600;
}

.article-content-text p {
  margin-bottom: 1.5rem;
}

.article-content-text ul,
.article-content-text ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content-text li {
  margin-bottom: 0.5rem;
}

.article-content-text blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

.article-content-text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

.article-content-text pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

/* Popular articles sidebar */
.popular-articles-sidebar {
  padding: 1.5rem;
  height: fit-content;
}

.popular-articles-sidebar h3 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  border-bottom: none;
  padding-bottom: 0.5rem;
}

/* Popular article items */
.popular-article-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popular-article-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.popular-article-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity 0.2s ease;
}

.popular-article-link:hover {
  opacity: 0.8;
}

.popular-article-link h4 {
  color: var(--secondary-color);
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
}

.popular-article-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.popular-article-author {
  color: var(--primary-color);
  font-weight: 500;
}

.popular-article-date {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* Error states */
.error-container {
  text-align: center;
  padding: 3rem 0;
}

.error-container h2 {
  color: #ff6b6b;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.error-container p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

.back-to-blog {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 1rem;
  transition: background 0.3s ease;
}

.back-to-blog:hover {
  background: #0d8f6f;
}

/* Social Sharing */
.social-sharing {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-sharing h3 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.social-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  color: white;
}

.social-btn.copy-link {
  border-radius: 50%;
}

.social-btn.facebook {
  background: #1877f2;
}

.social-btn.facebook:hover {
  background: #166fe5;
}

.social-btn.twitter {
  background: #1da1f2;
}

.social-btn.twitter:hover {
  background: #1a91da;
}

.social-btn.linkedin {
  background: #0077b5;
}

.social-btn.linkedin:hover {
  background: #006097;
}

.social-btn.discord {
  background: #5865f2;
}

.social-btn.discord:hover {
  background: #4752c4;
}

.social-btn.copy-link {
  background: var(--primary-color);
}

.social-btn.copy-link:hover {
  background: #0d8f6f;
}

.social-btn i {
  font-size: 1rem;
}

/* Copy Notification */
.copy-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-notification.show {
  transform: translateX(0);
  opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-content {
    padding: 1.5rem;
  }

  .article-title {
    font-size: 2rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .popular-articles-sidebar {
    position: static;
    padding: 1rem;
  }

  .article-content-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .article-content {
    padding: 1rem;
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-content-text {
    font-size: 0.95rem;
  }
}
