/*
Theme Name: SEO Preview
Theme URI: https://delaydachi.ru
Author: SEO Experiment
Description: Lightweight fallback theme for restored WordPress dumps without original wp-content files.
Version: 1.0.0
Text Domain: seo-preview
*/

:root {
  --bg: #f7f8f4;
  --paper: #ffffff;
  --ink: #20251f;
  --muted: #667064;
  --line: #dfe5da;
  --green: #335f42;
  --green-dark: #213f2d;
  --amber: #d99b35;
  --blue: #315b7a;
  --shadow: 0 12px 30px rgba(31, 47, 35, 0.08);
  --radius: 6px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--blue);
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus {
  left: 8px;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px);
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand-title {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.brand-tagline {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.search-submit,
.button-link {
  border: 0;
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.search-submit:hover,
.button-link:hover,
.search-submit:focus,
.button-link:focus {
  background: var(--green-dark);
  color: #fff;
}

.site-nav {
  border-top: 1px solid var(--line);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--green);
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding: 30px 0 48px;
}

.hero,
.archive-header,
.article,
.sidebar-box,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  margin-top: 30px;
  padding: 26px;
}

.hero h1,
.archive-header h1,
.article h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.18;
}

.hero p,
.archive-header p {
  margin: 0;
  color: var(--muted);
}

.archive-header {
  margin-bottom: 18px;
  padding: 22px;
}

.article {
  padding: 28px;
}

.article-hero-image {
  margin: 0 0 26px;
}

.article-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-meta,
.card-meta {
  color: var(--muted);
  font-size: 14px;
}

.article-content {
  overflow-wrap: anywhere;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 1.5em;
  line-height: 1.25;
}

.article-content iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.article-content img {
  display: block;
  margin: 18px auto;
  border-radius: var(--radius);
}

.article-content img.image-missing {
  display: none;
}

.info-box,
.tie-list-box {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--amber);
  background: #fff8eb;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  overflow: hidden;
}

.card-media,
.card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: linear-gradient(135deg, #dfe8d5, #f2e2bd);
}

.card-placeholder {
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.card h2 a:hover,
.card h2 a:focus {
  color: var(--green);
}

.card-excerpt {
  margin: 10px 0 0;
  color: var(--muted);
}

.pagination {
  margin-top: 24px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  min-width: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  text-align: center;
  text-decoration: none;
}

.page-numbers.current {
  background: var(--green);
  color: #fff;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.sidebar-box {
  padding: 18px;
}

.sidebar-box h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.sidebar-box ul {
  margin: 0;
  padding-left: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  padding: 24px 0;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignright {
  float: right;
  margin: 0 0 18px 18px;
}

.alignleft {
  float: left;
  margin: 0 18px 18px 0;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  margin-top: -8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 860px) {
  .header-inner,
  .main-layout,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .archive-header h1,
  .article h1 {
    font-size: 28px;
  }

  .article {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, 1120px);
  }

  .brand-title {
    font-size: 21px;
  }

  .search-form {
    flex-direction: column;
  }
}
