/* Post Layout Styles */
.post-layout {
  min-height: calc(100vh - 70px);
  padding: 40px 0 60px;
}

.post-container {
  max-width: 800px;
  margin: 0 auto;
  /* background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); */
  overflow: hidden;
}

/* Post Header */
.post-header {
  /* padding: 50px 50px 30px; */
  border-bottom: 1px solid var(--border-color);
}

.post-cover {
  width: 100%;
  height: 400px;
  margin-bottom: 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.post-header .post-meta {
  margin-top: 16px;
}

.post-category {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary-color), #3fc89c);
  color: white;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(47, 191, 160, 0.25);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.post-category::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: left 0.5s;
}

.post-category:hover::before {
  left: 100%;
}

.post-category:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(47, 191, 160, 0.4);
}

.post-date,
.post-modified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.post-date svg,
.post-modified svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin: 20px 0;
  letter-spacing: -0.5px;
}

.post-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: white;
  color: #5a6c7d;
  border: 1.5px solid #e1e8ed;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.post-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 5px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--primary-color), #667eea);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.post-tag:hover::before {
  opacity: 1;
}

.post-tag:hover {
  color: var(--primary-color);
  border-color: transparent;
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(47, 191, 160, 0.05), rgba(102, 126, 234, 0.05));
  box-shadow: 0 4px 12px rgba(47, 191, 160, 0.15);
}

/* Post Content */
.post-content {
  padding: 50px;
  padding-top: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-dark);
}

.post-content h1 {
  font-size: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.post-content h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.post-content h3 {
  font-size: 1.5rem;
}

.post-content h4 {
  font-size: 1.25rem;
}

.post-content p {
  margin-bottom: 1.5em;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: 0.5em;
}

.post-content li > ul,
.post-content li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.post-content blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--primary-color);
  background: rgba(47, 191, 160, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-gray);
}

.post-content blockquote p {
  margin-bottom: 0.5em;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content code {
  background: #f5f7fa;
  color: #e83e8c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.post-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.5em;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5em 0;
  line-height: 1.6;
  font-size: 0.9em;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.post-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: rgba(47, 191, 160, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s;
}

.post-content a:hover {
  color: var(--primary-dark);
  text-decoration-color: var(--primary-color);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.post-content table th,
.post-content table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.post-content table th {
  background: rgba(47, 191, 160, 0.1);
  font-weight: 600;
  color: var(--text-dark);
}

.post-content table tr:last-child td {
  border-bottom: none;
}

.post-content table tr:hover {
  background: rgba(47, 191, 160, 0.03);
}

.post-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 2em 0;
}

/* Post Dates Section */
.post-dates-section {
  padding: 30px 50px;
  border-bottom: 1px solid var(--border-color);
}

.post-dates-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-dates-wrapper .post-date,
.post-dates-wrapper .post-modified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.post-dates-wrapper .post-date svg,
.post-dates-wrapper .post-modified svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* Post Footer */
.post-footer {
  padding: 40px 50px 50px;
}

/* Post Navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  flex: 1;
}

.post-navigation .nav-link {
  flex: 1;
  max-width: calc(50% - 10px);
}

.nav-link {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.nav-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-link.disabled:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.nav-direction {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 500;
}

.nav-title {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.4;
}

.nav-next {
  text-align: right;
}

/* Related Posts */
.related-posts {
  margin-bottom: 30px;
}

.related-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.related-title svg {
  color: var(--primary-color);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  border: 1px solid transparent;
}

.related-item:hover {
  background: white;
  border-color: var(--primary-color);
  transform: translateX(5px);
}

.related-date {
  font-size: 0.85rem;
  color: var(--text-light);
  min-width: 90px;
  flex-shrink: 0;
}

.related-title-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 500;
  flex: 1;
}

/* Back to Home */
.post-back {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .post-layout {
    padding: 20px 0 40px;
  }

  .post-container {
    border-radius: 0;
  }

  .post-header,
  .post-content,
  .post-dates-section,
  .post-footer {
    padding: 30px 25px;
  }

  .post-cover {
    height: 250px;
    margin-bottom: 20px;
  }

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

  .post-content {
    font-size: 1rem;
  }

  .post-content h1 {
    font-size: 1.6rem;
  }

  .post-content h2 {
    font-size: 1.4rem;
  }

  .post-content h3 {
    font-size: 1.2rem;
  }

  .post-navigation {
    flex-direction: column;
  }

  .post-navigation .nav-link {
    max-width: 100%;
  }

  .nav-next {
    text-align: left;
  }

  .related-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .related-date {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .post-header,
  .post-content,
  .post-dates-section,
  .post-footer {
    padding: 20px 15px;
  }

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

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

