/*
Theme Name: Lawyer — Контент и медиа
Theme URI: https://github.com/wp-theme-lawyer
Author: Lawyer
Description: Современная контентно-медийная тема для статей, лонгридов и пользовательских историй. Читаемый текст, карточки статей, рубрики, медиа-блоки.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lawyer
*/

/* ========== Design tokens ========== */
:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: #0f0f14;
  --card: #ffffff;
  --card-foreground: #0f0f14;
  --primary: #030213;
  --primary-foreground: #ffffff;
  --secondary: #e8e9f0;
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 0.625rem;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --content-width: 42rem;
  --container-max: 80rem;
  /* LexProtect / custom.css compatibility */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-accent: #1e40af;
  --color-accent-hover: #1d4ed8;
  --footer-bg: #0f172a;
  --footer-text: #f1f5f9;
  --footer-text-muted: #94a3b8;
  --footer-border: #334155;
}

/* ========== Base ========== */
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
}

/* ========== Layout ========== */
.site-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--color-surface, var(--card));
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 4rem;
}

.header-brand { flex-shrink: 0; }
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 600;
}
.header-search { flex: 1; max-width: 32rem; }
.header-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.header-search-form input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem;
  outline: none;
}
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--card);
}
.header-action:hover { color: var(--foreground); }

/* Main content */
.site-main { padding-top: 4rem; min-height: 100vh; }
.content-sidebar-wrap { display: flex; }
.main-content { flex: 1; min-width: 0; }
.posts-grid { display: flex; flex-direction: column; gap: 1rem; }

/* Sidebar */
.sidebar { width: 14rem; flex-shrink: 0; padding: 1rem 0; }
.sidebar-nav-list, .sidebar-themes-list { list-style: none; padding: 0; margin: 0; }
.sidebar-nav-list a, .sidebar-themes-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  text-decoration: none;
}
.sidebar-nav-list a:hover, .sidebar-themes-list a:hover { background: var(--muted); color: var(--foreground); }
.sidebar-nav-list a.current { font-weight: 600; color: var(--foreground); }
.sidebar-themes-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--muted-foreground); margin: 1rem 0 0.5rem; padding: 0 0.75rem; }

/* Cards */
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.post-card a { color: inherit; text-decoration: none; }
.post-card-title { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.25rem; }
.post-card-meta { font-size: 0.875rem; color: var(--muted-foreground); }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; margin: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 0.5rem 0.75rem; border-radius: var(--radius); border: 1px solid var(--border); text-decoration: none; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--footer-border, var(--border));
  background: var(--footer-bg, var(--primary));
  color: var(--footer-text);
  padding: 2rem 0;
}
