:root {
  --color-black: #353748;
  --color-light-gray: #EFF1F3;
  --color-medium-gray: #D0CDCD;
  --color-red: #EB112A;
  --color-dark-gray: #5E5E5E;
}

#dynamic-material-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}

#dynamic-material-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

#dynamic-material-content .materials__btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 64px;
  transition: transform 0.3s ease;
}

#dynamic-material-content .materials__btn {
  background-color: white;
  border: none;
  color: var(--color-black);
  padding: 24px 13px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  gap: 24px;
  position: relative;
  white-space: normal;
  width: 198px;
  height: 228px;
  transition: 0.5s;
}

#dynamic-material-content .materials__icon {
  max-height: 60px;
}

#dynamic-material-content .materials__btn:hover {
  transform: translateY(-5px);
}

#dynamic-material-content .materials__btn--active .materials__top-left-corner,
#dynamic-material-content .materials__btn--active .materials__top-right-corner,
#dynamic-material-content .materials__btn--active .materials__bottom-left-corner,
#dynamic-material-content .materials__btn--active .materials__bottom-right-corner {
  display: block;
}

#dynamic-material-content .materials__top-left-corner,
#dynamic-material-content .materials__top-right-corner,
#dynamic-material-content .materials__bottom-left-corner,
#dynamic-material-content .materials__bottom-right-corner {
  position: absolute;
  display: none;
  background-color: var(--color-red);
}

#dynamic-material-content .materials__top-left-corner {
  width: 22px;
  height: 8px;
  top: 0;
  left: 0;
}

#dynamic-material-content .materials__box {
  background-color: white;
}

#dynamic-material-content .materials__top-left-corner::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 22px;
  top: 0;
  left: 0;
  background-color: var(--color-red);
}

#dynamic-material-content .materials__bottom-left-corner {
  width: 22px;
  height: 8px;
  bottom: 0;
  left: 0;
}

#dynamic-material-content .materials__bottom-left-corner::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 22px;
  bottom: 0;
  left: 0;
  background-color: var(--color-red);
}

#dynamic-material-content .materials__top-right-corner {
  width: 22px;
  height: 8px;
  top: 0;
  right: 0;
}

#dynamic-material-content .materials__top-right-corner::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 22px;
  top: 0;
  right: 0;
  background-color: var(--color-red);
}

#dynamic-material-content .materials__bottom-right-corner {
  width: 22px;
  height: 8px;
  bottom: 0;
  right: 0;
}

#dynamic-material-content .materials__bottom-right-corner::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 22px;
  bottom: 0;
  right: 0;
  background-color: var(--color-red);
}

.materials__arrow {
  display: none;
  width: 40px;
  height: 40px;
  background-color: var(--color-red);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  margin-top: 24px;
}

.materials__arrow .materials__arrow-svg {
  height: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#dynamic-material-content .materials__btn--active + .materials__arrow {
  display: block;
}

.materials__box {
  padding: 40px 24px;
  background-color: white;
  border: solid 5px var(--color-red);
}

#dynamic-material-wrapper .definition-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

#dynamic-material-wrapper .materials__image {
  align-self: center;
  padding: 24px 28px;
}

#dynamic-material-wrapper .materials__image img {
  height: 100px;
  max-width: 80px;
}

#dynamic-material-wrapper .materials__content__block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#dynamic-material-wrapper .materials__content__mobile {
  display: none;
}

#dynamic-material-wrapper .materials__title {
  font-size: 24px;
  font-weight: bold;
  padding: 0;
  color: var(--color-black);
}

#dynamic-material-wrapper .materials__text {
  font-size: 18px;
  color: var(--color-black);
  line-height: 1.5;
}


#dynamic-material-wrapper .custom-select {
  background-color: white;
  border: none;
  width: 100%;
  position: relative;
margin-bottom:40px;
display: none;
}

#dynamic-material-wrapper .custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: white;
  cursor: pointer;
  font-size: 16px;
  position: relative;
  transition: background-color 0.3s ease;
  width: 100%;
}

#dynamic-material-wrapper .custom-select-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

#dynamic-material-wrapper .custom-select-icon {
  width: 40px;
  height: 40px;
}

#dynamic-material-wrapper .custom-select-text {
  font-size: 16px;
  color: var(--color-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dynamic-material-wrapper .custom-select-arrow-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

#dynamic-material-wrapper .custom-select.open .custom-select-arrow-icon {
  transform: rotate(180deg);
}

#dynamic-material-wrapper .custom-select-options {
  display: none;
  position: absolute;
  background-color: white;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--color-medium-gray);
  z-index: 99;
  top: 100%;
  left: 0;
}

#dynamic-material-wrapper .custom-select-option {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#dynamic-material-wrapper .custom-select-option:hover {
  background-color: var(--color-medium-gray);
}

#dynamic-material-wrapper .custom-select-option img {
  width: 40px;
  height: 40px;
  margin-right: 16px;
}

#dynamic-material-wrapper .custom-select-option--active {
  border: 3px solid var(--color-red);
background-color:white;
}

@media only screen and (max-width: 1400px) {
#dynamic-material-wrapper .custom-select {
  display:block;
}
  #dynamic-material-wrapper #material-select {
      display: block;
      width: 100%;
      padding: 10px;
      font-size: 16px;
      margin-bottom: 20px;
      background-color: white;
  }

  #dynamic-material-content {
    justify-content: center;
  }

  #dynamic-material-content .materials__btn-wrapper {
    margin: 22px 100%;
  }

  #dynamic-material-wrapper .materials__content__block {
    display: none;
  }

  #dynamic-material-wrapper .materials__content__mobile,
  #dynamic-material-wrapper .materials__content__mobile .materials__box--active {
    display: block!important;
  }

  #dynamic-material-wrapper .materials__content__mobile .materials__box--active {
    margin-top: 60px;
  }
 
  #dynamic-material-wrapper .materials__content__block .materials__box--active {
    display: none;
  }
}

@media only screen and (max-width: 600px) {

  #dynamic-material-wrapper .definition-wrapper {
      flex-direction: column;
      align-items: center;
      text-align: center;
  }
#dynamic-material-wrapper .materials__image {
  padding: 0;
}

  #dynamic-material-wrapper .materials__image img {
      height:50px;
  width:auto;
      margin-bottom: 0;
  }
#dynamic-material-wrapper .custom-select-icon,
#dynamic-material-wrapper .custom-select-option img{
  width: 28px;
  height: 28px;
}
}

@media only screen and (max-width: 508px) {
#dynamic-material-wrapper .custom-select-text{
  max-width:176px;
}
}