/* ========================================
   LEARN PAGE + BLOG POST STYLES
   ======================================== */

/* === FILTER BAR === */
.learn-filters {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: 68px;
  z-index: 100;
}
.learn-filters-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.learn-search {
  margin-left: auto;
  position: relative;
}
.learn-search input {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 14px 8px 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-primary);
  width: 220px;
  transition: border-color 0.15s ease;
}
.learn-search input:focus { outline: none; border-color: var(--accent); }
.learn-search input::placeholder { color: var(--text-muted); }
.learn-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

/* === BLOG GRID === */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

/* === BLOG CARD === */
.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.blog-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-image .card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-light) 0%, #E8ECF1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  opacity: 0.6;
}
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.blog-category-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: capitalize;
  background: var(--accent-light);
  color: var(--accent);
}
.blog-card-date {
  font-size: 12px;
  color: var(--text-muted);
}
.blog-card-readtime {
  font-size: 12px;
  color: var(--text-muted);
}
.blog-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.blog-card-body .excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-card-author {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.blog-card-arrow {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.blog-card:hover .blog-card-arrow { transform: translateX(4px); }

/* === LOADING SKELETON === */
.skeleton-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
}
.skeleton-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-body { padding: 24px; }
.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 10px;
}
.skeleton-line:nth-child(1) { width: 40%; height: 10px; }
.skeleton-line:nth-child(2) { width: 90%; height: 18px; }
.skeleton-line:nth-child(3) { width: 100%; }
.skeleton-line:nth-child(4) { width: 75%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* === EMPTY STATE === */
.learn-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 32px;
}
.learn-empty p {
  font-size: 16px;
  color: var(--text-muted);
}

/* === LOAD MORE === */
.learn-load-more {
  text-align: center;
  margin-top: 48px;
}

/* === BLOG POST DETAIL (SSR) === */
.post-header {
  padding: 140px 0 48px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}
.post-header .container { max-width: 800px; }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.post-back:hover { color: var(--accent); }
.post-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: capitalize;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 16px;
}
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.post-meta .divider { color: var(--border); }
.post-cover {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}
.post-cover img {
  width: 100%;
  border-radius: 12px;
  margin-top: 32px;
}
.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 32px 100px;
}
.post-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  line-height: 1.3;
}
.post-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  line-height: 1.3;
}
.post-content p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.post-content ul, .post-content ol {
  margin: 0 0 20px 24px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 0 16px 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.post-content pre {
  background: #0F1A2A;
  color: #E8EAED;
  padding: 24px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover { color: var(--accent-deep); }
.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 24px 0;
}

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.post-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 100px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .learn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .learn-grid { grid-template-columns: 1fr; }
  .learn-filters { top: 56px; }
  .learn-filters-inner { gap: 8px; }
  .learn-search { margin-left: 0; width: 100%; }
  .learn-search input { width: 100%; }
  .post-header { padding: 120px 0 40px; }
  .post-content { padding: 32px 20px 72px; }
  .post-cover { padding: 0 20px; }
}
