/* ЦДПО «Кадровый ресурс» — общие стили. Только локальные ресурсы, системные шрифты. */

:root {
  --c-bg: #eef1f4;
  --c-surface: #ffffff;
  --c-surface-alt: #f6f8fa;
  --c-ink: #1f2733;
  --c-ink-soft: #4b5563;
  --c-muted: #6b7483;
  --c-primary: #15375c;
  --c-primary-d: #0e2541;
  --c-primary-l: #27588a;
  --c-accent: #8c1d2b;
  --c-accent-d: #6f1521;
  --c-border: #d4dae1;
  --c-border-strong: #b7c0cb;
  --c-ok: #1f6b43;
  --c-warn: #9a6a09;
  --shadow: 0 1px 2px rgba(16, 32, 52, .08), 0 2px 10px rgba(16, 32, 52, .05);
  --wrap: 1140px;
  --font-head: Georgia, "PT Serif", "Times New Roman", serif;
  --font-text: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; vertical-align: middle; }

a { color: var(--c-primary-l); text-decoration: none; }
a:hover { color: var(--c-accent); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--c-primary-d); line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.95rem; margin: 0 0 .6rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 .9rem; }
h3 { font-size: 1.18rem; margin: 1.4rem 0 .5rem; }
p { margin: 0 0 1rem; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--c-primary-d); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Верхняя строка ---------- */
.topbar {
  background: var(--c-primary-d);
  color: #cdd8e4;
  font-size: .86rem;
}
.topbar a { color: #e7eef5; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.topbar .tb-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar .tb-spacer { margin-left: auto; }
.topbar .tb-ico { width: 15px; height: 15px; flex: none; opacity: .85; }

/* ---------- Шапка ---------- */
.masthead { background: var(--c-surface); border-bottom: 3px solid var(--c-primary); }
.masthead .wrap { display: flex; align-items: center; gap: 18px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .emblem { width: 56px; height: 56px; flex: none; }
.brand .b-name { font-family: var(--font-head); font-size: 1.42rem; font-weight: 700; color: var(--c-primary-d); line-height: 1.1; }
.brand .b-sub { font-size: .78rem; color: var(--c-muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; }
.masthead .m-contacts { margin-left: auto; text-align: right; line-height: 1.3; }
.masthead .m-phone { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--c-primary-d); white-space: nowrap; }
.masthead .m-phone a { color: inherit; }
.masthead .m-note { font-size: .8rem; color: var(--c-muted); }

/* ---------- Навигация ---------- */
.mainnav { background: var(--c-primary); }
.nav-disclosure > summary {
  list-style: none; cursor: pointer; color: #fff; font-weight: 600;
  padding: 12px 20px; display: block; user-select: none;
}
.nav-disclosure > summary::-webkit-details-marker { display: none; }
.nav-disclosure > summary::before { content: "\2630"; margin-right: 10px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: none; }
.nav-disclosure[open] .nav-list { display: block; }
.nav-list a {
  display: block; color: #eaf1f8; padding: 11px 18px; font-size: .96rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.nav-list a:hover { background: var(--c-primary-d); color: #fff; text-decoration: none; }
.nav-list a[aria-current="page"] { background: var(--c-primary-d); color: #fff; box-shadow: inset 4px 0 0 var(--c-accent); }

/* ---------- Хлебные крошки ---------- */
.crumbs { background: var(--c-surface-alt); border-bottom: 1px solid var(--c-border); font-size: .84rem; color: var(--c-muted); }
.crumbs .wrap { padding-top: 9px; padding-bottom: 9px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--c-border-strong); }
.crumbs li:last-child::after { content: ""; }

/* ---------- Герой ---------- */
.hero { background: linear-gradient(180deg, #16375c 0%, #112c49 100%); color: #eaf1f8; }
.hero .wrap { padding: 46px 20px 40px; }
.hero h1 { color: #fff; font-size: 2.2rem; max-width: 760px; }
.hero p.lead { font-size: 1.1rem; color: #cfdceb; max-width: 720px; margin-bottom: 1.5rem; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .hero-badges { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); }
.hero .hero-badges div { font-size: .9rem; color: #cfdceb; }
.hero .hero-badges b { display: block; font-family: var(--font-head); font-size: 1.6rem; color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block; font-family: var(--font-text); font-size: .96rem; font-weight: 600;
  padding: 12px 22px; border-radius: 3px; border: 1px solid transparent; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent-d); }
.btn-primary:hover { background: var(--c-accent-d); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary-d); border-color: var(--c-border-strong); }
.btn-light:hover { background: var(--c-surface-alt); color: var(--c-primary-d); }

/* ---------- Основная сетка контента ---------- */
.main { padding: 32px 0 44px; }
.layout { display: grid; grid-template-columns: 1fr; gap: 30px; }
.layout.has-aside { grid-template-columns: 1fr; }

.content > :first-child { margin-top: 0; }

.aside { font-size: .94rem; }
.aside .box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 4px; padding: 16px 18px; margin-bottom: 20px; box-shadow: var(--shadow); }
.aside .box h3 { margin-top: 0; font-size: 1.05rem; }
.aside ul { margin: 0; padding-left: 18px; }
.aside ul li { margin-bottom: 6px; }
.sidenav { list-style: none; padding: 0; margin: 0; }
.sidenav li { border-bottom: 1px solid var(--c-border); }
.sidenav li:last-child { border-bottom: 0; }
.sidenav a { display: block; padding: 9px 4px; color: var(--c-ink); }
.sidenav a:hover { color: var(--c-accent); text-decoration: none; }
.sidenav a[aria-current="page"] { color: var(--c-accent); font-weight: 600; }

/* ---------- Карточки ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 10px 0 6px; }
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 4px; padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .card-ico { width: 40px; height: 40px; color: var(--c-primary-l); margin-bottom: 10px; }
.card p { color: var(--c-ink-soft); margin-bottom: 0; }

.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-bottom: 2px solid var(--c-primary); padding-bottom: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .more { font-size: .9rem; font-weight: 600; }

/* ---------- Таблицы ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 18px; border: 1px solid var(--c-border); border-radius: 4px; }
table.data { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--c-surface); font-size: .94rem; }
table.data caption { text-align: left; font-size: .85rem; color: var(--c-muted); padding: 8px 10px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
table.data thead th { background: var(--c-primary); color: #fff; font-weight: 600; border-bottom: 0; font-family: var(--font-text); font-size: .9rem; }
table.data tbody tr:nth-child(even) { background: var(--c-surface-alt); }
table.data tbody tr:hover { background: #eef4fb; }
table.data td.num, table.data th.num { text-align: center; white-space: nowrap; }
.catrow th { background: var(--c-primary-d) !important; color: #fff; font-size: .95rem; }

.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.tag-diplom { background: #e7eef6; color: var(--c-primary-d); border: 1px solid #c7d6e6; }
.tag-udost { background: #fdf0e6; color: #8a4b12; border: 1px solid #f0d2b4; }
.tag-svid { background: #e9f4ec; color: var(--c-ok); border: 1px solid #c3e2cd; }
.tag-prot { background: #f1eef7; color: #5a3c86; border: 1px solid #d8cde9; }

.status-open { color: var(--c-ok); font-weight: 600; }
.status-few { color: var(--c-warn); font-weight: 600; }
.status-soon { color: var(--c-muted); font-weight: 600; }

/* ---------- Информационные блоки ---------- */
.panel { background: var(--c-surface); border: 1px solid var(--c-border); border-left: 4px solid var(--c-primary); border-radius: 4px; padding: 18px 20px; margin: 0 0 20px; box-shadow: var(--shadow); }
.panel.accent { border-left-color: var(--c-accent); }
.panel h3 { margin-top: 0; }
.panel.note { background: #fbf7ec; border-color: #ead9ad; border-left-color: var(--c-warn); }

.deflist { margin: 0 0 18px; }
.deflist dt { font-weight: 600; color: var(--c-primary-d); margin-top: 12px; }
.deflist dd { margin: 2px 0 0; color: var(--c-ink-soft); }

ul.checks { list-style: none; padding: 0; margin: 0 0 18px; }
ul.checks li { position: relative; padding-left: 30px; margin-bottom: 9px; }
ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px;
  background: var(--c-ok); border-radius: 3px;
}
ul.checks li::after {
  content: ""; position: absolute; left: 6px; top: 5px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(43deg);
}

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; }
ol.steps > li { position: relative; padding: 2px 0 16px 52px; margin: 0; }
ol.steps > li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  background: var(--c-primary); color: #fff; border-radius: 50%;
  font-family: var(--font-head); font-weight: 700; display: flex; align-items: center; justify-content: center;
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 38px; bottom: 2px; width: 2px; background: var(--c-border);
}
ol.steps h3 { margin: 2px 0 4px; }

/* ---------- Новости ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 16px 0; border-bottom: 1px solid var(--c-border); }
.news-list li:first-child { padding-top: 0; }
.news-item time { display: inline-block; font-size: .82rem; color: var(--c-muted); font-family: var(--font-head); }
.news-item h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.news-item p { margin: 0; color: var(--c-ink-soft); }
.news-compact li { padding: 11px 0; }
.news-compact h3 { font-size: 1rem; margin: 2px 0; }

/* ---------- Разное ---------- */
.lead-big { font-size: 1.12rem; color: var(--c-ink-soft); }
.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 10px 0 20px; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 4px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--c-primary); }
.stat span { font-size: .86rem; color: var(--c-muted); }

.cta-strip { background: var(--c-primary-d); color: #eaf1f8; border-radius: 5px; padding: 26px 28px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.cta-strip h2 { color: #fff; margin: 0 0 4px; }
.cta-strip p { margin: 0; color: #cfdceb; }

hr.rule { border: 0; border-top: 1px solid var(--c-border); margin: 28px 0; }

/* ---------- Подвал ---------- */
.footer { background: var(--c-primary-d); color: #c3d0de; font-size: .9rem; margin-top: 20px; }
.footer a { color: #e3ebf3; }
.footer .wrap { padding-top: 36px; padding-bottom: 20px; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 26px; }
.footer h4 { color: #fff; font-family: var(--font-head); font-size: 1.02rem; margin: 0 0 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; }
.footer .f-brand .emblem { width: 46px; height: 46px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 26px; padding-top: 16px; font-size: .82rem; color: #93a4b7; }
.footer-bottom p { margin: 0 0 6px; }

/* ---------- 404 ---------- */
.err-wrap { text-align: center; padding: 70px 20px; }
.err-code { font-family: var(--font-head); font-size: 5.5rem; color: var(--c-primary); line-height: 1; margin: 0; }

/* ---------- Адаптив ---------- */
@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-cols { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 860px) {
  h1 { font-size: 2.1rem; }
  .nav-disclosure > summary { display: none; }
  .nav-list { display: flex !important; flex-wrap: wrap; }
  .nav-list a { border-top: 0; border-right: 1px solid rgba(255,255,255,.12); padding: 13px 18px; }
  .nav-list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--c-accent); }
  .layout.has-aside { grid-template-columns: 1fr 300px; align-items: start; }
  .layout.aside-left { grid-template-columns: 260px 1fr; }
  .layout.aside-left .aside { order: -1; }
  .cards.c3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1000px) {
  .hero h1 { font-size: 2.5rem; }
}

@media print {
  .topbar, .mainnav, .hero-actions, .cta-strip, .footer .footer-cols { display: none; }
  body { background: #fff; }
}
