/* artak.am — site styles. Placeholder clean design; final look per §18.3. */

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1f2328;
  --text-muted: #6a737d;
  --accent: #b4462d;
  --accent-dark: #93361f;
  --border: #e3e4e8;
  --mark: #fff3b0;
  --code-bg: #22272e;
  --code-text: #d8dee9;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 22, 26, .07);
  --font: "Segoe UI", "Noto Sans Armenian", "Arial Armenian", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.branding { display: flex; align-items: baseline; gap: 12px; }
.site-title { font-size: 24px; font-weight: 700; color: var(--text); }
.site-title:hover { color: var(--accent); text-decoration: none; }
.site-logo-link { display: flex; align-items: center; }
.site-logo { display: block; max-height: 46px; width: auto; }
.tagline { color: var(--text-muted); font-size: 14px; }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.site-nav a { color: var(--text); font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Search */
.js-search { position: relative; }
.search-input {
  width: 100%;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
}
.search-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 280px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 22, 26, .12);
  z-index: 50;
}
.search-result { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--bg); text-decoration: none; }
.search-result .sr-title { display: block; font-weight: 600; }
.search-result .sr-meta { display: block; font-size: 13px; color: var(--text-muted); }
.search-empty { padding: 10px 14px; color: var(--text-muted); font-size: 14px; }

/* Layout */
.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  padding-top: 32px;
  padding-bottom: 48px;
}

/* Post cards */
.post-list { display: flex; flex-direction: column; gap: 24px; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-image img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  background: linear-gradient(135deg, #f0ebe8 0%, #e8e2dd 100%);
}
.card-placeholder span {
  font-size: 44px;
  font-weight: 700;
  color: rgba(180, 70, 45, .35);
}
.card-placeholder:hover { text-decoration: none; }
.card-body { padding: 20px 24px; }
.card-meta, .post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
}
.category-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
}
.category-badge:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.card-title { margin: 10px 0 8px; font-size: 22px; line-height: 1.35; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-excerpt { margin: 0; color: var(--text-muted); font-size: 15.5px; }

/* Single post */
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.post-title { margin: 10px 0 0; font-size: 32px; line-height: 1.3; }
.post-featured { margin: 24px 0 0; }
.post-featured img { display: block; width: 100%; border-radius: var(--radius); }
.post-body { margin-top: 20px; }
.post-body h2 { font-size: 24px; margin: 32px 0 12px; }
.post-body h3 { font-size: 20px; margin: 28px 0 10px; }
.post-body p { margin: 0 0 16px; }
.post-body mark { background: var(--mark); padding: 1px 3px; border-radius: 3px; }
.post-body blockquote {
  margin: 20px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--accent);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}
.post-body pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}
.post-body code { font-family: Consolas, "Courier New", monospace; }
.post-body p code, .post-body li code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 14.5px;
}
.post-body table { border-collapse: collapse; width: 100%; margin: 20px 0; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.post-body th { background: var(--bg); }
.post-body iframe { max-width: 100%; border: 0; border-radius: var(--radius); }
.post-body figure { margin: 20px 0; }
.post-body figcaption { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 6px; }
.post-body figure.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.post-body figure.gallery img { border-radius: 6px; width: 100%; height: 180px; object-fit: cover; }

/* Tags & share */
.post-tags { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 2px 10px; font-size: 13px; color: var(--text-muted); }
a.tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.post-share { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14.5px; }
.share-label { color: var(--text-muted); }
.post-share button {
  font: inherit;
  font-size: 14.5px;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.post-share button:hover { color: var(--accent-dark); text-decoration: underline; }

/* Prev/next + related */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.post-nav-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
}
.post-nav-item:hover { border-color: var(--accent); text-decoration: none; }
.post-nav-item.next { text-align: right; grid-column: 2; }
.post-nav-label { display: block; font-size: 13px; color: var(--text-muted); }
.post-nav-title { font-weight: 600; }
.related { margin-top: 36px; }
.related-title { font-size: 21px; margin-bottom: 16px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.widget-title { font-size: 16px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.widget-list a { color: var(--text); font-weight: 500; }
.widget-list a:hover { color: var(--accent); }
.widget-date { display: block; font-size: 12.5px; color: var(--text-muted); }
.cat-count { color: var(--text-muted); font-size: 13px; }

/* Archive & pagination */
.archive-header { margin-bottom: 24px; }
.archive-title { font-size: 28px; margin: 0 0 6px; }
.archive-description { color: var(--text-muted); margin: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; }
.page-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-weight: 500;
}
.page-link:hover { border-color: var(--accent); text-decoration: none; }
.page-status { color: var(--text-muted); font-size: 14px; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-social { display: flex; gap: 16px; }
.footer-copy { margin: 0; color: var(--text-muted); font-size: 14px; }

/* 404 */
.error-page { text-align: center; padding: 60px 0; }
.error-page h1 { font-size: 72px; margin: 0; color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .layout-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  .header-search { width: 100%; order: 3; }
  .post { padding: 24px 20px; }
  .post-title { font-size: 26px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next { grid-column: auto; text-align: left; }
}
