/*
 * Верхняя страница раздела «Электроэрозионные станки» — только она.
 *
 * Страница особенная: подбор станков по параметрам на jQuery и Isotope
 * (assets/js/elscript.js) и вёрстка, собиравшаяся в несколько заходов
 * на заре flex и grid. Карточки здесь называются так же, как на
 * страницах подразделов, но устроены иначе, поэтому стили держим
 * отдельно и ни с чем не объединяем.
 */

/* Своя базовая типографика. На остальных страницах база 18px, здесь
   вёрстка считалась от 16px — все высоты карточек и сетки завязаны
   на неё. Оставляем как было. */
body {
  font-size: 16px;
}


strong,
b {
  font-weight: normal;
}

.section-head,
.section-subhead {
  font-size: 30px;
  text-align: center;
  margin: 20px 0 10px;
}

.section-subhead {
  font-size: 22px;
}

/* Просто колонка по центру. Был белый лист с тенью, наползавший снизу
   на полосу с крошками (отрицательные поля, top, box-shadow) — приём той
   поры, когда страница стояла на тёплом #f4f1ea и лист надо было от неё
   отделить. Фон стал белым, отделять не от чего, а наползание делало
   полосу с крошками на старых страницах выше, чем на новых. */
.wrapper {
  max-width: var(--wrap);
  margin: auto;
}

.product-head h1 {
  font-size: 7vw;
  text-align: center;
  padding: 40px 0 0;
}

.product-head hr {
  margin-top: 5px;
}

@media (min-width: 768px) {
  .erosion h1 {
    font-size: 46px;
    text-align: center;
    padding: 40px 0 0;
    grid-column: 1/3;
    grid-row: 1/2;
  }
}

.card-wrapper-head {
  position: absolute;
  left: -800px;
  font-size: 0;
}

.general-card {
  background-size: cover;
  min-height: 350px;
}

.general-card .icon a {
  position: absolute;
  left: 85%;
  bottom: 30.7%;
  background: #17bebb;
  color: #fff;
  font-size: 1.3em;
  font-weight: 700;
  padding: 15px;
  border-radius: 50%;
  box-shadow: 0 5px 30px 1px #17bebb;
}

.general-card .text,
.general-card a.btn {
  text-transform: uppercase;
  letter-spacing: .1em;
}

.general-card .text {
  color: #212129;
  text-align: left;
  font-weight: 400;
  margin: 5px 30px;
}

.general-card a.btn {
  display: block;
  background: #ef3e36;
  color: #fff;
  position: relative;
  text-align: center;
  padding: 10px;
  transition: 250ms;
}

.general-card a.btn:hover {
  background: #17bebb;
  transition: 250ms;
}

.general-card,
.general-card-wrapper {
  display: flex;
  flex-direction: column;
}

.general-card-wrapper {
  margin: 10px auto;
  max-width: 360px;
}

.general-card {
  color: #fff;
  justify-content: flex-end;
  box-shadow: var(--shadow);
  max-width: 350px;
  margin: 0 10px 20px;
  transition: 250ms;
}

.general-card-image {
  background: #fff;
  align-self: center;
  padding-top: 15px;
  width: 100%;
}

.general-card-image img {
  display: block;
  margin: auto;
  width: 100%;
  object-fit: contain;
  padding: 3% 0 0;
}

.general-card-text {
  background: #bd0c18;
  text-align: center;
  padding: 10px 0;
  border-radius: 0 0 .3em .3em;
}

.general-card-text strong {
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  color: #eee;
  padding: 10px 0;
}

.general-card a,
input {
  color: inherit;
}

@media (min-width: 560px) {
  .general-card-wrapper {
    max-width: var(--wrap);
    justify-content: space-evenly;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .general-card {
    width: 40%;
    min-width: 250px;
    border-radius: .3em;
  }

  .general-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-.1rem);
    transition: 250ms;
  }
}

@media (min-width: 992px) {
  .general-card-wrapper {
    max-width: var(--wrap);
    justify-content: space-evenly;
    flex-direction: row;
    margin-top: 60px;
  }

  .general-card {
    width: 40%;
    min-width: 250px;
  }
}

.class-edm {
  padding: 30px;
}

.erosion {
  padding: 0 10px;
}

.erosion p {
  padding: .25em 2em;
}

.erosion section {
  padding: 0 0 30px;
}

.article-head {
  font-size: 36px;
  text-align: center;
  margin-bottom: 0;
}

input {
  margin: 0;
  font: inherit;
  line-height: inherit;
}

.selection {
  margin-right: auto;
  margin-left: auto;
  max-width: var(--wrap);
  min-height: 600px;
}

.col-sm-4 {
  position: relative;
  min-height: 1px;
  padding: 5px 0 0 30px;
  margin-bottom: 20px;
}

@media (min-width: 1024px) {
  .row {
    display: grid;
    max-width: 1150px;
    grid-template-columns: auto auto auto;
    grid-template-rows: auto auto;
    margin: 0 auto 20px;
  }

  .col-sm-4 {
    padding: 0 0 0 15px;
  }
}

/* Кнопки фильтра.
 *
 * В старой вёрстке на них висело «btn btn-default btn-filter»: первые два —
 * остатки bootstrap, третий слушает elscript.js. Bootstrap-классы убраны из
 * разметки: в base.css свой .btn для кнопки запроса, он центрирует себя через
 * left:50% + translate и раскладывал фильтр по диагонали. Внешний вид
 * bootstrap-кнопок перенесён сюда на .btn-filter — выглядят как раньше,
 * а .btn с других страниц их больше не задевает.
 *
 * Ниже .wa снимает фиксированную ширину у кнопок с длинными подписями
 * («Проволочные», «Прошивные»), поэтому идёт после .btn-filter.
 */
.btn-filter {
  display: inline-block;
  width: 60px;
  padding: 5px;
  margin-bottom: 0;
  background: none;
  border: 1px solid var(--c-blue);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
}

.btn-filter:focus,
.btn-filter:hover {
  background: #d3e7f8;
  color: #222;
  text-shadow: 0 1px rgba(255, 255, 255, .5);
  text-decoration: none;
}

.btn-filter.is-checked,
.btn-filter:active {
  background: var(--c-blue);
  color: #fff;
}

.btn-filter:active {
  outline: 0;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}

.btn-group {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.btn-group > .btn-filter {
  position: relative;
  float: left;
}

.btn-group > .btn-filter:active,
.btn-group > .btn-filter:focus,
.btn-group > .btn-filter:hover {
  z-index: 2;
}

.btn-group .btn-filter + .btn-filter {
  margin-left: -1px;
}

.btn-group > .btn-filter:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.btn-group > .btn-filter:first-child {
  margin-left: 0;
}

.btn-group > .btn-filter:first-child:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-group > .btn-filter:last-child:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.wa {
  width: auto;
}

.filter-min {
  padding-right: 12px;
}

.filter-max {
  padding-left: 8px;
}

.filter-first {
  padding-right: 8px;
}

.slider {
  display: inline-block;
  vertical-align: middle;
  position: relative;
}

.slider.slider-horizontal {
  width: 210px;
  height: 20px;
}

.slider.slider-horizontal .slider-track {
  height: 10px;
  width: 100%;
  margin-top: -5px;
  top: 50%;
  left: 0;
}

.slider.slider-horizontal .slider-selection,
.slider.slider-horizontal .slider-track-high,
.slider.slider-horizontal .slider-track-low {
  height: 100%;
  top: 0;
  bottom: 0;
}

.slider.slider-horizontal .slider-handle,
.slider.slider-horizontal .slider-tick {
  margin-left: -10px;
}

.slider .tooltip.top {
  margin-top: -36px;
  margin-left: -20px;
}

.slider-track {
  background: linear-gradient(to bottom, #f5f5f5 0, #f9f9f9 100%) repeat-x;
  position: absolute;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
  border-radius: 4px;
}

.slider-selection,
.slider-track-high,
.slider-track-low {
  position: absolute;
  box-sizing: border-box;
  border-radius: 4px;
}

.slider-selection {
  background: linear-gradient(to bottom, #f9f9f9 0, #f5f5f5 100%) repeat-x;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
}

.slider-track-high,
.slider-track-low {
  background: 0 0;
}

.slider-handle {
  background: linear-gradient(to bottom, #17609b 0, var(--c-blue-dark) 100%) repeat-x var(--c-blue);
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
  border: 0 solid transparent;
}

.slider-handle.round {
  border-radius: 50%;
}

.brl,
.btn-group .brr {
  border-radius: 4px;
}

.row-grid,
blockquote {
  position: relative;
}

@media (min-width: 300px) {
  .grid {
    max-width: 300px;
    margin: auto;
  }
}

@media (min-width: 600px) {
  .grid {
    max-width: 600px;
    margin: auto;
  }
}

@media (min-width: 900px) {
  .grid {
    max-width: 900px;
    margin: auto;
  }
}

/* Не var(--wrap): у сетки подбора своя лестница, кратная 300px — ширина
   ячейки Isotope 277 + 13 отступа. При 1350 получалось те же четыре
   колонки и 170px пустоты справа, пятая не влезает. Сетка уже обёртки
   и стоит по центру. */
@media (min-width: 1200px) {
  .grid {
    max-width: 1200px;
    margin: auto;
  }
}

.grid:after {
  content: '';
  display: block;
  clear: both;
}

.item {
  width: 277px;
  height: 380px;
  margin: 5px 0 5px 13px;
  float: left;
  text-align: center;
}

.sliders {
  padding: 15px 0 30px;
}

.filter-section .filter-label {
  display: block;
  font-weight: 700;
}

.bootstrap-slider .slider-selection {
  background: #2175b0;
}

.card {
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  max-width: 350px;
  transition: 250ms;
  flex-wrap: nowrap;
  justify-content: flex-end;
  border-radius: .3em;
}

.card-image {
  background: #fff;
  align-self: center;
  padding-top: 15px;
  width: 100%;
  border-radius: .3em;
}

.card-image img {
  display: block;
  margin: auto;
  padding: .5em;
  height: 150px;
  object-fit: contain;
}

.card-text {
  background: #eee;
  display: flex;
  flex-direction: column;
  color: var(--c-blue-muted);
  min-height: 212px;
}

.card a {
  color: inherit;
}

.card-text h3 {
  font-size: 1em;
  font-weight: 500;
  line-height: 1.4;
  margin: .5em .25em;
  color: var(--c-blue-deep);
}

.card-text h3 strong {
  font-weight: 700;
  line-height: 1.6;
}

@media (min-width: 540px) {
  .card-wrapper {
    max-width: var(--wrap);
    justify-content: space-evenly;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-.1rem);
    transition: 250ms;
  }
}

@media (min-width: 992px) {
  .card-wrapper {
    max-width: var(--wrap);
    justify-content: space-evenly;
    flex-direction: row;
  }
}

.card-footer {
  background: #bd0c18;
  font-weight: 500;
  color: #fff;
  padding: 5px 0 8px;
  align-self: end;
  width: 100%;
  border-radius: 0 0 .3em .3em;
}

.card-footer:hover,
.card-title:hover {
  text-decoration: underline;
}

/* Было объявлено без класса и доставалось каждой таблице на странице,
   включая статью внизу. Осталось за мини-спекой в карточке станка. */
.machine-table {
  font-size: .875em;
  border-collapse: collapse;
  border-spacing: 0;
  margin: auto auto .5rem;
  padding-left: 3px;
  overflow: hidden;
  text-align: left;
}

.machine-table td {
  padding-left: 5px;
}

.slider .tooltip-inner {
  white-space: nowrap;
  max-width: none;
}

.tooltip.top .tooltip-arrow {
  bottom: 0;
  left: 50%;
  margin-left: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000;
}

.tooltip {
  position: absolute;
  z-index: 1070;
  display: block;
  font-size: 12px;
  line-height: 1.42857143;
  filter: alpha(opacity=0);
  opacity: 0;
}

.tooltip.in {
  filter: alpha(opacity=90);
  opacity: .9;
}

.tooltip.top {
  padding: 5px 0;
  margin-top: -3px;
}

.tooltip-inner {
  background: #000;
  max-width: 200px;
  padding: 3px 8px;
  color: #fff;
  text-align: center;
  border-radius: 4px;
}

.tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}

.image-fl,
.image-fl20 {
  float: left;
  margin: .5rem 1rem .5rem 2rem;
  width: 33%;
}

.image-fl20 {
  width: 20%;
}

.image-fr {
  float: right;
  margin: .5rem 2rem .5rem 1rem;
  width: 50%;
}

.image-fl img,
.image-fl20 img,
.image-fr img,
.machine-table {
  width: 100%;
  height: 100%;
}

@media (max-width: 540px) {
  .image-fl,
  .image-fl20,
  .image-fr {
    float: none;
    width: 90%;
    margin: auto;
  }
}

blockquote {
  margin: 1rem 2rem;
  padding: 30px 30px 30px 60px;
  border-left: .5rem solid var(--c-blue-rule);
  background: #eee;
  font-family: sans-serif;
}

blockquote:before {
  content: "\201C";
  color: var(--c-blue-focus);
  font-size: 70px;
  position: absolute;
  left: 15px;
  top: 5px;
}

blockquote p {
  font-style: italic;
  margin-top: 0;
}

cite {
  padding-top: 10px;
}

.footnotes {
  border-top: 1px solid silver;
  font-size: 80%;
}

.wrapper-btn-white-round {
  display: flex;
  justify-content: flex-end;
  margin: 0 10px;
}

.btn-white-round {
  width: 350px;
  padding: .5em 1em;
  margin: 0 0 20px;
  background: #fff;
  color: var(--c-blue);
  border: 2px solid var(--c-blue);
  border-radius: 3em;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  transition-duration: .3s;
  cursor: pointer;
}

.btn-white-round:hover {
  background: var(--c-blue);
  color: #fff;
}

.btn-white-round:active,
.btn-white-round:focus {
  background: var(--c-blue-dark);
  color: #fff;
  box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, .4);
}

.wrapper-btn-white-clear-1,
.wrapper-btn-white-clear-2 {
  width: 350px;
  height: 70px;
  margin: 0 10px;
}

@media screen and (max-width: 1130px) {
  .wrapper-btn-white-clear-1 {
    display: none;
  }
}

@media screen and (max-width: 760px) {
  .wrapper-btn-white-clear-2 {
    display: none;
  }

  .wrapper-btn-white-round {
    margin: 0 40px;
  }
}

@media screen and (max-width: 560px) {
  .wrapper-btn-white-round {
    margin: 0 10px;
  }
}

