/* =========================================================
   DataKook Blog Post Styles
   ========================================================= */

.post {
  padding: 48px 0 80px;
  max-width: 720px;
  margin: 0 auto;
}

.post .container { max-width: 720px; }

.post-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; font-size: 0.85rem;
}
.post-reading-time { color: var(--gray-500); }

.post h1 {
  font-size: 2.2rem; font-weight: 800; line-height: 1.3;
  margin-bottom: 24px; color: var(--gray-900);
}

.post-intro {
  font-size: 1.15rem; color: var(--gray-600); line-height: 1.7;
  margin-bottom: 32px; border-left: 3px solid var(--blue-400);
  padding-left: 16px;
}

.post-hero-image {
  width: 100%; border-radius: 12px; margin-bottom: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.post h2 {
  font-size: 1.4rem; font-weight: 700; margin: 40px 0 16px;
  color: var(--gray-900);
}

.post p {
  font-size: 1rem; line-height: 1.8; color: var(--gray-700);
  margin-bottom: 16px;
}

.post ul, .post ol {
  margin: 16px 0 24px 24px; list-style: disc;
}
.post ol { list-style: decimal; }
.post li {
  font-size: 1rem; line-height: 1.8; color: var(--gray-700);
  margin-bottom: 8px;
}
.post li strong { color: var(--gray-900); }

.post a { color: var(--blue-500); text-decoration: underline; }
.post a:hover { color: var(--blue-600); }

.post blockquote {
  background: var(--gray-50); border-left: 4px solid var(--blue-400);
  padding: 16px 20px; margin: 24px 0; border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--gray-700);
}

.post-code-block {
  background: var(--gray-950); border-radius: 12px; padding: 24px;
  margin: 24px 0; overflow-x: auto;
}
.post-code-label {
  font-size: 0.8rem; color: var(--gray-400); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.post-code-block pre {
  color: var(--gray-300); font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem; line-height: 1.6; white-space: pre-wrap;
  margin-bottom: 16px;
}
.post-code-block pre:last-child { margin-bottom: 0; }
.post-code-block code { color: var(--blue-300); }

.post-cta {
  display: flex; gap: 16px; margin-top: 40px; padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}
.post-cta .btn-outline {
  background: transparent; color: var(--blue-500);
  border: 2px solid var(--blue-200);
}
.post-cta .btn-outline:hover { background: var(--blue-100); }

.post-comparison-table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  border-radius: 8px; overflow: hidden; font-size: 0.9rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.post-comparison-table th, .post-comparison-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--gray-100);
}
.post-comparison-table thead th {
  background: var(--gray-950); color: white; font-weight: 600;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.3px;
}
.post-comparison-table tbody tr:hover { background: var(--gray-50); }

/* ── Post Carousel ──────────────────────── */
.post-carousel {
  margin: 32px 0 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.post-carousel-track {
  position: relative;
  min-height: 300px;
}

.post-carousel-slide {
  display: none;
  flex-direction: column;
  align-items: center;
}

.post-carousel-slide.active {
  display: flex;
}

.post-carousel-img {
  width: 100%;
  height: auto;
  border-radius: 8px 8px 0 0;
  transition: opacity 0.2s;
}

.post-carousel-img:hover {
  opacity: 0.9;
}

.post-carousel-caption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--gray-600);
  text-align: center;
  font-style: italic;
}

.post-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px;
  border-top: 1px solid var(--gray-200);
}

.post-carousel-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--gray-300); background: white;
  cursor: pointer; transition: all 0.2s;
  color: var(--gray-600);
}
.post-carousel-btn:hover {
  background: var(--blue-100); border-color: var(--blue-400); color: var(--blue-500);
}

.post-carousel-dots {
  display: flex; gap: 8px;
}
.post-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-300); cursor: pointer;
  transition: background 0.2s;
}
.post-carousel-dot.active {
  background: var(--blue-500);
}

/* ── Image Modal ──────────────────────── */
.post-img-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center; justify-content: center;
  padding: 24px;
}
.post-img-modal.open {
  display: flex;
}
.post-img-modal-close {
  position: absolute; top: 20px; right: 28px;
  font-size: 2.5rem; color: white; background: none;
  border: none; cursor: pointer; line-height: 1;
}
.post-img-modal-close:hover { color: var(--blue-300); }
.post-img-modal-content {
  max-width: 90vw; max-height: 85vh;
  border-radius: 8px; box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
  .post h1 { font-size: 1.6rem; }
  .post-cta { flex-direction: column; }
}
