/* Инфра Холдинг – стилове на сайта */
:root {
  --red: #b80120;
  --red-dark: #8f0019;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --bg-soft: #f5f5f5;
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font: 16px/1.6 "Roboto", "Segoe UI", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.25; color: #222; }
h1 { font-size: 1.9rem; margin: .2em 0 .7em; }
h2 { font-size: 1.35rem; margin: 1.6em 0 .6em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 900px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 6px 10px; z-index: 10; }

/* --- хедър --- */
.site-header { border-bottom: 3px solid var(--red); background: #fff; }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 84px; flex-wrap: wrap; }
.logo img { display: block; height: 48px; width: auto; }
.main-menu { margin-left: auto; }
.main-menu ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-menu a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--ink);
  font-weight: 500; text-transform: uppercase; font-size: .9rem; letter-spacing: .02em;
}
.main-menu li.active a, .main-menu a:hover { color: #fff; background: var(--red); }
.lang a { font-weight: 700; text-decoration: none; border: 1px solid var(--line); padding: 4px 8px; font-size: .85rem; }
.menu-toggle { display: none; margin-left: auto; background: var(--red); color: #fff; border: 0; padding: 8px 14px; font: inherit; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-menu { display: none; width: 100%; order: 3; }
  .main-menu.open { display: block; }
  .main-menu ul { flex-direction: column; }
}

/* --- навигация "трохи" --- */
.crumbs { font-size: .85rem; color: var(--muted); padding: 14px 0 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { margin: 0 6px; }

/* --- оформление --- */
main { min-height: 50vh; padding-bottom: 40px; }
.layout { display: grid; gap: 40px; padding-top: 10px; }
.layout.has-sidebar { grid-template-columns: 270px 1fr; }
.layout.contacts { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
  .layout.has-sidebar, .layout.contacts { grid-template-columns: 1fr; }
}
.content { min-width: 0; }

.sidebar { background: var(--bg-soft); padding: 18px 0; align-self: start; }
.sidebar h2 { font-size: 1.05rem; margin: 0 18px 10px; text-transform: uppercase; }
.sidebar h2 a { color: var(--ink); text-decoration: none; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar ul ul { padding-left: 14px; font-size: .92rem; }
.sidebar li a { display: block; padding: 7px 18px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.sidebar li a:hover { color: var(--red); }
.sidebar li.active > a { border-left-color: var(--red); color: var(--red); font-weight: 600; background: #fff; }

/* --- текст от редактора (стария сайт) --- */
.rich { overflow-x: auto; }
.rich table { border-collapse: collapse; width: 100% !important; max-width: 100%; margin: 1em 0; font-size: .95rem; height: auto !important; }
.rich td, .rich th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
.rich th { background: var(--bg-soft); text-transform: uppercase; font-size: .85rem; }
.rich img { max-width: 100%; height: auto; }
.lead { font-size: 1.08rem; color: #444; }

/* --- иконки за файлове --- */
.fi { display: inline-block; width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px; background: url(../img/pdficon.png) no-repeat center / contain; }
.fi-word, .fi-doc, .fi-docx { background-image: url(../img/wordIcon.png); }
.fi-excel, .fi-xls, .fi-xlsx { background-image: url(../img/excelIcon.png); }
.fi-jpg, .fi-jpeg, .fi-png { background-image: url(../img/jpgIcon.png); }
.fi-zip { background-image: none; border: 1px solid var(--muted); border-radius: 2px; }

/* --- документи --- */
.documents h2 { font-size: 1.1rem; border-bottom: 2px solid var(--red); padding-bottom: 4px; }
.doc-list { list-style: none; padding: 0; margin: 0 0 1em; }
.doc-list li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.doc-list a { text-decoration: none; color: var(--ink); }
.doc-list a:hover { color: var(--red); }
.doc-list .meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.legacy { margin-top: 1.5em; }

/* --- бутони, карти --- */
.btn { display: inline-block; background: var(--red); color: #fff; padding: 9px 18px; text-decoration: none; font-weight: 500; }
.btn:hover { background: var(--red-dark); color: #fff; }
.section-title { text-transform: uppercase; border-bottom: 2px solid var(--red); padding-bottom: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card h3 { font-size: 1rem; margin: 0; padding: 12px 14px; }
.card:hover h3 { color: var(--red); }

/* --- начало --- */
.slider { position: relative; background: #222; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; }
.slide img { width: 100%; height: clamp(260px, 42vw, 520px); object-fit: cover; display: block; }
.caption {
  position: absolute; left: max(20px, calc((100% - var(--wrap)) / 2 + 20px)); bottom: 40px; max-width: 520px;
  background: rgba(255, 255, 255, .93); padding: 20px 24px; border-left: 5px solid var(--red);
}
.caption h2 { margin: 0 0 .4em; font-size: 1.4rem; }
.caption p { margin: 0 0 .8em; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; }
.dots a { display: inline-block; width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; background: rgba(255,255,255,.7); }
@media (max-width: 700px) { .caption { position: static; max-width: none; } }

.accent { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: center; margin: 40px 0; }
@media (max-width: 800px) { .accent { grid-template-columns: 1fr; } }

.news-list { list-style: none; padding: 0; }
.news-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; }
.news-list time, .news-cards time, .content > time { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.news-list a { text-decoration: none; color: var(--ink); font-weight: 500; }
.news-list a:hover { color: var(--red); }

.news-cards { list-style: none; padding: 0; }
.news-cards li { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news-cards img { width: 180px; height: 120px; object-fit: cover; flex: none; }
.news-cards h2 { font-size: 1.15rem; margin: .2em 0 .4em; }
.news-cards h2 a { color: var(--ink); text-decoration: none; }
.news-cards h2 a:hover { color: var(--red); }
@media (max-width: 600px) { .news-cards li { flex-direction: column; } .news-cards img { width: 100%; height: auto; } }
.pager { display: flex; gap: 20px; justify-content: center; align-items: center; margin-top: 24px; }
.lead-image { margin: 0 0 1em; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 1em 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery .file { display: flex; align-items: center; padding: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }

.link-list { padding-left: 1.2em; }
.link-list li { margin: .6em 0; }
.apply { background: var(--bg-soft); padding: 14px 18px; border-left: 4px solid var(--red); }

.map iframe { width: 100%; height: 380px; border: 0; margin-top: 70px; }
@media (max-width: 900px) { .map iframe { margin-top: 0; } }
.sitemap ul { line-height: 1.9; }

/* --- футър --- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); }
.logos { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; align-items: center; padding: 26px 20px; }
.logos img { max-height: 54px; width: auto; filter: grayscale(1); opacity: .8; transition: .2s; }
.logos a:hover img { filter: none; opacity: 1; }
.footer-bottom { background: #2b2b2b; color: #ccc; font-size: .88rem; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 16px; padding-bottom: 16px; }
.footer-bottom a { color: #fff; text-decoration: none; }
