﻿:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --surface2:#f1f4f9;
  --text:#0f172a;
  --muted:#5b6476;
  --line:#e5e9f2;
  --brand:#1f6feb;
  --brand2:#00a37a;

  --radius:5px;
  --shadow:0 12px 32px rgba(15,23,42,.08);
  --shadow2:0 10px 24px rgba(15,23,42,.08);

  --max:1160px;
  --pad:22px;
  --h:150px;
  --subh:36px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:15px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background: var(--bg);
}
a{color:inherit;text-decoration:none}
.wrap{max-width:var(--max);margin:0 auto;padding:0 var(--pad)}
.muted{color:var(--muted)}
.small{font-size:12px;color:var(--muted)}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  margin-bottom: 10px;
  color:var(--muted);
}
.pad{padding:20px}
main{padding:26px 0 56px}
.section{margin-top:18px}
.anchor{scroll-margin-top:calc(var(--h) + var(--subh) + 16px)}
.card a{color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 8px;
} 
.card a:after {
	content:""; /* # → */
	opacity:.9;
}

.anchor a{
  color:var(--brand);
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.anchor a:hover{text-decoration:underline}
.anchor a:after{opacity:.9}

h1,h2,h3{margin:0 0 10px}
h1{font-size:26px;line-height:1.15}
h2{font-size:22px;line-height:1.2}
h3{font-size:17px;line-height:1.25}
p{margin:0 0 12px}

/* ===== HEADER ===== */
header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(31,42,55,.96);
  backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(255,255,255,.12);
}
.topbar{
  height:var(--h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.brand{display:flex;gap:12px;align-items:center;min-width:240px; max-width: 400px;}
.logo{
  width:120px;height:120px;border-radius:var(--radius);
  background: url("../img/logo.png");
  flex:0 0 auto;
}
.logo.mini{width:60px;height:60px;box-shadow:none}
.brand b{
  display:block;
  font-size:32px;
  line-height:1.2;
  color:#fff;
}
.brand span{
  display:block;
  font-size:14px;
  color:rgba(255,255,255,.7);
  line-height:1.2;
}

/* ===== Header contacts: 2 columns ===== */
.contacts{
  display: grid;
  grid-template-columns: auto auto;
  gap: 14px 24px;
  align-items: center;
  font-size: 14px;
  white-space: nowrap;
}

.contacts-col{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-item{
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.85);
}

.contact-item a{
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.contact-item a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.divider{width:1px;height:22px;background:var(--line)}

.actions{
  flex: 0 0 auto;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:nowrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  box-shadow:var(--shadow2);
  font-weight:600;
  cursor:pointer;
  transition:transform .15s ease,border-color .15s ease, box-shadow .15s ease;
  white-space:nowrap;
}
.btn:hover{transform:translateY(-1px); border-color:rgba(31,111,235,.35)}
.btn.primary{
  border:none;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
}
.btn.primary:hover{box-shadow:0 16px 35px rgba(31,111,235,.20)}

/* ===== Desktop subnav ===== */
.subnav{
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgb(81,89,111);
}

.subnav .wrap.row{
  height: var(--subh);
  display: flex;
  align-items: stretch;         
  gap: 0;                       
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* WP menu  li */
.subnav .wrap.row li{
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
}
.subnav .wrap.row li::marker{ content: ""; }


.subnav .wrap.row > a,
.subnav .wrap.row li > a{
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;

  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.12);

  background: transparent;
  color: rgba(255,255,255,.92);
  font-weight: 600;
  text-decoration: none;
}

.subnav .wrap.row > a:last-child,
.subnav .wrap.row li:last-child > a{
  border-right: 0;
}

.subnav .wrap.row > a:hover,
.subnav .wrap.row li > a:hover{
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

.subnav .sep{ display: none; }
/* ===== Mobile contact bar ===== */
.mcontacts{
  display:none;
  border-top:1px solid var(--line);
  background:#fff;
}
.mcontacts-row{
  height:34px;
  display:flex;
  align-items:center;
  gap:10px;
  overflow:auto;
  white-space:nowrap;
  -webkit-overflow-scrolling:touch;
}
.mcontact{
  color:var(--text);
  font-weight:600;
  font-size:13px;
}
.msep{ color:#c3c8d4; user-select:none; }

/* ===== Burger + mobile nav ===== */
.burger{
  display:none;
  width:42px;
  height:42px;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:#fff;
  box-shadow:var(--shadow2);
  cursor:pointer;
  padding:0;
  position:relative;
  flex:0 0 auto;
}

.burger-lines{
  position:absolute;
  left:50%;
  top:50%;
  width:18px;
  height:2px;
  background:var(--text);
  transform:translate(-50%,-50%);
  border-radius:2px;
}

.burger-lines::before,
.burger-lines::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background:var(--text);
  border-radius:2px;
  transition:transform .18s ease, top .18s ease, opacity .18s ease;
}

.burger-lines::before{ top:-6px; }
.burger-lines::after{ top:6px; }

.burger.is-open .burger-lines{
  background:transparent; 
}
.burger.is-open .burger-lines::before{
  top:0;
  transform:rotate(45deg);
}
.burger.is-open .burger-lines::after{
  top:0;
  transform:rotate(-45deg);
}.mnav{
  display:none;
  border-top:1px solid var(--line);
  background:#fff;
}
.mnav .panel{
  padding:10px 0 14px;
  display:grid;
  gap:6px;
}
.mnav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px;
  border-radius:var(--radius);
  color:var(--muted);
  font-weight:400;
  font-size:14px;
}
.mnav a:hover{
  background:var(--surface2);
  color:var(--text);
}
.mnav a:after{content:"→"; color:#9aa3b2}

/* ===== Categories ===== */
.cats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin-top:0;
}
.cat{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#fff;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cat:hover{
  border-color:rgba(31,111,235,.55);
  box-shadow:0 18px 45px rgba(15,23,42,.12);
  transform:translateY(-2px);
}
.cat-img{
  position:relative;
  height:170px;
  overflow:hidden;
  border-bottom:1px solid var(--line);
  background:#eef2f7; /* цвет, пока грузится картинка */
}

.cat-img img{
  width:100%;
  height:100%;
  object-fit:cover;   /* ключевой момент */
  display:block;
}

.cat-img .label{
  position:absolute;
  left:12px;
  bottom:12px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.86);
  font-size:12px;
  color:rgba(15,23,42,.82);
  box-shadow:0 10px 20px rgba(15,23,42,.06);
}
.cat-img .label i{
  width:10px;height:10px;border-radius:99px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  display:inline-block;
}
.cat-body{padding:16px}
.cat-body p{margin:0 0 12px; font-size:14px; color:var(--muted)}
.cat-links{
  display:grid;
  gap:6px;
  font-size:14px;
}
.cat-links a{
  color:var(--brand);
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.cat-links a:hover{text-decoration:underline}
.cat-links a:after{content:"→"; opacity:.9}

/* ===== Content blocks ===== */
.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.list{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.item{
  border:1px solid var(--line);
  background:#fff;
  border-radius:var(--radius);
  padding:20px;
  display: flex;
  align-items: center;   /* КЛЮЧЕВО */
  gap: 20px;
}

.badge{
  border:1px solid var(--line);
  background:var(--surface2);
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}

.badge_clean{
  font-size:15px;
  color:var(--muted);
  white-space:nowrap;
}

.badge_clean.icon{
  padding:6px;
  min-width:32px;
  min-height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.badge_clean.icon img{
  height:46px;
  object-fit:contain;
  display:block;
}
.cta{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}

/* ===== Footer (dark) + layout fix ===== */
footer{
  background: rgba(31,42,55,.96);
  color: rgba(255,255,255,.72);
  border-top: 1px solid rgba(255,255,255,.12);
}

/* ВОТ ЭТО ВАЖНО: возвращаем 4 колонки на ПК */
footer .foot{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  align-items: start;
  padding-top: 42px;
  padding-bottom: 42px;
}

/* адаптив */
@media (max-width: 980px){
  footer .foot{
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Заголовки колонок */
footer .foot b{
  color: rgba(255,255,255,.92);
}

/* Текст мелкий */
footer .foot .small{
  color: rgba(255,255,255,.60);
}

/* Ссылки */
footer .foot a{
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.88);
  text-decoration: none;
}
footer .foot a:hover{
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Лого во футере */
footer .foot .logo{
  width: 48px;
  height: 48px;
  background-size: contain;
}

footer .foot-brand{
  align-items: center;
}

/* ===== Responsive ===== */
@media(max-width:980px){
  .brand{ min-width: 0; }
  .contacts{display:none}
  .cats{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .foot{grid-template-columns:1fr 1fr}

  .subnav{display:none}

  .burger{
    display:inline-flex;
    flex: 0 0 auto;
  }
  .mcontacts{display:block}
  .actions .btn{ display:none; }
}

/* ===== Tables: base ===== */
.entry-content table,
.card table,
main table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.entry-content th,
.entry-content td,
.card th,
.card td,
main th,
main td {
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.12);
  vertical-align: top;
  text-align: left;
}

.entry-content thead th,
.card thead th,
main thead th {
  font-weight: 700;
  background: rgba(0,0,0,.04);
}

.entry-content tbody tr:nth-child(even),
.card tbody tr:nth-child(even),
main tbody tr:nth-child(even) {
  background: rgba(0,0,0,.02);
}

/* Links inside table */
.entry-content table a,
.card table a,
main table a {
  text-decoration: underline;
}

/* ===== Mobile: make tables scrollable ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 640px; 
}

/* optional: prevent long strings from breaking layout */
.entry-content td,
.card td,
main td {
  word-break: break-word;
}

@media(max-width:560px){
  h1{font-size:28px}
  .foot{grid-template-columns:1fr}
}

@media (max-width: 640px){
  footer .foot{
    padding-top: 22px;
    padding-bottom: 22px;
  }
}
/* ===== Mobile: prevent logo cropping ===== */
@media (max-width: 640px){
  /* сам логотип */
  header .logo{
    width: 64px;
    height: 64px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex: 0 0 auto;
  }

@media (max-width: 980px){
  .contacts .contact-item:nth-child(5),
  .contacts .contact-item:nth-child(7),
  .contacts .divider:nth-child(6),
  .contacts .divider:nth-child(8){
    display: none;
  }
}

  /* контейнер шапки: позволяем элементам по высоте умещаться */
  header .topbar{
    height: auto;
    min-height: 0;          /* снимаем жесткую минимальную высоту */
    padding: 12px 0;
    align-items: center;
    overflow: visible;      /* если где-то резало */
  }

  /* бренд-область: тоже без обрезки */
  header .brand{
    align-items: center;
    overflow: visible;
  }
}

.row ul, .row li { margin: 0; padding: 0; list-style: none; }
.row li { display: inline; }

/* ===== Breadcrumbs ===== */
.breadcrumbs{
  margin: 18px 0 6px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a{
  color: rgba(31,111,235,.9);
  text-decoration: none;
}

.breadcrumbs a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs .bc-sep{
  opacity: .45;
}

.breadcrumbs .current{
  color: rgba(0,0,0,.6);
  font-weight: 500;
}

/* На тёмной шапке (если вдруг решишь туда перенести) */
header .breadcrumbs{
  color: rgba(255,255,255,.65);
}
header .breadcrumbs a{
  color: rgba(255,255,255,.9);
}
header .breadcrumbs .current{
  color: rgba(255,255,255,.75);
}

/* ===== Spoiler (details / summary) — fixed ===== */
details.spoiler{
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

/* Полоса заголовка — во всю ширину */
details.spoiler > summary{
  display: block;                 /* КЛЮЧЕВО */
  width: 100%;                    /* КЛЮЧЕВО */

  background: #f6f8fb;
  padding: 14px 18px;
  margin: 0;

  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
}

/* убираем стандартный маркер */
details.spoiler > summary::-webkit-details-marker{
  display: none;
}

/* стрелка */
details.spoiler > summary::after{
  content: "▸";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform .2s ease;
  opacity: .6;
}

details.spoiler[open] > summary::after{
  transform: translateY(-50%) rotate(90deg);
}

/* Контент — нормальная ширина, НЕ сжимается */
details.spoiler > *:not(summary){
  padding: 18px;
  margin: 0;
  box-sizing: border-box;
}

/* страховка для таблиц */
details.spoiler table{
  width: 100%;
}
/* ===== Spoiler inside .pad — full width header ===== */
.pad details.spoiler{
  margin-left: -20px;
  margin-right: -20px;
  border-radius: 0;
}

/* если у .pad другой padding — подстрой это значение */
.pad details.spoiler > summary{
  padding-left: 20px;
  padding-right: 20px;
}

/* возвращаем нормальные отступы контенту */
.pad details.spoiler > *:not(summary){
  padding: 20px;
}

/* ===== Icons ===== */
.icon{
  width: 16px;
  height: 16px;
  display: inline-block;
  opacity: .8;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* phone */
.icon.phone{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-width='2' d='M3 5a2 2 0 012-2h2l2 5-2 1a16 16 0 007 7l1-2 5 2v2a2 2 0 01-2 2h-1C9.716 20 4 14.284 4 7V5z'/%3E%3C/svg%3E");
}

/* mail */
.icon.mail{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-width='2' d='M3 5h18v14H3V5zm0 0l9 7 9-7'/%3E%3C/svg%3E");
}

/* location */
.icon.location{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-width='2' d='M12 11a3 3 0 100-6 3 3 0 000 6z'/%3E%3Cpath stroke-width='2' d='M12 22s8-4.5 8-11a8 8 0 10-16 0c0 6.5 8 11 8 11z'/%3E%3C/svg%3E");
}

/* time */
.icon.time{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-width='2' d='M12 8v4l3 3'/%3E%3Ccircle cx='12' cy='12' r='9' stroke-width='2'/%3E%3C/svg%3E");
}

/* ===== Post list ===== */
.post-list{
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.post-item{
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.post-item a{
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.post-item a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Category posts (horizontal rows) ===== */
.posts-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.post-row{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: stretch;

  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

@media (max-width: 980px){
  .post-row{
    grid-template-columns: 1fr;
  }
}

.post-row__media{
  display: block;
  height: 180px;
  background: rgba(0,0,0,.04);
}

@media (max-width: 980px){
  .post-row__media{
    height: 200px;
  }
}

.post-row__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-row__placeholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
}

.post-row__body{
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-row__title{
  margin: 0;
  font-size: 18px;
}

.post-row__title a{
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.post-row__title a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-row__excerpt{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.post-row__excerpt p{
  margin: 0;
}

.post-row__more{
  margin-top: auto;
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
}

.post-row__more:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Advantages (compact, industrial) ===== */
.advantages{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 980px){
  .advantages{
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.adv{
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 14px;
  row-gap: 6px;

  padding: 14px 0;
  border-top: 1px solid var(--line);
}


.adv-icon{
  grid-row: span 2;
  width: 24px;
  height: 24px;
  opacity: .85;
}

.adv h3{
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.adv p{
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}


/* ===== Responsive table → cards ===== */
@media (max-width: 768px){

  .responsive-table thead{
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td{
    display: block;
    width: 100%;
  }

  .responsive-table tr{
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #fff;
  }

  .responsive-table td{
    padding: 8px 0;
    border: 0;
    font-size: 14px;
    text-align: left;            /* КЛЮЧЕВО */
  }

  .responsive-table td::before{
    content: attr(data-label);
    display: block;              /* label сверху */
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 2px;
  }
  
  .responsive-table tbody tr:first-child{
    display: none;
  }
}