/* Post Page Styles */
.post-page {
  min-height: 100vh;
  padding-bottom: var(--space-2xl);
}

@media (min-width: 769px) {
  .post-page {
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  .post-page {
    padding-top: 120px;
  }
}

.post-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg) 0;
}

@media (min-width: 769px) {
  .post-header {
    margin-top: 120px;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
    padding: var(--space-xl) var(--space-lg) 0;
  }
}

/* Post Header */
.post-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 1s ease-out;
}

.post-header .post-title {
  font-size: 36px;
  font-weight: 600;
  font-family: var(--font-serif);
  color: var(--color-navy);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.post-meta-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
}

.post-meta-info::before,
.post-meta-info::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--color-border);
}

/* Post Content */
.post-article .post-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  animation: fadeInUp 1s ease-out 0.2s both;
  position: relative;
  overflow: hidden;
}

.post-article .post-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-blue);
}

/* Main Post Image */
.main-post-image {
  width: 100%;
  max-width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  box-shadow: 0 4px 12px rgba(13, 43, 69, 0.1);
}

/* Typography */
.post-article .post-content h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--color-navy);
  margin-bottom: var(--space-md);
}

.post-article .post-content h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--color-navy);
  margin-bottom: var(--space-md);
}

.post-article .post-content h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--color-navy);
  margin-bottom: var(--space-md);
}

.post-article .post-content p {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-body);
  margin-bottom: var(--space-lg);
}

.post-article .post-content p:first-of-type {
  font-size: 16px;
  color: var(--color-text-body);
}

.post-article .post-content p:first-of-type::first-letter {
  font-size: 4rem;
  font-weight: 600;
  float: left;
  line-height: 1;
  margin: 0 var(--space-sm) 0 0;
  font-family: var(--font-serif);
  color: var(--color-navy);
}

/* Content Images */
.post-image {
  width: 100%;
  max-width: 700px;
  border-radius: var(--radius-md);
  margin: var(--space-xl) auto;
  display: block;
  box-shadow: 0 4px 12px rgba(13, 43, 69, 0.1);
}

.image-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-xl);
}

/* Quote Styling */
.post-content blockquote {
  border-left: 3px solid var(--color-blue);
  background: var(--color-tag-blue-bg);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: var(--space-xl) 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--color-text-body);
}

/* Code Blocks */
.post-content code {
  background: var(--color-tag-green-bg);
  color: var(--color-green);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.post-content pre {
  background: var(--color-code-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  overflow-x: auto;
  font-family: var(--font-mono);
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--color-code-text);
}

.post-content pre .code-header {
  display: block;
  color: var(--color-blue-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  animation: fadeInUp 1s ease-out 0.4s both;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.nav-button:hover {
  border-color: var(--color-blue);
  background: var(--color-tag-blue-bg);
}

.back-button {
  background: var(--color-navy);
  color: white;
  border: none;
}

.back-button:hover {
  background: var(--color-navy-mid);
}

/* Share Section */
.share-section {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-2xl);
  text-align: center;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.share-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.share-button {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-blue);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background var(--transition-normal);
}

.share-button:hover {
  background: var(--color-blue-light);
}

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

  .post-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 2rem;
    text-align: left;
    margin-bottom: 0;
    animation: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .post-header.title-hidden {
    opacity: 0;
    transform: translateY(-110%);
    pointer-events: none;
  }

  .post-header .post-title {
    font-size: 1rem;
    margin: 0;
    line-height: 1.35;
  }

  .post-meta-info {
    display: none;
  }

  .post-article .post-content {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 2rem;
  }

  .main-post-image {
    height: 250px;
  }

  .post-content p:first-of-type::first-letter {
    font-size: 3rem;
  }

  .post-navigation {
    flex-direction: column;
    gap: var(--space-md);
  }

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

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

  .share-buttons {
    flex-direction: column;
  }

  .share-button {
    justify-content: center;
  }
}