/* ════════════════════════════════════
   404 PAGE
   ════════════════════════════════════ */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: var(--bg);
}
.e404-inner {
  max-width: 700px;
  width: 100%;
  text-align: center;
}
.e404-icon {
  margin: 0 auto 20px;
  width: 160px;
}
.e404-icon svg {
  width: 100%;
  height: auto;
  animation: pulse-line 2s ease-in-out infinite;
}
@keyframes pulse-line {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.e404-number {
  font-family: var(--serif);
  font-size: 110px;
  font-weight: 700;
  line-height: 1;
  color: var(--green);
  opacity: .12;
  margin-bottom: -30px;
  letter-spacing: -4px;
}
.e404-title {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: -.3px;
}
.e404-desc {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Search */
.e404-search-wrap {
  max-width: 480px;
  margin: 0 auto 28px;
}
.e404-search-wrap .search-form {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  background: var(--white);
  transition: border-color .2s;
}
.e404-search-wrap .search-form:focus-within {
  border-color: var(--green);
}
.e404-search-wrap .search-field {
  flex: 1;
  padding: 12px 18px;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: 14px;
  background: transparent;
  color: var(--text-dark);
  min-width: 0;
}
.e404-search-wrap .search-field::placeholder { color: var(--text-muted); }
.e404-search-wrap .search-submit {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.e404-search-wrap .search-submit:hover { background: var(--green-dark); }
.e404-search-wrap .search-submit svg { stroke: #fff; }

/* Buttons row */
.e404-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
}
.e404-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 30px;
  transition: all .18s;
}
.e404-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.e404-btn--primary {
  background: var(--green);
  color: #fff;
  border: 1.5px solid var(--green);
}
.e404-btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.e404-btn--ghost {
  background: var(--white);
  color: var(--text-mid);
  border: 1.5px solid var(--border);
}
.e404-btn--ghost:hover { border-color: var(--green); color: var(--green); }

/* Popular posts section */
.e404-popular { text-align: left; }
.e404-popular-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green);
}
.e404-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.e404-post-card {
  display: flex;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  align-items: flex-start;
  transition: border-color .15s, transform .15s;
}
.e404-post-card:hover { border-color: var(--green); transform: translateY(-2px); }
.e404-post-thumb {
  width: 72px;
  height: 64px;
  border-radius: 7px;
  flex-shrink: 0;
  overflow: hidden;
}
.e404-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.e404-post-thumb-ph {
  width: 100%;
  height: 100%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.e404-post-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 4px;
}
.e404-post-title {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.e404-post-card:hover .e404-post-title { color: var(--green); }
.e404-post-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Skeleton placeholders */
.e404-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  height: 14px;
  width: 100%;
}
.e404-skeleton--sm { height: 10px; width: 60%; margin-top: 6px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 600px) {
  .e404-number  { font-size: 80px; }
  .e404-title   { font-size: 26px; }
  .e404-posts-grid { grid-template-columns: 1fr; }
  .e404-btns    { flex-direction: column; align-items: center; }
}