@media (max-width: 768px) {
  .page {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }
}

@media screen and (min-width: 1440px) {
  .header-nav {
    padding: 10px 16px;
  }

  .header-nav > div {
    gap: 24px;
  }
  .menu-button {
    display: none;
  }
  .create-btn {
    font-size: 18px;
    padding: 13px 20px;
    white-space: nowrap;
  }
  .logo {
    font-size: 40px;
    height: 46px;
    margin-left: 25px;
    margin-right: 463px;
  }
  .menu-nav-header {
    display: flex;
    gap: 160px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-right: 463px;
    white-space: nowrap;
  }
  .avatar {
    width: 48px;
    height: 48px;
  }

  .sorted-btn {
    display: none;
  }

  .menu-list li a {
    display: flex;
    align-items: start;
    gap: 5px;
  }
  .view-controls {
    display: flex;
  }
  .view-controls {
    margin-right: 24px;
  }

  .view-controls button {
    margin-left: 16px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: start;
  }
  .view-controls button svg {
    fill: #69748c;
    width: 20px;
    height: 20px;
  }
  .view-controls button.active svg {
    fill: var(--primary);
  }
  .gallery.grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 24px;
  }

  .gallery.grid-view .card {
    background-color: var(--secondary);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
  }
  .sorted-section {
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
  }
  .sorted-list {
    display: flex;
  }
  .sorted-list {
    gap: 24px;
    align-items: start;
    padding-bottom: 16px;
  }
  .sorted-list li {
    color: var(--primary);
    font-size: 14px;
  }
  .icon-arrow {
    fill: var(--primary);
    margin-left: 4px;
    padding-top: 4px;
  }
  .list-mode .sorted-list {
    justify-content: space-between;
    background: #fff;
    border-radius: 6px 6px 0 0;
  }

  .list-mode .sorted-list li {
    color: #000;

    padding: 16px 0;
  }
  .list-mode .sorted-list li:first-child {
    margin-right: 240px;
    margin-left: 48px;
  }
  .list-mode .sorted-list li:last-child {
    margin-right: 340px;
  }

  .section-sorted {
    padding: 24px 0 16px;
    margin: 0 24px;
  }

  .section-title {
    font-size: 22px;
  }
  .card-btn {
    display: flex;
    padding: 10px;
    height: 32px;
    background-color: transparent;
    border: 1px solid #d2d4d8;
    border-radius: 6px;
  }
  .card-btn svg {
    width: 12px;
    height: 12px;
  }
  .comments-text {
    display: flex;

    margin-left: 5px;
  }

  .start-btn {
    padding: 9px 21px;
  }
}

.layout {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 56px;
  transition: width 0.3s ease;
  overflow: hidden;
}

.sidebar:hover {
  width: 240px;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.menu-icon {
  margin-right: 12px;
  flex-shrink: 0;
}

.sidebar:hover .menu-text {
  opacity: 1;
}

.main-content {
  flex-grow: 1;
  padding: 20px;
  background: #f5f5f5;
}
