@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap");

:root {
  --bg-color: #161415;
  --accent-color: #f01413;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--accent-color);
  font-family: "Manrope", sans-serif;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 96px 15px;
  overflow: hidden;
}

.header {
  margin-bottom: 72px;
  text-align: center;
}

.header__logo {
  max-width: 100%;
}

.topics {
  text-align: center;
}

.topic-block {
  margin-bottom: 3rem;
}

.topic-block:last-child {
  margin-bottom: 0;
}

.topic-block--open .topic-block__full-date {
  display: block;
  animation: fadeIn 0.25s ease;
}

.topic-block--open .topic-block__more {
  max-height: 2000px;
  opacity: 1;
}

.topic-block--open .topic-block__title .topic-block__date {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.topic-block__full-date {
  display: none;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.topic-block__title {
  position: relative;
  font-size: 84px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 48px;
  line-height: 1.1;
  display: inline-block;
  cursor: pointer;
  outline: none;
}

.topic-block__title:focus {
  outline: none;
}

.topic-block__title:focus-visible {
  outline: none;
}

.topic-block__date {
  font-size: 32px;
  position: absolute;
  left: 100%;
  bottom: 50%;
  transition: all 0.4s ease;
  color: var(--accent-color);
  font-weight: 800;
  margin-left: 5px;
  opacity: 1;
}

.topic-block__more {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0s ease, opacity 0s ease;
  will-change: max-height, opacity;
}

.topic-block__avatars {
  margin: 40px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.topic-block__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #333;
}

.topic-block__text {
  max-width: 1103px;
  margin: 0 auto;
  font-size: 32px;
  color: var(--accent-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ================= Footer ================== */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  padding: 96px 0 0 0;
}

.footer__section {
  flex: 0 0 auto;
  width: 30%;
}

.footer__section--center {
  text-align: center;
}

.footer__section--right {
  text-align: right;
}

.footer__section a {
  color: red;
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
}

.footer__section a:hover {
  opacity: 0.8;
}

.footer_btn--mob {
  display: none;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 1200px) {
  .topic-block__title {
    font-size: 64px;
  }

  .topic-block__date,
  .topic-block__full-date {
    font-size: 28px;
  }

  .topic-block__text {
    font-size: 28px;
  }
}

@media (max-width: 992px) {
  .topic-block__title {
    font-size: 48px;
  }

  .topic-block__text {
    font-size: 24px;
  }

  .topic-block__date,
  .topic-block__full-date {
    font-size: 24px;
  }

  .topic-block__avatars {
    margin: 30px 0;
  }

  .topic-block__avatar {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 45px 20px 86px 20px;
  }

  .header {
    margin-bottom: 45px;
  }

  .header__logo {
    max-width: 195px;
  }

  .topic-block__date {
    color: #fff;
  }

  .topic-block {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topic-block:last-child {
    border-bottom: none;
  }

  .topic-block__title {
    color: #fff;
    margin-bottom: 24px;
    font-size: 20px;
    width: 100%;
    text-align: start;
    position: relative;
    font-weight: 600;
    text-transform: none;
  }

  .topic-block__title::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background-image: url(./down.svg);
    right: 0;
    transition: transform 0.3s ease;
    will-change: transform;
  }

  .topic-block.topic-block--open .topic-block__title::after {
    transform: rotate(180deg);
  }

  .topic-block__avatars {
    justify-content: start;
    margin-top: 0;
    margin-bottom: 24px;
  }

  .topic-block--open .topic-block__full-date {
    display: none;
  }

  .topic-block__date,
  .topic-block__full-date {
    display: none;
  }

  .topic-block__text {
    color: #fff;
    font-size: 16px;
    text-align: start;
  }

  .topic-block.topic-block--open .topic-block__text {
    margin-bottom: 20px;
  }

  .topic-block__avatar {
    width: 70px;
    height: 70px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .footer__section {
    display: none;
  }

  .footer__section a {
    font-size: 16px;
    text-align: center;
  }

  .header__logo {
    max-width: 200px;
  }

  .footer_btn--mob {
    display: block;
    position: fixed;
    bottom: 0;
    left: 20px;
    width: calc(100% - 40px);
    padding-bottom: 20px;
  }

  .footer_btn--mob a {
    width: 100%;
    display: block;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    border-radius: 26px;
    background: #FFF;
    padding: 15px 19px 17px 18px;
    text-decoration: none;
    color: #000;
    margin-top: 10px;
    text-transform: none;
  }
}