.page {
  min-height: 100vh;
}

.content {
  margin-left: var(--sidebar-width);
}

/* SIDEBAR */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background-color: var(--color-sidebar);
}

.sidebar__profile,
.sidebar__text,
.sidebar__buttons {
  padding-inline: 20px;
}

.sidebar__cover {
  height: 180px;
  background-image: url("../images/sidebar/cover.jpg");
  background-size: cover;
  background-position: center;
}

.sidebar__profile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -50px;
  text-align: center;
}

.sidebar__avatar {
  width: 100px;
  height: 100px;
  margin-bottom: 19px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar__name {
  margin-bottom: 3px;
  font-size: 18px;
  font-weight: 400;
}

.sidebar__description {
  margin-bottom: 17px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 300;
}

.sidebar__socials {
  display: flex;
  gap: 15px;
}

.sidebar__socials a {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar__divider {
  margin: 30px 20px;
}

.sidebar__text {
  color: var(--color-text);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.sidebar__buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.sidebar__button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  flex: 1;
  border-radius: 25px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar__button--red {
  background-color: var(--color-red);
}

.sidebar__button--blue {
  background-color: var(--color-blue);
}

.sidebar__button:hover {
  opacity: 0.85;
}

/* HEADER */

.header__burger {
  display: none;
}

.header {
  display: flex;
  justify-content: space-between;
  height: 40px;
  background-color: var(--color-header);
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.25);
}

.header__menu,
.header__right {
  display: flex;
  align-items: center;
}

.header__item {
  position: relative;
}

.header__link,
.header__profile {
  display: flex;
  align-items: center;
  height: 40px;
  padding-inline: 15px;
  color: var(--color-text);
  font-size: 11px;
  text-transform: uppercase;
  transition: var(--transition);
}

.header__link:hover,
.header__profile:hover {
  background-color: var(--color-blue);
}

.header__arrow {
  width: 10px;
  height: 6px;
  margin-left: 8px;
  transition: transform var(--transition);
}

.header__item--dropdown:hover .header__arrow {
  transform: rotate(180deg);
}

.header__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 165px;
  padding-block: 12px;
  background-color: var(--color-blue);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition),
    visibility var(--transition);
}

.header__item--dropdown:hover .header__link {
  background-color: var(--color-blue);
}

.header__item--dropdown:hover .header__submenu {
  opacity: 1;
  visibility: visible;
}

.header__submenu-link {
  position: relative;
  display: inline-block;
  padding: 10px 12px;
  color: var(--color-text);
  font-size: 12px;
}

.header__submenu-link::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 6px;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: var(--transition);
}

.header__submenu-link:hover::after {
  width: calc(100% - 24px);
}

.header__search-input {
  width: 212px;
  height: 40px;
  padding-inline: 20px;
  border: none;
  outline: none;
  background-color: var(--color-card);
  color: var(--color-text);
  font-size: 12px;
}

.header__search-input::placeholder {
  color: var(--color-placeholder);
}

@media (max-width: 960px) {
  .sidebar {
    display: none;
  }

  .content {
    margin-left: 0;
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header__nav,
  .header__profile {
    display: none;
  }

  .header__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    background-color: var(--color-header);
  }

  .header__burger span,
  .header__burger::before,
  .header__burger::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
  }
}

@media (max-width: 768px) {
  .header__burger {
    margin-left: 9px;
  }
}

@media (max-width: 320px) {
  .header__burger {
    margin-left: 6px;
  }
}

/* STORIES */

.stories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  max-width: 600px;
  margin: 60px auto 30px;
}

.stories__item {
  position: relative;
  min-height: 195px;
  overflow: hidden;
  border-radius: 5px;
  background-color: var(--color-card);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stories__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stories__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0) 52%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.stories__title {
  position: absolute;
  top: 15px;
  left: 11px;
  right: 11px;
  z-index: 1;
  font-size: 12px;
  font-weight: normal;
}

.stories__date {
  position: absolute;
  right: 11px;
  bottom: 12px;
  z-index: 1;
  font-size: 12px;
}

@media (max-width: 768px) {
  .stories {
    display: flex;
    gap: 10px;
    width: calc(100% - 30px);
    margin: 40px auto 30px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .stories::-webkit-scrollbar {
    display: none;
  }

  .stories__item {
    min-width: 140px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .stories {
    margin: 25px auto 25px;
  }

  .stories__item {
    min-width: 120px;
    min-height: 160px;
  }

  .stories__title,
  .stories__date {
    font-size: 11px;
  }

  .stories__title {
    top: 12px;
    left: 10px;
    right: 10px;
  }

  .stories__date {
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 320px) {
  .stories {
    gap: 8px;
    width: calc(100% - 24px);
    margin: 20px auto 20px;
  }

  .stories__item {
    min-width: 110px;
    min-height: 150px;
  }

  .stories__title,
  .stories__date {
    font-size: 10px;
  }

  .stories__title {
    top: 10px;
    left: 9px;
    right: 9px;
  }

  .stories__date {
    right: 9px;
    bottom: 9px;
  }
}

/* CREATE POST */

.create-post {
  max-width: 600px;
  margin: 0 auto 30px;
}

.create-post__form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 74px;
  padding: 15px 20px 15px 28px;
  border-radius: 5px;

  background-color: var(--color-post);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.45);
}

.create-post__input {
  flex: 1;
  border: none;
  outline: none;
  background-color: transparent;
  color: var(--color-text);
  font-size: 15px;
}

.create-post__input::placeholder {
  color: var(--color-placeholder);
}

.create-post__actions {
  display: flex;
  gap: 15px;
}

.create-post__button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  transition: var(--transition);
}

.create-post__button:hover {
  opacity: 0.85;
}

.create-post__button--photo {
  background-color: var(--color-light);
}

.create-post__button--send {
  background-color: var(--color-blue);
}

@media (max-width: 768px) {
  .create-post {
    width: calc(100% - 30px);
  }
}

@media (max-width: 480px) {
  .create-post {
    margin-bottom: 25px;
  }

  .create-post__form {
    min-height: 68px;
    padding: 12px 15px;
    gap: 12px;
  }

  .create-post__input {
    font-size: 14px;
  }

  .create-post__actions {
    gap: 10px;
  }

  .create-post__button {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 320px) {
  .create-post {
    width: calc(100% - 24px);
    margin-bottom: 20px;
  }

  .create-post__form {
    min-height: 60px;
    padding: 10px 12px;
    gap: 10px;
  }

  .create-post__input {
    font-size: 13px;
  }

  .create-post__actions {
    gap: 8px;
  }

  .create-post__button {
    width: 36px;
    height: 36px;
  }
}

/* POSTS */

.posts {
  max-width: 600px;
  margin: 0 auto;
}

.post {
  margin-bottom: 30px;
  overflow: hidden;
  border-radius: 5px;
  background-color: var(--color-card);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.35);
}

.post__image {
  width: 100%;
}

.post__content {
  padding: 25px;
}

.post__title {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 500;
}

.post__text {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.post__date,
.post__category {
  color: var(--color-placeholder);
  font-size: 12px;
}

.post__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.post__meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.post__category {
  position: relative;
}

.post__category::before {
  content: "•";
  margin-right: 15px;
  color: var(--color-dot);
}

.post__link {
  color: var(--color-blue-light);
  font-size: 14px;
  text-transform: lowercase;
}

.post__video {
  position: relative;
}

.post__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 75px;
  height: 75px;
  border: none;
  background-color: transparent;
  transform: translate(-50%, -50%);
}

.post__play img {
  width: 100%;
  height: 100%;
}

.post:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .posts {
    width: calc(100% - 30px);
  }
}

@media (max-width: 480px) {
  .post {
    margin-bottom: 25px;
  }

  .post__content {
    padding: 20px;
  }

  .post__title {
    margin-bottom: 12px;
    font-size: 17px;
  }

  .post__text {
    font-size: 13px;
  }

  .post__footer {
    margin-top: 18px;
  }

  .post__meta {
    gap: 10px;
  }

  .post__category::before {
    margin-right: 10px;
  }

  .post__play {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 320px) {
  .posts {
    width: calc(100% - 24px);
  }

  .post {
    margin-bottom: 20px;
  }

  .post__content {
    padding: 15px;
  }

  .post__title {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .post__text,
  .post__link {
    font-size: 13px;
  }

  .post__date,
  .post__category {
    font-size: 11px;
  }

  .post__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 15px;
  }

  .post__meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .post__category::before {
    margin-right: 8px;
  }

  .post__play {
    width: 52px;
    height: 52px;
  }
}

/* PAGINATION */

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 80px auto 80px;
}

.pagination__link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background-color: var(--color-header);
  color: var(--color-text);
  font-size: 14px;
  transition: var(--transition);
}

.pagination__link:hover,
.pagination__link--active {
  background-color: var(--color-blue-active);
}

@media (max-width: 480px) {
  .pagination {
    gap: 8px;
    margin: 60px auto;
  }

  .pagination__link {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

@media (max-width: 320px) {
  .pagination {
    gap: 6px;
    margin: 40px auto;
  }

  .pagination__link {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}