﻿/* CSS Document */
* {
  padding: 0;
  margin: 0;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
}

body {
  overflow-x: hidden;
  min-width: 320px;
  background-color: #fff;
  --grey: #DCDCDC;
  /*цвет выделения*/
  --grey2: #C0C0C0;
  /*цвет не выбранного текста*/
  --dark: #000;
  /*цвет текста*/
  --color1: #e06149;
  --color2: #fff;
  --red: #ff0000;
  --fff: #fff;

  --bmiColor1: rgb(51, 204, 255);
  --bmiColor2: rgb(6, 160, 177);
  --bmiColor3: rgb(0, 153, 0);
  --bmiColor4: rgb(255, 204, 0);
  --bmiColor5: rgb(255, 102, 102);
  --bmiColor6: #ff00ff;
  --bmiColor7: #9900FF;

}

.display_none {
  display: none;
}

.display_block {
  display: block;
}

h1 {
  margin-top: 50px;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
}

h2 {
  margin-top: 20px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

h3 {
  margin-top: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

h4 {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
}


p {
  margin-top: 10px;
  font-weight: normal;
}

.form_bmi {
  display: flex;
  justify-content: center;
}

ul {
  margin-left: 20px;
  margin-top: 10px;
}

ol {
  margin-left: 20px;
  margin-top: 10px;
}

ol li {
  margin-top: 10px;
}

.txt_ul {
  margin-left: 20px;
  margin-top: 10px;
}

.txt_bold {
  font-weight: bold
}

.txt_ml {
  margin-left: 20px;
}


/* start menu */
.hamburger {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger:hover {
  opacity: 0.8;
}

.hamburger__line {
  width: 30px;
  height: 3px;
  background: var(--dark);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: var(--red);
}

.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: var(--red);
}

.nav-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background: var(--fff);
  transform: translateX(-100%); /* Полностью скрываем за экраном */
  transition: all 0.3s ease;
  z-index: 99;
  padding: 70px 20px 20px;
  box-sizing: border-box; /* Учитываем padding в общей ширине */
  overflow-y: auto; /* Добавляем вертикальную прокрутку */
}

.nav-menu.active {
  transform: translateX(0); /* Показываем меню */
  box-shadow: 2px 0 15px rgba(0,0,0,0.1);
}

.nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu ul li a {
  display: block;
  padding: 10px;
  color: var(--dark);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-menu ul li a:hover {
  background: #f5f5f5;
  padding-left: 15px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 98;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* end menu */

.calculator_conteyner {
  width: 400px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 10px;
  padding: 20px;
  border: 2px solid var(--color1);
  border-radius: 10px;
}

.conteyner_item {
  display: grid;
  height: 50px;
  grid-template-columns: 80px 210px 100px;
  grid-template-rows: 50px;
}

.conteyner_bloc_1 {}

.conteyner_bloc_2 {}

.text_item {
  font-size: 18px;
  margin: 5px 20px 20px 0;
  color: var(--dark);
}

/* Input text */
.conteyner_bloc_2 .input_item {
  width: 200px;
  height: 35px;
  text-align: left;
  font-size: 14px;
  border-block-width: 1px;
  border-color: var(--grey);
  border-radius: 10px;
  padding: 10px;
}

.conteyner_bloc_2 .input_item:focus {
  background-color: var(--color2);
  border-color: var(--dark);
  outline: 0;
  box-shadow: 0 0 0 0.2rem var(--color2);
}

.conteyner_bloc_2 .input_item_min {
  width: 98px;
  height: 35px;
  text-align: left;
  font-size: 14px;
  border-block-width: 1px;
  border-color: var(--grey);
  border-radius: 10px;
  padding: 10px;
}

.conteyner_bloc_2 .input_item_min:focus {
  background-color: var(--color2);
  border-color: var(--dark);
  outline: 0;
  box-shadow: 0 0 0 0.2rem var(--color2);
}

/* cm - ft kg - lbg */
.conteyner_radio_units {
  font-size: 12px;
  color: var(--grey2);
  display: flex;
  justify-content: space-evenly;
  margin-left: 10px;
  letter-spacing: 0.5px;
}

.radio_units input[type="radio"] {
  display: none;
}

.radio_units label {
  display: inline-block;
  padding: 5px 5px;
  cursor: pointer;
  background-size: contain;
  border-radius: 20%;
  margin-left: 10px;
}

.radio_units input[type="radio"]:checked+label {
  background-color: var(--grey);
  color: var(--dark);
}

.radio_units label:hover {
  background-color: var(--grey);
  color: var(--dark);
}

/* Gender */
.conteyner_gender {
  font-size: 14px;
  display: flex;
  justify-content: space-evenly;
  margin-right: 10px;
  letter-spacing: 0.5px;
}

.radio_gender_man input[type="radio"] {
  display: none;
}

.radio_gender_man label {
  display: inline-block;
  padding: 5px 5px;
  cursor: pointer;
  background-size: contain;
  border-radius: 20%;
  width: 40px;
  height: 40px;
  background-image: url(img/man-gray.svg);
}

.radio_gender_man input[type="radio"]:checked+label {
  background-color: var(--grey);
  background-image: url(img/man-blek.svg);
}

.radio_gender_man label:hover {
  background-color: var(--grey);
}

.radio_gender_woman input[type="radio"] {
  display: none;
}

.radio_gender_woman label {
  display: inline-block;
  padding: 5px 5px;
  cursor: pointer;
  background-size: contain;
  border-radius: 20%;
  width: 40px;
  height: 40px;
  background-image: url(img/woman-gray.svg);
}

.radio_gender_woman input[type="radio"]:checked+label {
  background-color: var(--grey);
  background-image: url(img/woman-blek.svg);
}

.radio_gender_woman label:hover {
  background-color: var(--grey);
}


.conteyner_submit {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

/* Button */
.calc-submit {
  border: 1px solid var(--color1);
  background-color: var(--color1);
  color: var(--color2);
  border-radius: 10px;
  padding: 10px;
  min-height: 20px;
  min-width: 120px;
  cursor: pointer;
  transition: 0.5s;

}

.calc-submit:hover {
  background-color: var(--color2);
  color: var(--color1);
  ;

}

.calc-reset {
  background-color: var(--color2);
  border: 1px solid var(--grey2);
  color: var(--grey2);
  border-radius: 10px;
  padding: 10px;
  min-height: 20px;
  min-width: 120px;
  cursor: pointer;
  transition: 0.5s;
}

.calc-reset:hover {
  background-color: var(--grey2);
  color: var(--color2);

}


.bmi_rezult {
  width: 100%;
  height: 40px;
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
}

.bmi_rezult_normal {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
}

.contener_bmi_img {
  width: 100%;
  background-color: #fff;
}

.line_bmi_img {
  width: 100%;
  display: flex;
}

.line_bloc_insufficiency {
  width: 30%;
  height: 40px;
  font-size: 10px;
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--bmiColor2);
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}

.line_bloc_norm {
  width: 20%;
  height: 40px;
  font-size: 10px;
  color: #fff;
  font-weight: bold;
  background-color: var(--bmiColor3);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.line_bloc_excess {
  width: 20%;
  height: 40px;
  font-size: 10px;
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--bmiColor4);
}

.line_bloc_obesity {
  width: 30%;
  height: 40px;
  font-size: 10px;
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--bmiColor5);
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
}

.contener_arrow {
  width: 100%;
}

.arrow_bmi {
  font-size: 10px;
  font-weight: bold;
}

.arrow {}

.bmi_img_weight {
  width: 100%;
  display: flex;
}

.bloc_insufficiency_weight {
  width: 35%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  justify-content: right;
}

.bloc_norm_weight {
  width: 22%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  justify-content: right;
}

.bloc_excess_weight {
  width: 21%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  justify-content: right;
}

.img_chart {
  margin: 0 auto;
  width: 100%;
}

.img_chart img {
  width: 90%;
  display: block;
  margin: 0 auto;
}

@media screen and (max-width: 460px) {

  .calculator_conteyner {
    width: 350px;
  }

  .conteyner_item {
    grid-template-columns: 80px 160px 100px;
  }

  .conteyner_bloc_2 .input_item {
    width: 160px;
    height: 35px;
  }

  .conteyner_bloc_2 .input_item_min {
    width: 160px;
    margin-bottom: 5px;
  }

  .img_chart {
    display: none;
  }

}


@media screen and (max-width: 410px) {
  .calculator_conteyner {
    width: 300px;
  }

  .conteyner_item {
    grid-template-columns: 80px 90px 80px;
  }

  .conteyner_bloc_2 .input_item {
    width: 90px;
    height: 35px;
  }

  .conteyner_bloc_2 .input_item_min {
    width: 90px;
    margin-bottom: 5px;
  }

}

@media screen and (max-width: 360px) {
  .calculator_conteyner {
    width: 265px;
  }
}

@media screen and (max-width: 330px) {
  .calculator_conteyner {
    width: 250px;
  }

  .conteyner_submit {
    flex-direction: column;
  }

  .calc-reset {
    margin-top: 15px;
  }

}


.text {
  max-width: 1100px;
  display: block;
  margin: 10px auto;
  padding: 0 10px;
  text-align: justify;
}

.contener_table {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px auto;
  max-width: 1000px;
}

.bmi_info_table {
  width: 300px;
  min-width: 250px;
  margin: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--box);
  border-radius: 10px;
  color: #ffffff;
}

.text_bmi_table {
  text-align: center;
  font-weight: bold;
  padding: 5px;
}


.contentBlock {
  border: 2px solid var(--color1);
  border-radius: 30px;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  padding: 20px;
  margin: 20px;
}


#toggleButton1 {
  display: none;
}

#contentBlock1 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;

}

#toggleButton1:checked~#contentBlock1 {
  max-height: 500px;
  /* Замените на желаемую высоту блока при раскрытии */
  transition: max-height 0.5s ease-out;
}

#toggleButton2 {
  display: none;
}

#contentBlock2 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;

}

#toggleButton2:checked~#contentBlock2 {
  max-height: 500px;
  /* Замените на желаемую высоту блока при раскрытии */
  transition: max-height 0.5s ease-out;
}

#toggleButton3 {
  display: none;
}

#contentBlock3 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;

}

#toggleButton3:checked~#contentBlock3 {
  max-height: 500px;
  /* Замените на желаемую высоту блока при раскрытии */
  transition: max-height 0.5s ease-out;
}

#toggleButton4 {
  display: none;
}

#contentBlock4 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;

}

#toggleButton4:checked~#contentBlock4 {
  max-height: 500px;
  /* Замените на желаемую высоту блока при раскрытии */
  transition: max-height 0.5s ease-out;
}

#toggleButton5 {
  display: none;
}

#contentBlock5 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;

}

#toggleButton5:checked~#contentBlock5 {
  max-height: 500px;
  /* Замените на желаемую высоту блока при раскрытии */
  transition: max-height 0.5s ease-out;
}

/* .table {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #ccc;
  margin: 0 auto;
}

.header,
.row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  border-bottom: 1px solid #ccc;
}

.header-item, .cell {
  flex: 1 1 25%;
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
  word-break: break-word;
  white-space: normal;
  min-width: 0;
}

.header-item {
  font-weight: bold;
  background-color: #f4f4f4;
}

.cell {
  border-right: 1px solid #ccc;
}

.cell:last-child {
  border-right: none;
}

@media (max-width: 600px) {
  .header {
      display: none;
  }

  .row {
      flex-direction: column;
      border-bottom: none;
  }

  .cell {
      flex: 1 1 100%;
      border-right: none;
      border-bottom: 1px solid #ccc;
      text-align: left;
      padding: 15px 10px 15px 40%; /* Левый отступ под заголовок * /
      position: relative;
      display: flex; /* Изменено на flex * /
      align-items: flex-start; /* Выравнивание текста по верхнему краю ячейки * /
  }

  .cell::before {
      content: attr(data-label);
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%); /* Вертикальное центрирование * /
      width: 35%;
      max-width: 35%;
      padding-right: 5px;
      white-space: nowrap; /* Не переносить текст на новую строку * /
      text-align: left;
      font-weight: bold;
      box-sizing: border-box; /* Учет padding в ширине * /
      overflow: hidden;
      text-overflow: ellipsis;
  }
} */

.table {
  display: flex;
  flex-direction: column;
  gap: 0; /* Убираем промежутки между строками */
  border: 2px solid var(--color1); /* Рамка для всей таблицы */
  border-radius: 8px; /* Закругленные углы для таблицы */
  overflow: hidden; /* Чтобы рамки внутри не выходили за пределы таблицы */
  margin-top: 20px;
}

.header, .row {
  display: flex;
  gap: 0; /* Убираем промежутки между ячейками */
}

.header-item, .cell {
  flex: 1;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--color1); /* Рамка для ячеек */
}

.header-item {
  font-weight: bold;
  background-color: #f5f5f5; /* Легкий фон для заголовков */
  border-bottom: 2px solid var(--color1); /* Более толстая рамка снизу для заголовков */
}

.cell {
  background-color: #fff; /* Белый фон для ячеек */
}

@media (max-width: 768px) {
  .header { display: none; }
  .row { 
      flex-direction: column; 
      gap: 0; /* Убираем промежутки между ячейками */
  }
  .cell {
      border: 1px solid var(--color1);
      border-top: none; /* Убираем верхнюю рамку */
      border-left: none; /* Убираем левую рамку */
      border-right: none; /* Убираем правую рамку */
      padding: 10px;
  }
  /* Убираем нижнюю рамку у последней ячейки */
  .cell:last-child {
      border-bottom: none;
  }
  /* Устанавливаем фон для первой ячейки */
  .cell:first-child {
      border-top: 1px solid var(--color1);
      background-color: #f5f5f5; /* Светло-серый фон */
      font-weight: bold; /* Жирный шрифт для выделения */
  }
  .cell::before {
      content: attr(data-label);
      font-weight: bold;
      display: block;
      margin-bottom: 5px;
      color: #333;
  }
}