/* AI Ремонт — сайт. Общие стили (оранжевая тема). */
:root {
  --navy: #D2461A;
  --navy-dark: #7c2d12;
  --navy-light: #f97316;
  --accent: #ffc24b;
  --bg: #faf7f4;
  --bg-card: #ffffff;
  --text: #1f1a17;
  --text-soft: #6b5f57;
  --border: #ece6e1;
  --ok: #2e7d32;
  --shadow: 0 6px 24px rgba(210, 70, 26, 0.10);
  --radius: 14px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header / nav */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .logo-badge {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 18px;
  object-fit: cover;
  background: rgba(255,255,255,0.08);
}
img.logo-badge { object-fit: cover; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.86); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: var(--navy-dark) !important;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 700;
}
.nav-cta:hover { filter: brightness(1.05); text-decoration: none; }
.nav-burger { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

@media (max-width: 820px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy); flex-direction: column; gap: 0;
    padding: 8px 20px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-burger { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero-logo { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.hero h1 { font-size: 42px; font-weight: 800; line-height: 1.15; margin-bottom: 18px; letter-spacing: -0.5px; }
.hero p { font-size: 19px; color: rgba(255,255,255,0.9); max-width: 640px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 12px; font-weight: 700; font-size: 16px;
  border: 0; cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--navy-dark); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
@media (max-width: 640px){ .hero h1 { font-size: 32px; } .hero p { font-size: 17px; } }

/* Sections */
.section { padding: 56px 0; }
.section h2 { font-size: 30px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.4px; }
.section .lead { color: var(--text-soft); font-size: 17px; margin-bottom: 32px; max-width: 720px; }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(26,35,126,0.14); text-decoration: none; }
.card .ico { font-size: 30px; margin-bottom: 12px; }
.card h3 { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 15px; flex: 1; }
.card .more { color: var(--navy-light); font-weight: 600; font-size: 15px; margin-top: 14px; }

/* Article */
.article-wrap { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 40px; padding: 40px 0 64px; }
@media (max-width: 960px){ .article-wrap { grid-template-columns: 1fr; } .article-aside { order: 2; } }
.breadcrumbs { font-size: 14px; color: var(--text-soft); padding: 18px 0 0; }
.breadcrumbs a { color: var(--text-soft); }
article.post h1 { font-size: 34px; font-weight: 800; line-height: 1.2; margin: 10px 0 14px; letter-spacing: -0.5px; }
article.post .meta { color: var(--text-soft); font-size: 14px; margin-bottom: 26px; }
article.post h2 { font-size: 25px; font-weight: 700; margin: 34px 0 12px; }
article.post h3 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; }
article.post p, article.post li { font-size: 17px; color: #262b40; }
article.post p { margin-bottom: 16px; }
article.post ul, article.post ol { margin: 0 0 18px 22px; }
article.post li { margin-bottom: 8px; }
article.post .callout {
  background: #eef1fb; border-left: 4px solid var(--navy-light);
  padding: 16px 20px; border-radius: 8px; margin: 22px 0; font-size: 16px;
}
article.post .warn { background: #fff5e6; border-left-color: var(--accent); }
article.post table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
article.post th, article.post td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
article.post th { background: #eef1fb; }

.toc { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; }
.toc strong { display: block; margin-bottom: 8px; }
.toc a { display: block; padding: 4px 0; font-size: 15px; }

/* Aside sticky */
.article-aside .sticky { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }

/* Ad slot */
.ad-slot {
  background: repeating-linear-gradient(45deg,#f0f1f7,#f0f1f7 10px,#eaebf4 10px,#eaebf4 20px);
  border: 1px dashed #c7cbe0; border-radius: 10px;
  min-height: 90px; display: grid; place-items: center;
  color: #9aa0bd; font-size: 13px; text-align: center; margin: 26px 0;
}
.ad-slot.tall { min-height: 250px; }

/* Partner / affiliate block */
.partner-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.partner-box h4 { font-size: 16px; margin-bottom: 6px; }
.partner-box .tag { display:inline-block; font-size:11px; color:var(--text-soft); background:#eef1fb; padding:2px 8px; border-radius:20px; margin-bottom:10px; }
.partner-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.partner-item:first-of-type { border-top: 0; }
.partner-item .p-ico { font-size: 24px; }
.partner-item .p-name { font-weight: 700; font-size: 15px; }
.partner-item .p-desc { font-size: 13px; color: var(--text-soft); }
.partner-item .p-cta { margin-left: auto; align-self: center; background: var(--navy); color:#fff; padding:7px 12px; border-radius:8px; font-size:13px; font-weight:600; white-space: nowrap; }
.partner-item .p-cta:hover { background: var(--navy-light); text-decoration: none; }

/* App CTA banner */
.app-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff; border-radius: 18px; padding: 36px; text-align: center; margin: 20px 0;
}
.app-cta h3 { font-size: 26px; margin-bottom: 10px; }
.app-cta p { color: rgba(255,255,255,0.88); max-width: 560px; margin: 0 auto 20px; }

/* Related list */
.related { list-style: none; margin: 0 !important; }
.related li { margin: 0 !important; border-top: 1px solid var(--border); }
.related li:first-child { border-top: 0; }
.related a { display: block; padding: 11px 0; font-size: 15px; font-weight: 500; }

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.72); padding: 44px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; margin-bottom: 28px; }
@media (max-width: 720px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-grid a { color: rgba(255,255,255,0.72); display: block; padding: 4px 0; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; font-size: 13px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.disclaimer { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 10px; line-height: 1.5; }

/* Utility */
.center { text-align: center; }
.mt0 { margin-top: 0; }
.tools-list { list-style:none; }
.tools-list li { border-top:1px solid var(--border); }
.tools-list li:first-child{ border-top:0; }
.tools-list a { display:flex; justify-content:space-between; padding:14px 0; font-weight:500; }

/* Document template */
.doc-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 34px; box-shadow: var(--shadow); margin: 20px 0;
  font-size: 16px; line-height: 1.8; white-space: normal;
}
.doc-box .right { text-align: right; margin-bottom: 18px; white-space: pre-line; }
.doc-box .doc-title { text-align: center; font-weight: 700; margin: 18px 0; }
.doc-box p { margin-bottom: 12px; }
.copy-btn {
  background: var(--navy); color: #fff; border: 0; border-radius: 10px;
  padding: 11px 20px; font-weight: 600; font-size: 15px; cursor: pointer;
}
.copy-btn:hover { background: var(--navy-light); }
.field { background: #fff8e1; padding: 0 4px; border-radius: 3px; }
