/* ========================================================== */
/* Загальні налаштування                                      */
/* ========================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;

  padding:
    28px
    28px
    40px
    278px;

  font-family:
    Arial,
    sans-serif;

  background: #20242a;
  color: #ffffff;
}

/*
 * ==========================================================
 * Приховані елементи.
 * ==========================================================
 */
[hidden] {
  display: none !important;
}

/* ========================================================== */
/* Загальна навігація                                         */
/* ========================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  background: #181c21;
  border-right:
    1px
    solid
    #3e4650;

  z-index: 1000;
}

.site-nav-title {
  margin:
    0
    8px
    26px
    8px;

  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.site-nav-link {
  display: block;
  margin-bottom: 5px;
  padding: 11px 12px;
  border-radius: 7px;
  color: #d8dde3;
  text-decoration: none;
}

.site-nav-link:hover {
  background: #303741;
  color: #ffffff;
}

.site-nav-link.active {
  background: #3d4652;
  color: #ffffff;
  font-weight: bold;
}

/* ========================================================== */
/* Основний вміст                                             */
/* ========================================================== */
.site-content {
  max-width: 1250px;
  margin: 0 auto;
}

.site-header {
  margin-bottom: 28px;
}

.site-header h1 {
  margin:
    0
    0
    8px
    0;

  font-size: 30px;
}

.site-header p {
  margin: 0;
  color: #bfc6ce;
  line-height: 1.5;
}


/* ========================================================== */
/* Картки розділів                                            */
/* ========================================================== */
.section-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(280px, 1fr)
    );

  gap: 16px;
}

.section-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 20px;
  border:
    1px
    solid
    #4d5560;
  border-radius: 9px;
  background: #282f38;
}

.section-card h2 {
  margin:
    0
    0
    12px
    0;
  font-size: 21px;
}

.section-card p {
  margin:
    0
    0
    22px
    0;

  color: #c7ccd2;
  line-height: 1.5;
}

.section-card-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 9px 16px;
  border-radius: 6px;
  background: #3b4654;
  color: #ffffff;
  text-decoration: none;
}

.section-card-link:hover {
  background: #536173;
}

/* ========================================================== */
/* Mobile                                                     */
/* ========================================================== */
.site-nav-toggle {
  display: none;
}

.site-nav-backdrop {
  display: none;
}

/* ========================================================== */
/* Вкладені об'єкти Diagnostics                               */
/* ========================================================== */

.site-nav-sub {
  margin:
    2px
    0
    12px
    18px;

  padding-left: 10px;
  border-left:
    1px
    solid
    #39414a;
}

.site-nav-sublink {
  display: block;
  margin-bottom: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #aeb6bf;
  font-size: 14px;
  text-decoration: none;
}


.site-nav-sublink:hover {
  background: #2b323b;
  color: #ffffff;
}


.site-nav-sublink.active {
  background: #353e49;
  color: #ffffff;
  font-weight: bold;
}


/* ========================================================== */
/* Поточний користувач                                        */
/* ========================================================== */
.site-nav-user {
  margin-top: auto;
  padding:
    16px
    10px
    4px
    10px;

  border-top:
    1px
    solid
    #39414a;
}

.site-nav-user-label {
  margin-bottom: 5px;
  color: #939ca7;
  font-size: 12px;
}

.site-nav-user-name {
  overflow: hidden;
  color: #e7eaee;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav-logout {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid #59616c;
  border-radius: 6px;
  background: #282f38;
  color: #e7eaee;
  font-size: 13px;
  text-decoration: none;
}


.site-nav-logout:hover {
  background: #3b4654;
  color: #ffffff;
}

/* ========================================================== */
/* Перемикач мови                                             */
/* ========================================================== */
.site-nav-language {
  margin-top: auto;

  padding:
    16px
    10px
    4px
    10px;

  border-top:
    1px
    solid
    #39414a;
}

.site-nav-language-label {
  display: block;
  margin-bottom: 8px;
  color: #939ca7;
  font-size: 12px;
}

.site-nav-language-select {
  width: 100%;
  padding: 8px 9px;
  border:
    1px
    solid
    #59616c;
  border-radius: 6px;
  background: #282f38;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 768px) {

  body {
    padding:
      74px
      14px
      28px
      14px;
  }

  .site-nav {
    width:
      min(
        82vw,
        300px
      );

    padding-top: 74px;

    transform:
      translateX(-100%);

    transition:
      transform
      0.2s
      ease;

    box-shadow:
      4px
      0
      12px
      rgba(0, 0, 0, 0.35);
  }

  .site-nav.open {
    transform:
      translateX(0);
  }


  .site-nav-toggle {
    position: fixed;

    top: 12px;
    left: 12px;

    display: block;

    padding: 9px 14px;

    border:
      1px
      solid
      #59616c;

    border-radius: 7px;

    background: #303741;
    color: #ffffff;

    font-size: 16px;

    cursor: pointer;

    z-index: 1100;
  }


  .site-nav-backdrop.visible {
    position: fixed;

    inset: 0;

    display: block;

    background:
      rgba(0, 0, 0, 0.55);

    z-index: 900;
  }


  .site-header h1 {
    font-size: 25px;
  }


  .section-grid {
    grid-template-columns: 1fr;
  }

}

/*
 * ==========================================================
 * Навігаційна картка.
 *
 * Використовується для переходів між розділами,
 * категоріями, виробниками та моделями обладнання.
 * Уся поверхня картки працює як посилання.
 * ==========================================================
 */

.section-card-nav {
  display: flex;
  flex-direction: column;

  color: inherit;
  text-decoration: none;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}


.section-card-nav:hover {
  background: #303945;
  border-color: #697482;

  transform: translateY(-2px);
}


.section-card-nav:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/*
 * ==========================================================
 * Компактна навігаційна картка.
 *
 * Використовується на вкладених рівнях Help:
 * категорія → виробник → модель.
 * Висота визначається фактичним вмістом.
 * ==========================================================
 */

.section-card-nav-compact {
  min-height: 0;
}