/* #region HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__warning {
  padding-block: 8px;
  background: #f00;
  color: #fff;
  text-align: center;

  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}
.header__bg--one {
  background: #c60304;
}
.header__bg--gray {
  background: #f6f4f4;
}

.header__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 14px;
  color: #fff;
}
.header__menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  font-size: 16px;
  border-inline: 2px solid #a40000;
  transition: background 0.3s;

  &:hover {
    background: #a40000;
  }
}

.header__actions-block {
  display: flex;
  align-items: center;

  .header__action {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    text-transform: uppercase;
    transition: background 0.3s;
    font-size: 12px;
    &:hover {
      background: #a40000;
    }
  }
}

.header__search {
  border-inline: 2px solid #a40000;
}

.header__signin {
  border-right: 2px solid #a40000;
}
.header__nav-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 8px;
  gap: 20px;
}
.header__logo {
  padding: 10px;
}
.header__nav {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding-block: 10px;
}

.header__nav-list {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  color: #f90000;
  font-size: 14px;
  font-weight: 600;
  line-height: 2.5;
  text-transform: uppercase;

  li {
    flex: 0 0 auto;

    &:nth-child(even) a {
      border-inline: none;
    }
    &:last-child a {
      border-right: 1px solid #d1d1d1;
    }
  }

  a {
    padding: 12px;
    border-inline: 1px solid #d1d1d1;
    transition: all 0.3s;

    &:hover {
      background: #a40000;
      color: #fff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
      border-color: #a40000;
    }
  }
}

@media (width < 744px) {
  .header__actions-block {
    .header__action {
      padding: 8px;
    }
  }
  .header__logo {
    padding: 0;
  }
}

/* #endregion Header */

/* #region CONTENT */

.content__tag {
  color: #767676;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;

  span {
    display: inline-flex;
    padding: 4px;
    color: #fff;
    border-radius: 5px;
    background: #c60304;
  }
}

.content__title {
  margin-bottom: 20px;
}
.content__subtitle {
  margin-bottom: 20px;
}

.content__author {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1.42;
  margin-bottom: 20px;

  img {
    margin-right: 8px;
  }

  p {
    color: #545454;
  }
}

.content__author-name {
  color: #0550c8;
  margin-right: 4px;
}

.content__text-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content__photo {
  margin-block: 30px;
  padding-bottom: 8px;
  border-bottom: 2px solid #808080;

  figcaption {
    padding-top: 18px;
    color: #808080;
    text-align: center;
    font-size: 16px;
    line-height: 1.2;
  }
}

.content__screen {
  margin-block: 30px;
  max-width: 361px;
  margin-inline: auto;
}
/* calculator */

.content__calculator {
  margin-block: 50px;
}

.calculator-container {
  margin-bottom: 40px;
}

.slider-wrapper {
  position: relative;
  margin-bottom: 40px;
}

.value-bubble {
  position: relative;
  margin-inline: auto;
  font-size: 25px;
  line-height: 0.86;
  text-align: center;
  color: #fff;
  border-radius: 4px;
  max-width: 184px;
  background: linear-gradient(180deg, #fd0000 0%, #880101 100%);
  padding: 25px 46px;
  margin-bottom: 16px;

  &::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #b71c1c;
  }
}

input[type='range'] {
  width: 100%;
  appearance: none;
  height: 12px;
  border-radius: 50px;
  background: linear-gradient(90deg, #810000 0%, #f00 100%);
  outline: none;

  &::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    background: #7a1107;
    border: 6px solid #e53935;
    border-radius: 50%;
    cursor: pointer;
  }
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  color: #000;
  text-align: center;
  font-size: 20px;
  line-height: 1.1;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.result-card {
  border-radius: 5px;
  background: #880101;
  color: #fff;
  padding: 25px 16px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card-title {
  line-height: 1.2;
  margin-bottom: 10px;
}

.divider {
  height: 1px;
  background: rgba(203, 203, 203, 0.4);
  width: 80%;
  margin: 0 auto 25px;
}

.card-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 0.8;
}

/* calculator end */

.content__btn {
  margin-inline: auto;
}

.content__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content__img {
  margin-block: 30px;
}

.content__offer {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 50px;
}

.content__offer-list {
  display: flex;
  flex-direction: column;
  gap: 16px;

  li {
    display: flex;
    padding: 20px 15px;
    align-items: center;
    border-radius: 4px;
    background: linear-gradient(90deg, #650000 0%, #f00 100%);

    color: #fff;
    font-weight: 700;
  }
}

.content__form {
  display: flex;
  padding: 16px;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
  border: 1px solid #eaeaea;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.25);
}

/* #region COMMENTS */
.content__comments {
  margin-block: 50px 115px;
}

.content__comments-title {
  margin-bottom: 32px;
}
.content__comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaeaea;
  margin-bottom: 16px;
}

.content__comments-count {
  color: #4b4f56;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.content__comments-sort {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #4b4f56;

  span {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
  }

  a {
    display: flex;
    padding: 1px 5px;
    border-radius: 2px;
    border: 1px solid #ccd0d5;
    background: #f5f6f7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;

    &:hover {
      border: 1px solid #4b4f56;
    }
  }
}
.content__comments-form {
  display: flex;
  gap: 12px;

  img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }
}

.content__comments-input {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #d3d6db;

  textarea {
    padding: 12px;
    padding-bottom: 30px;
    border: none;
    resize: none;
    color: #4b4f56;

    &::placeholder {
      color: #767676;
      font-size: 16px;
    }
  }
}

.content__comments-post {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 8px;
  background: #f5f6f7;
  line-height: 1.2;

  a {
    display: flex;
    padding: 5px 10px;
    border-radius: 2px;
    background: #9cb4d8;
    color: #fff;
    font-size: 14px;
    font-weight: 700;

    transition: background 0.3s;

    &:hover {
      background: #4b4f56;
    }
  }
}

.content__comments-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #90949c;
  font-size: 12px;
  font-weight: 400;
}

.content__comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.content__comments-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.content__comments-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;

  h4 {
    color: #365899;
    font-weight: 700;
    line-height: 1.4;
  }

  p {
    color: #4b4f56;
    font-weight: 400;
    line-height: 1.7;
  }
}
.content__comments-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: #90949c;

  a {
    color: #4267b2;

    &:hover {
      text-decoration: underline;
    }
  }

  .content__comments-like {
    display: flex;
    gap: 4px;
  }
}
.content__comments-replies {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content__comments-reply {
  margin-left: 65px;
  padding-left: 12px;
  border-left: 1px dashed #d3d6db;
}
/* #endregion COMMENTS */

.content__news {
  display: flex;
  flex-direction: column;
  margin-block: 40px;
  gap: 16px;
  color: #353535;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;

  a {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
  }
}

.content__news-legal {
  font-size: 14px;

  img {
    display: inline;
    vertical-align: middle;
  }
}

.content__related {
  h2 {
    font-size: 20px;
    line-height: 1.7;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    margin-bottom: 18px;
  }

  ul {
    display: flex;
    flex-direction: column;
    list-style: disc;
    padding-left: 40px;
    gap: 16px;

    li {
      border-bottom: 1px solid #d8d8d8;
      a {
        color: #0550c8;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
      }
      span {
        color: #e60505;
        text-transform: uppercase;
      }
    }
  }
}

@media (width < 1024px) {
}

@media (width < 744px) {
  .content {
    padding-inline: 16px;
  }
  .content__news,
  .content__related {
    display: none;
  }

  .slider-labels {
    font-size: 12px;
  }
  .results-grid {
    grid-template-columns: 1fr;
  }
  .content__comments {
    margin-block: 50px 0;
  }
  .content__comments-post {
    a {
      width: 100%;
      text-align: center;
      justify-content: center;
    }
  }
  .content__comments-info {
    h4 {
      font-size: 14px;
    }
  }
}

/* #endregion CONTENT */

/* #region SIDEBAR */

.sidebar {
  position: relative;
  padding-top: 50px;
  min-width: 360px;
}

.sidebar__inner {
  position: sticky;
  top: 200px;
  display: flex;
  flex-direction: column;
  max-width: 360px;
  padding: 40px 20px;
  gap: 10px;
  overflow-y: auto;
  background: #f6f4f4;

  h3 {
    color: #f90000;
    text-transform: uppercase;
  }
}

.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 16px;

  li {
    padding-bottom: 20px;
    border-bottom: 1px solid #d1d1d1;

    &:last-child {
      padding-bottom: 0;
      border-bottom: none;
    }

    a {
      &:hover p {
        text-decoration: underline;
      }
    }

    h4 {
      margin-bottom: 10px;
    }

    p {
      font-size: 16px;
      font-weight: 700;
      line-height: 1.2;
      margin-bottom: 10px;
    }

    span {
      color: #535353;
      font-size: 14px;
    }
  }
}

@media (width < 1024px) {
  .sidebar {
    padding-top: 0;
  }

  .sidebar__inner {
    position: static;
    max-width: 100%;
    padding-inline: 30px;
  }
}

@media (width < 744px) {
  .sidebar {
    min-width: 0;
  }
  .sidebar__inner {
    padding-inline: 20px;
  }
}

/* #endregion SIDEBAR */

/* #region FOOTER */
.footer {
  margin-top: 70px;
  padding-top: 50px;
  border-top: 1px solid #eaeaea;
}

.footer__top {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
}
.footer__links {
  h4 {
    margin-bottom: 16px;
  }

  ul {
    display: flex;
    flex-direction: column;
    gap: 6px;

    a {
      color: #0550c8;
      font-size: 14px;
      line-height: 1.2;
    }

    p {
      a {
        font-size: 18px;
        border-bottom: 1px solid #d8d8d8;
      }
    }
  }
}
.footer__bottom {
  margin-top: 16px;
  padding-block: 16px;
  background-color: #000;
}
.footer__bottom-content {
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

@media (width < 1024px) {
  .footer__top {
    grid-template-columns: repeat(4, 1fr);

    > :last-child {
      grid-column: 3 / 5;
      grid-row: 2 / 3;
    }
  }
}

@media (width < 744px) {
  .footer {
    margin-top: 50px;
    padding-top: 0;
    border: unset;
  }
  .footer__top {
    grid-template-columns: 1fr;

    > :last-child {
      grid-column: auto;
      grid-row: auto;
    }
  }

  .footer__bottom-content {
    flex-direction: column;
  }
}

.content-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-block: 30px;
}
