/*
Theme Name: Default
Author: Zalupa CMS Team
Description: Clean, responsive default theme for Zalupa CMS
Version: 1.0
*/

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --accent: #e94560;
  --accent2: #533483;
  --text: #2d3748;
  --text-muted: #718096;
  --bg: #f7f9fc;
  --card: #ffffff;
  --border: #e2e8f0;
  --sidebar-w: 280px;
  --container: 1100px;
  --radius: 8px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Layout ── */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.site-branding { flex: 1; }
.site-title { margin: 0; font-size: 22px; font-weight: 800; }
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); text-decoration: none; }
.site-tagline { margin: 0; font-size: 12px; color: var(--text-muted); }

/* Navigation */
.site-nav .nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav .nav-menu a {
  display: block; padding: 8px 14px; color: var(--text); font-size: 14px; font-weight: 500;
  border-radius: 6px; transition: background .2s, color .2s;
}
.site-nav .nav-menu a:hover, .site-nav .nav-menu .current-menu-item a { background: var(--bg); color: var(--accent); text-decoration: none; }

/* Mobile toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; padding: 8px; }

/* ── Content Area ── */
.site-content { flex: 1; padding: 40px 0; }
.content-area { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: 40px; }
.content-area.full-width { grid-template-columns: 1fr; }

/* ── Posts ── */
.post-list { display: flex; flex-direction: column; gap: 28px; }

.post-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }

.post-thumbnail { width: 100%; height: 220px; object-fit: cover; display: block; }
.post-thumbnail-placeholder {
  width: 100%; height: 220px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}

.post-body { padding: 24px; }
.post-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 12px; color: var(--text-muted); }
.post-meta .cat-link { background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.post-title { margin: 0 0 12px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--accent); text-decoration: none; }
.post-excerpt { margin: 0 0 16px; color: var(--text-muted); font-size: 15px; }
.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; padding: 8px 16px;
  border-radius: 6px; font-size: 13px; font-weight: 600;
  transition: background .2s;
}
.read-more:hover { background: #c73652; text-decoration: none; }

/* ── Single Post ── */
.single-post { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.single-post .post-hero { width: 100%; max-height: 400px; object-fit: cover; }
.single-post .post-content-inner { padding: 36px; }
.single-post .post-title { font-size: 32px; margin: 0 0 16px; }
.post-content h2, .post-content h3 { color: var(--text); margin-top: 28px; }
.post-content p { margin: 0 0 16px; }
.post-content blockquote {
  margin: 20px 0; padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: #fff5f7; border-radius: 0 6px 6px 0;
  font-style: italic; color: var(--text-muted);
}
.post-content pre {
  background: #1a1a2e; color: #a8c7fa; padding: 20px;
  border-radius: 8px; overflow-x: auto; font-size: 14px;
}
.post-content code { background: #f0f2f5; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.post-content img { border-radius: 6px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 16px; }

/* Post footer: tags, share */
.post-footer { padding: 20px 36px; border-top: 1px solid var(--border); }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-link { background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px; font-size: 12px; color: var(--text-muted); }
.tag-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Comments ── */
.comments-section { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 28px; margin-top: 20px; }
.comments-section h3 { margin: 0 0 20px; font-size: 18px; }
.comment { padding: 16px; border-radius: 6px; background: var(--bg); margin-bottom: 14px; }
.comment-author { font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.comment-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.comment-body { font-size: 14px; }
.comment-form .form-group { margin-bottom: 14px; }
.comment-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.comment-form input, .comment-form textarea {
  display: block; width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form button {
  background: var(--accent); color: #fff; border: none; padding: 10px 20px;
  border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.comment-form button:hover { background: #c73652; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.widget-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.widget ul li:last-child { border-bottom: none; }
.widget-search-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }

/* ── Footer ── */
.site-footer {
  background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 32px 0; margin-top: auto;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-copy { font-size: 13px; }
.powered-by { font-size: 12px; color: rgba(255,255,255,0.4); margin: 0; }
.powered-by a { color: rgba(255,255,255,0.6); }
.powered-by a:hover { color: var(--accent); }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: rgba(255,255,255,0.6); font-size: 13px; }
.footer-nav a:hover { color: #fff; text-decoration: none; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px; font-size: 14px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  transition: all .2s;
}
.page-link:hover, .page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* ── Search ── */
.search-results h1 { margin-bottom: 8px; }
.search-results .search-info { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

/* ── 404 ── */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .error-code { font-size: 96px; font-weight: 900; color: var(--accent); line-height: 1; }
.error-404 h2 { font-size: 24px; margin: 12px 0; }
.error-404 p { color: var(--text-muted); }
.error-404 .btn-home { display: inline-block; margin-top: 20px; background: var(--accent); color: #fff; padding: 12px 24px; border-radius: 8px; font-weight: 600; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px; z-index: 40; }
  .site-nav.open .nav-menu { flex-direction: column; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .single-post .post-content-inner { padding: 20px; }
  .single-post .post-title { font-size: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
