/* Professional Post Article Styles */

:root {
  --brand-bg: #ffffff;
  --brand-accent: #1db954;
  --text-primary: #0b1226;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --border-light: rgba(11, 18, 38, 0.06);
  --bg-light: #f9fafb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Post Article Container */
.post {
  max-width: 900px;
  margin: 0 auto;
}

/* Post Header */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 2.5rem;
}

.post-header-content {
  flex: 1;
  min-width: 0;
}

.post-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  word-break: break-word;
  letter-spacing: -0.5px;
}

.post-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.95rem;
}

.dt-published {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.dt-published::before {
  content: "📅";
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.post-author {
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.post-author::before {
  content: "✍️";
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.back-link {
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: all 150ms ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.back-link:hover {
  background: var(--brand-accent);
  color: white;
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
}

/* Post Content */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  word-break: break-word;
  margin-bottom: 3rem;
}

.post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem 0;
  border-left: 4px solid var(--brand-accent);
  padding-left: 1rem;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem 0;
  line-height: 1.3;
}

.post-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem 0;
}

.post-content p {
  margin: 1rem 0;
}

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

.post-content li {
  margin: 0.75rem 0;
  color: var(--text-secondary);
}

.post-content a {
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 150ms ease;
  border-bottom: 1px solid transparent;
}

.post-content a:hover {
  border-bottom-color: var(--brand-accent);
  color: #1aa34a;
}

.post-content blockquote {
  border-left: 4px solid var(--brand-accent);
  padding: 1rem 0 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(29, 185, 84, 0.05);
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
}

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

.post-content code {
  background: #f3f4f6;
  color: #d97706;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  word-break: break-word;
}

.post-content pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #374151;
  line-height: 1.5;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
  display: block;
}

.post-content figure {
  margin: 2rem 0;
  text-align: center;
}

.post-content figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

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

.post-content table thead {
  background: var(--bg-light);
  border-bottom: 2px solid var(--border-light);
}

.post-content table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-right: 1px solid var(--border-light);
}

.post-content table th:last-child {
  border-right: none;
}

.post-content table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

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

.post-content table tbody tr:hover {
  background: rgba(29, 185, 84, 0.03);
}

/* Post Footer */
.post-footer {
  border-top: 2px solid var(--border-light);
  padding-top: 2rem;
  margin-top: 3rem;
}

.post-comments {
  margin-bottom: 2rem;
}

.post-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.post-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 150ms ease;
}

.post-nav-link:hover {
  background: var(--brand-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

  .post-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }

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

  .back-link {
    width: 100%;
    justify-content: center;
  }

  .post-meta-info {
    gap: 1rem;
    font-size: 0.9rem;
  }

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

  .post-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem 0;
  }

  .post-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem 0;
  }

  .post-content ul,
  .post-content ol {
    padding-left: 1.5rem;
  }

  .post-content img {
    margin: 1.5rem 0;
  }

  .post-footer {
    padding-top: 1.5rem;
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .post-title {
    font-size: 1.5rem;
  }

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

  .post-content h2 {
    font-size: 1.375rem;
    border-left-width: 3px;
    padding-left: 0.75rem;
  }

  .post-content blockquote {
    padding: 0.75rem 0 0.75rem 1rem;
    border-left-width: 3px;
  }

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

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

  .post-nav-link {
    width: 100%;
    justify-content: center;
  }
}

/* Print styles */
@media print {
  .post-header {
    border-bottom: none;
    margin-bottom: 1rem;
  }

  .back-link {
    display: none;
  }

  .post-footer {
    border-top: none;
    display: none;
  }

  .post-content {
    color: #000;
  }

  .post-content a {
    color: #0563c1;
  }
}
