/* ===== vychet-nalogy.ru — Налоговый, практичный стиль ===== */
:root {
  --primary: #2E7D32;
  --primary-light: #43A047;
  --primary-pale: #E8F5E9;
  --primary-dark: #1B5E20;
  --accent: #FF8F00;
  --accent-light: #FFA726;
  --accent-pale: #FFF3E0;
  --text: #263238;
  --text-light: #546E7A;
  --text-muted: #90A4AE;
  --bg: #FAFAFA;
  --bg-white: #fff;
  --bg-gray: #F5F5F5;
  --border: #CFD8DC;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
  --radius: 8px;
  --max-w: 1120px;
  --nav-h: 60px;
  --font: 'PT Sans', Arial, sans-serif;
  --font-mono: 'PT Mono', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; }

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

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { line-height: 1.3; color: var(--text); }
h1 { font-size: 2rem; margin-bottom: 16px; }
h2 { font-size: 1.45rem; margin: 40px 0 16px; }
h3 { font-size: 1.1rem; margin: 24px 0 10px; }
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 16px 24px; }
li { margin-bottom: 6px; }

/* Monospace accent */
.mono { font-family: var(--font-mono); }
.amount { font-family: var(--font-mono); font-weight: 700; color: var(--primary); font-size: 1.1em; }

/* ===== Nav — Transparent→White (B) ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  transition: background .3s;
}
.nav .container { display: flex; align-items: center; height: var(--nav-h); gap: 20px; }
.nav-logo { font-weight: 700; font-size: 1.15rem; color: var(--primary-dark); white-space: nowrap; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  font-size: 0.84rem; padding: 6px 10px; border-radius: var(--radius);
  color: var(--text-light); transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-pale); color: var(--primary); }

.burger { display: none; background: none; border: none; cursor: pointer; width: 32px; height: 24px; position: relative; }
.burger span { display: block; width: 100%; height: 2px; background: var(--text); position: absolute; left: 0; transition: all .3s; }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger span:nth-child(3) { bottom: 0; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { background: var(--bg-gray); padding: 10px 0; font-size: 0.82rem; }
.breadcrumbs-list { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs-list li::after { content: '/'; margin-left: 8px; color: var(--text-muted); }
.breadcrumbs-list li:last-child::after { display: none; }
.breadcrumbs-list a { color: var(--primary); }

/* ===== Hero — Split text+form (C) ===== */
.hero {
  background: var(--bg-white); padding: 48px 0; border-bottom: 1px solid var(--border);
}
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2rem; color: var(--primary-dark); }
.hero p { color: var(--text-light); font-size: 1.02rem; }
.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hero-badge {
  background: var(--primary-pale); color: var(--primary); font-size: 0.82rem;
  font-weight: 600; padding: 6px 14px; border-radius: 20px;
}

/* ===== Calculator ===== */
.calculator {
  background: var(--bg-gray); border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 28px;
}
.calculator h3 { color: var(--primary); margin-top: 0; font-size: 1.05rem; }
.calc-group { margin-bottom: 14px; }
.calc-group label { display: block; font-size: 0.85rem; color: var(--text-light); margin-bottom: 4px; font-weight: 700; }
.calc-select, .calc-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font); font-size: 0.9rem;
  background: var(--bg-white); transition: border-color .2s;
}
.calc-select:focus, .calc-input:focus { outline: none; border-color: var(--primary); }
.calc-result {
  background: var(--primary-pale); border: 2px solid var(--primary); border-radius: var(--radius);
  padding: 16px; text-align: center; margin-top: 16px;
}
.calc-result-amount { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--primary-dark); }
.calc-result-label { font-size: 0.82rem; color: var(--text-muted); }

/* ===== Buttons — Rounded 8-10px (A) ===== */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius);
  font-family: var(--font); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; border: none; text-decoration: none; transition: all .2s;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #E65100; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-green { background: var(--primary); color: #fff; }
.btn-green:hover { background: var(--primary-dark); color: #fff; }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* ===== Cards — Dashed Border (C) ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }
.card-dash {
  background: var(--bg-white); border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px; transition: all .3s;
}
.card-dash:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.card-dash h3 { color: var(--primary); margin-top: 0; }
.card-dash p { font-size: 0.88rem; color: var(--text-light); }
.card-dash .amount { display: block; font-size: 1.3rem; margin: 8px 0; }

/* ===== Type Cards (for navigation) ===== */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.type-card {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; transition: all .3s; text-decoration: none; color: var(--text);
}
.type-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.type-card-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.type-card-title { font-weight: 700; font-size: 0.9rem; }
.type-card-amount { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); margin-top: 4px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--primary-dark); color: #fff; padding: 12px 14px; text-align: left; font-weight: 700; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:nth-child(even) { background: var(--bg-gray); }
.text-accent { color: var(--accent); font-weight: 700; }

/* ===== Info Box ===== */
.info-box {
  display: flex; gap: 16px; padding: 20px; border-radius: var(--radius);
  margin: 24px 0; align-items: flex-start;
}
.info-box-icon { font-size: 1.6rem; flex-shrink: 0; }
.info-box-green { background: var(--primary-pale); border-left: 4px solid var(--primary); }
.info-box-orange { background: var(--accent-pale); border-left: 4px solid var(--accent); }

/* ===== Steps ===== */
.steps { counter-reset: step; margin: 24px 0; }
.step {
  display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--border);
  align-items: flex-start;
}
.step::before {
  counter-increment: step; content: counter(step);
  background: var(--primary); color: #fff; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
  flex-shrink: 0;
}
.step-content h3 { margin-top: 0; font-size: 1rem; }
.step-content p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0; }

/* ===== Pros/Cons ===== */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.pros, .cons { padding: 20px; border-radius: var(--radius); border: 2px dashed; }
.pros { border-color: var(--primary); background: var(--primary-pale); }
.cons { border-color: #E53935; background: #FFEBEE; }
.pros h4 { color: var(--primary); }
.cons h4 { color: #C62828; }

/* ===== FAQ — Two Columns (B) ===== */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.faq-card {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.faq-card h4 { font-size: 0.95rem; color: var(--text); margin-bottom: 8px; }
.faq-card p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0; }

/* Also keep accordion for inner pages */
.faq-list { margin: 24px 0; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-question {
  width: 100%; text-align: left; padding: 14px 44px 14px 16px; border: none; background: var(--bg-white);
  font-family: var(--font); font-size: 0.92rem; font-weight: 700; color: var(--text);
  cursor: pointer; position: relative; transition: background .2s;
}
.faq-question:hover { background: var(--bg-gray); }
.faq-question::after {
  content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--accent); transition: transform .3s;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-answer-inner { padding: 0 16px 14px; font-size: 0.88rem; color: var(--text-light); }

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 48px 32px; border-radius: var(--radius);
  text-align: center; margin: 48px 0;
}
.cta-banner h2 { color: #fff; margin-top: 0; font-size: 1.5rem; }
.cta-banner p { color: rgba(255,255,255,.85); margin-bottom: 20px; }

/* ===== Article Layout ===== */
.article { padding: 40px 0; }
.article-header { margin-bottom: 24px; }
.article-meta { font-size: 0.82rem; color: var(--text-muted); }
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 40px; }
.article-content { min-width: 0; }

/* ===== Sidebar ===== */
.sidebar-widget {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.sidebar-widget h4 { font-size: 0.88rem; color: var(--primary-dark); margin-bottom: 12px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { font-size: 0.84rem; color: var(--text-light); padding: 6px 10px; border-radius: 6px; transition: all .2s; }
.sidebar-nav a:hover { background: var(--primary-pale); color: var(--primary); }

/* ===== Sections — White/Gray alternating (A) ===== */
.section-gray { background: var(--bg-gray); padding: 48px 0; }
.section-white { background: var(--bg-white); padding: 48px 0; }

/* ===== Footer — 4-col dark (A) ===== */
.footer {
  background: #263238; color: rgba(255,255,255,.8); padding: 40px 0 20px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer-brand p { font-size: 0.82rem; color: rgba(255,255,255,.5); margin-top: 8px; }
.footer h4 { color: #fff; font-size: 0.88rem; margin-bottom: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { color: rgba(255,255,255,.6); font-size: 0.82rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px;
  display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,.4);
  flex-wrap: wrap; gap: 8px;
}
.footer-disclaimer { font-size: 0.72rem; color: rgba(255,255,255,.3); margin-top: 12px; max-width: 600px; }

/* ===== Fade+Scale Animation (B) ===== */
.fade-in { opacity: 0; transform: scale(0.95); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: scale(1); }

/* ===== Utilities ===== */
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.text-center { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero-split { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg-white);
    flex-direction: column; padding: 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .burger { display: block; margin-left: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .hero { padding: 32px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
