/* Single Post Template - Magazine Style */

.post-template {
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --accent: #556b00;
  font-family: system-ui, sans-serif;
  color: var(--text);
}

.post-template h1,
.post-template h2,
.post-template h3,
.post-template h4,
.post-template h5,
.post-template h6 {
  margin: 0;
}

.post-template a {
  text-decoration: none;
  color: inherit;
}

/* Hero Section */
.post-hero {
  margin-bottom: 32px;
}

.post-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  background: rgba(85, 107, 0, 0.1);
  border-radius: 0 6px 6px 0;
}

/* Hero Image - Left Side */
.post-hero-image {
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
}

.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.post-no-image {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.2rem;
  border-radius: 6px;
}

/* Hero Content - Right Side */
.post-hero-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: space-between;
  padding: 32px;
}

.post-hero-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--accent);
  background: #fff;
  padding: 4px 8px;
  display: inline-block;
  font-weight: 600;
  border-radius: 4px;
  width: fit-content;
}

.post-title {
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
}

.post-author {
  font-weight: 600;
  color: var(--text);
}

/* Content Section */
.post-content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 64px;
}

.post-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
}

/* Sidebar */
.post-sidebar {
  position: relative;
}

.post-sidebar-sticky {
  position: sticky;
  top: 32px;
}

.sidebar-title {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid #e0e0e0;
}

.sidebar-post {
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar-post:last-child {
  border-bottom: none;
}

.sidebar-post-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-post-image {
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 4px;
}

.sidebar-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.sidebar-category {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(85, 107, 0, 0.1);
  padding: 3px 6px;
  display: inline-block;
  font-weight: 600;
  border-radius: 3px;
  width: fit-content;
}

.sidebar-post h4 {
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

.sidebar-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.post-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-size: 2rem;
  font-weight: 400;
  margin: 2rem 0 1rem;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 1.5rem 0 0.75rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 6px;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--muted);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.post-content table th,
.post-content table td {
  border: 1px solid #e0e0e0;
  padding: 0.75rem;
  text-align: left;
}

.post-content table th {
  background: #f5f5f5;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 968px) {
  .post-content-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .post-sidebar {
    position: relative;
  }

  .post-sidebar-sticky {
    position: relative;
    top: auto;
  }
}

@media (max-width: 768px) {
  .post-hero-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px;
  }

  .post-title {
    font-size: 2rem;
  }

  .post-content-section {
    padding: 0 16px 32px;
  }

  .post-hero {
    padding: 24px 0;
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .post-hero-container {
    padding: 0 12px;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-content-section {
    padding: 0 12px 24px;
  }

  .post-content {
    font-size: 1rem;
  }
}
