/*
Theme Name: Modern Task Manager
Theme URI: https://вашсайт.ru/
Author: Ваше имя
Author URI: https://вашсайт.ru/
Description: Современная тема для управления задачами с минималистичным дизайном
Version: 2.0
Text Domain: modern-task-theme
*/

/* ===== VARIABLES ===== */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --header-height: 70px;
  --max-width: 1200px;
  --content-width: 800px;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-content-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 { 
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
h2 { 
  font-size: 2rem;
  letter-spacing: -0.02em;
}
h3 { 
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

a:hover {
  color: var(--primary-hover);
}

/* ===== HEADER ===== */
.site-header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-area {
  flex-shrink: 0;
}

.logo-area a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.025em;
}

.logo-area img {
  height: 36px;
  width: auto;
  border-radius: var(--radius-sm);
}

/* ===== NAVIGATION ===== */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.primary-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.primary-menu li {
  position: relative;
}

.primary-menu a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.primary-menu a:hover {
  color: var(--text-primary);
}

.primary-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.primary-menu a:hover::after {
  width: 100%;
}

.primary-menu .current-menu-item a {
  color: var(--text-primary);
}

.primary-menu .current-menu-item a::after {
  width: 100%;
}

/* ===== SEARCH FORM ===== */
.header-search {
  flex-shrink: 0;
}

.search-form {
  display: flex;
  align-items: center;
  position: relative;
}

.search-form input[type="search"] {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  font-size: 0.9rem;
  transition: var(--transition);
  width: 280px;
  background: var(--bg-secondary);
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--bg-primary);
}

.search-form::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.content-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.primary-content {
  width: 100%;
}

/* ===== ARTICLE CARDS ===== */
.articles-list {
  display: grid;
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-slow);
  border: 1px solid var(--border-light);
  padding: 15px !important;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color);
}

.article-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.article-card:hover .article-thumbnail img {
  transform: scale(1.05);
}

.article-content {
  padding: 1.5rem;
}

.article-header h2 {
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

.article-header h2 a {
  color: var(--text-primary);
  transition: var(--transition);
  display: block;
}

.article-header h2 a:hover {
  color: var(--primary-color);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.read-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.read-more a:hover {
  background: var(--primary-hover);
  transform: translateX(4px);
  color: white;
}

/* ===== SINGLE ARTICLE ===== */
.single-article {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
}

.single-article .article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.single-article .article-meta {
  justify-content: center;
}

.article-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.article-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
}

.widget {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.widget-title {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
  position: relative;
  color: var(--text-primary);
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-color);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.widget li:hover {
  transform: translateX(4px);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.widget a:hover {
  color: var(--primary-color);
}

.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tagcloud a {
  padding: 0.5rem 0.875rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  font-size: 0.85rem;
  transition: var(--transition);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.tagcloud a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border-light);
}

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

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

.footer-widget h3 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-widget p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.footer-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 0.625rem;
}

.footer-menu a {
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.footer-menu a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: 50%;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Subscribe Form */
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.subscribe-form input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-secondary);
  transition: var(--transition);
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--bg-primary);
}

.subscribe-form button {
  padding: 0.75rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.subscribe-form button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  gap: 0.5rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--bg-primary);
  color: var(--text-secondary);
}

.pagination .page-numbers.current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .page-numbers:hover:not(.current) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  :root {
    --header-height: 65px;
  }
  
  .content-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .sidebar {
    position: static;
    order: -1;
  }
  
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }
  
  .logo-area a {
    font-size: 1.3rem;
  }
  
  .primary-menu {
    gap: 1.25rem;
  }
  
  .search-form input[type="search"] {
    width: 200px;
  }
  
  .content-container {
    padding: 0 1rem;
  }
  
  .single-article {
    padding: 1.5rem;
  }
  
  .article-thumbnail {
    height: 180px;
  }
  
  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    padding: 0.75rem 1rem;
    height: auto;
    gap: 1rem;
  }
  
  .logo-area {
    margin-bottom: 0;
  }
  
  .main-navigation {
    order: 2;
    width: 100%;
  }
  
  .primary-menu {
    justify-content: center;
    gap: 1rem;
  }
  
  .header-search {
    order: 3;
    width: 100%;
  }
  
  .search-form input[type="search"] {
    width: 100%;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .article-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .read-more a {
    width: 100%;
    justify-content: center;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.article-card {
  animation: fadeInUp 0.6s ease-out;
}

.widget {
  animation: slideInLeft 0.6s ease-out;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e5e7eb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    
    --border-color: #4b5563;
    --border-light: #374151;
  }
  
  body {
    background: var(--bg-secondary);
  }
  
  .site-header {
    border-bottom-color: var(--border-light);
  }
  
  .search-form input[type="search"] {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  .search-form input[type="search"]:focus {
    background: var(--bg-primary);
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== FOCUS STATES ===== */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

