/*
Theme Name: TrueCrime
Theme URI: https://truecrime.local
Author: TrueCrime Team
Author URI: https://truecrime.local
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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: truecrime
Tags: blog, news, true-crime, reading, minimal, clean
*/

/* ===== CSS Variables ===== */
:root {
  --color-primary: #1a1a1a;
  --color-secondary: #8b0000;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-border: #e0e0e0;
  --color-accent: #c41e3a;
  
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-reading: Georgia, 'Times New Roman', serif;
  
  --max-width: 1200px;
  --reading-width: 720px;
  --spacing: 1.5rem;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5rem;
  font-family: var(--font-reading);
  font-size: 1.125rem;
  line-height: 1.8;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ===== Layout ===== */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background-color: var(--color-primary);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: white;
}

.site-title a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.site-description {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ===== Navigation ===== */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-navigation a {
  color: white;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.main-navigation a:hover {
  color: var(--color-accent);
}

/* ===== Main Content ===== */
.site-content {
  flex: 1;
  padding: 3rem 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

.main-content {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

@media (max-width: 968px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    order: 2;
  }
}

/* ===== Single Post (Reading Mode) ===== */
.single-post .entry-content,
.page .entry-content {
  max-width: var(--reading-width);
  margin: 0 auto;
}

.entry-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
}

.entry-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.entry-meta {
  color: var(--color-text-light);
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.entry-content {
  font-family: var(--font-reading);
  font-size: 1.125rem;
  line-height: 1.8;
  color: #2c2c2c;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.entry-content blockquote {
  border-left: 4px solid var(--color-secondary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  padding: 1.5rem;
  border-radius: 4px;
}

/* ===== Archive & Blog ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.post-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.post-card-title a {
  color: var(--color-primary);
}

.post-card-excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-card-meta {
  color: var(--color-text-light);
  font-size: 0.85rem;
  display: flex;
  gap: 1rem;
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-primary);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  font-size: 0.9rem;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .site-header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-navigation ul {
    gap: 1rem;
  }
  
  .entry-title {
    font-size: 2rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .main-navigation ul {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

